Applications of connectedness In an «advanced calculus» course, I am talking tomorrow about connectedness (in the context of metric spaces, including notably the real line).

What are nice examples of applications of the idea of connectedness?

High wow-ratio examples are specially welcomed... :)
 A: It might be a bit too sophisticated for an advanced calculus course, but, the proof of the fact that the group generated by an open neighborhood of the identity element of a Lie group is the entire connected component around the identity is cute.
A: You cannot diagonalize real symmetric 2x2 matrices in a continuous way.
Let us restrict to the set $Sym^r(R)$ of 2x2 symmetric matrices with two distinct real eigenvalues. Then we have the following result.
Theorem There is no continuous function $f:Sym^r(R) \rightarrow SO_2(R)$ such that for all $M\in Sym^r(R)$, $f(M)Mf(M)^{-1}$ is diagonal.
Proof  Let us restrict our attention to the $SO_2$-conjuguacy class $O_A$ of some fixed diagonal matrix $A\in Sym^r$. Let $D$ the set of diagonal matrices. If there were such a f, then the map $(A,D)\rightarrow f(A)D$ would give a homeomorphism between $O_A\times (D\cap SO_2)\rightarrow SO_2$. But $D\cap SO_2$ is not connected (it contains only $id$ and $-id$).
The complex case with hermitian matrices uses simple connectedness (you end up with $S^2\times S^1 \simeq S^3$). And the result holds in all dimension. This may be the occasion to speak about connectedness of matrix groups.
A: If $h:[a,b]\to R$ is continuous and one-to-one, then $h$ is monotone.
Proof: The image of the connected set $\{(s,t): a \le s < t \le b\}$ under the 
map $h(t)-h(s)$ is a connected subset of $R\setminus\{0\}$. 
A: You can use conectedness of $\mathbb R^n \setminus 0$ for $n\geq 2$ to show that doesn't exist a an $\mathbb R$-division algebra of any odd dimension $n\geq 3$.
Take any odd $n\geq 1$ and a $\mathbb R$-algebra $A$ of dimension $n$. For $a\in A$ denote by $f(a)$ the determinant of the linear map $A\to A$ given by $x\mapsto ax$. This is a continuous function on $A$ and we have $f(1)=1$ and $f(-1)=-1$ because $n$ is odd. If $A$ is a division algebra, then $f(a)$ is nonzero for all $a\neq 0$, what forces $A\setminus 0$ to be disconnected. Hence $n=1$.
A: Our space has two different orientations. It is possible to deform any "right" frame into the standard one (keeping it a frame throughout), but impossible to do it with a "left" frame.
(I originally misread your question as asking about applications of connectedness of the real line.) 
A: This is probably not as impressive as other answers, but since I am quite fond of real induction, I could not resist.
Real induction can be stated as follows:

Let $a < b$ be real numbers. Let a subset $S \subseteq [a,b]$ be inductive, i.e.:
(RI1) $a\in S$.
(RI2) If $a\le x<b$, then $x\in S$ $\implies$ $[x,y]\subseteq S$ for some $y > x$.
(RI3) If $a < x \le b$ and $[a,x)\subset S$, then $x \in S$.
Then $S=[a,b]$.

This formulation is taken from this Pete L. Clark's answer where also his text on this topic is linked.1
If we look at the set $S'=\{x\in[a,b]; [a,x]\subseteq S\}$, then the above conditions simply say that $S'$ is non-empty clopen subset of $[a,b]$. So in this way, we can view this as a consequence of connectedness.
The linked paper contains several theorems shown using real induction. Usually the proof goes by choosing a suitable set $S$ and showing that this set fulfills the conditions (RI1), (RI2), (RI3). At least for some of them it seems that there is not much difference between difficulty of the proof that $S$ is a non-empty clopen subset and the proof that $S$ fulfills these conditions. (Of course, it is more elegant to use real induction if we want to illustrate this method as unifying principle for proofs of several basic theorems. And also in this way similarity to the usual mathematical induction is highlighted. But for the purposes of this question, this approach might be a way how to view proofs by real induction as a source of applications of connectedness in analysis.)

1 Pete L. Clark: The Instructor's Guide to Real Induction, https://arxiv.org/abs/1208.0973, http://alpha.math.uga.edu/~pete/realinduction.pdf
A: In robotic motion planning, see, e.g., http://parasol.tamu.edu/~amato/Courses/padova04/lectures/L1.intro.ps the connectedness of the configuration space means that one can reach the desired arrangement of solid objects from any initial arrangement.
A: As an application of connectedness you can prove the "Borsuk-Ulam" theorem in dimension 1, i.e. that for any continuous function $f$ from $S^1$ to the reals there are two radially symmetric points which are mapped to the same point. This is because the function g(v) = f(v) - f(-v) is either constant or has points where it is positive and points where it is negative, therefore it must have a point where it is zero.
As an application of this fact you can show that for any pair of compact regions A and B inside the plane there is one line splitting each region in pieces of equal area (see the book by Kosniowski, A first course in algebraic topology, where this is referred to as a "pancake problem"). 
A: You can use connectedness to prove that $\mathbb{R}$ is not homeomorphic to $\mathbb{R}^n$ for any n>1 by noting that $\mathbb{R} \backslash 0$ is not connected while $\mathbb{R}^n \backslash 0$ is connected.
The students may not be very impressed by this as it is telling them something they probably already assumed was true.  I suppose that if you wanted them to discover cohomology, you could challenge them to find a reason why Euclidean spaces of different dimensions are never homeomorphic (I realize that this probably isn't very reasonable).
A: For high wow factor, try the topologists sine curve, to let students know that there is
more to connectivity than paths.  Not so much an application as a hint to how wierd
the concept can become.
Gerhard "Ask Me About System Design" Paseman, 2010.06.08
A: Lots and lots of matrix inequalities can be proven using the "connectedness exploit", to an extent that I am happy each time I see one that can't be solved this way.
For instance, let us call a matrix $A=\left(a_{i,j}\right)_{1\leq i\leq n,\ 1\leq j\leq n}\in\mathbb R^{n\times n}$ strictly diagonally dominant if every $i\in\left\lbrace 1,2,...,n\right\rbrace$ satisfies $a_{i,i} > \sum\limits_{j\in\left\lbrace 1,2,...,n\right\rbrace ;\ j\neq i} \left|a_{i,j}\right|$. We claim that every strictly diagonally dominant matrix $A$ has determinant $> 0$. In fact, the set of all strictly diagonally dominant matrices (as a subset of $\mathbb R^{n\times n}$) is connected (we can connect every strictly diagonally dominant matrix $A$ to a diagonal matrix with positive entries on the diagonal, just by gradually decreasing all off-diagonal entries), and every strictly diagonally dominant matrix is nonsingular (since every nonzero vector annihilated by such a matrix would lead to a contradiction, because trivial estimates show that whichever of its coordinates has the greatest modulus, there must be another coordinate with yet greater modulus). Qed.
Actually, we can do better: For a diagonally dominant matrix $A$ (not necessarily strictly; that is, we allow $\geq $ instead of $>$), we have
$\det A\geq \prod\limits_{i=1}^n \left(a_{i,i} - \sum\limits_{j=i+1}^n \left|a_{i,j}\right|\right)$,
where $a_{i,j}$ denote the entries of $A$. This is called Ostrowki's theorem and has been discussed elsewhere.
Another example (which used to be a Vojtech Jarnik contest problem in disguise): If $A\in\mathbb R^{n\times n}$ is a positive definite matrix and $X\in\mathbb R^{n\times n}$ is an antisymmetric matrix, then $\det\left(A+X\right)>0$. The proof is by homotopizing $X$ to $0$ while keeping it antisymmetric (all along the way, the determinant stays nonzero because $v^T\left(A+X\right)v>0$ for any $v\neq 0$). There is also an alternative proof using elementary techniques only; however it is much more complicated.
For yet another application of the same tactic, see the proof of Theorem 5.4 in this proof of van der Waerden's permanent conjecture.
A: Do you want an example where you can give the proof, not just the statement, in the lecture too?  Lots of other suggestions are great uses of connectedness, but in one lecture where you first introduce the concept I don't think they can be fully explained.  Here is one simple result which I think can: a function on an interval I which is locally a polynomial is globally a polynomial.  That if, if f : I ---> R and around each a in I there's a neighborhood and a polynomial p_a(x) such that f(x) = p_a(x) for all x in a, then there is a single polynomial p(x) such that f(x) = p(x) for all x in I.  The point is that polynomials that agree at infinitely many points are equal everywhere and connectedness lets you show a polynomial locally equal to f near one point has to be locally equal to f everywhere.  Admittedly this is not an important result compared to the other suggestions, but it illustrates in a nice way one of the points of connectedness: how it turns local information into global information.
A: Yet another rather simple application is that any continuous function $f:X \to \mathbb{Z}$ is constant along each connected component (or just constant if X is connected).
A: This is vintage ODE, but may be nice according to the level of the course. Consider a Sturm -Liouville eigenvalue problem, say, not to exceed in generality, $q\in C^0([0,\pi])$ and
$$ {(SL)} \qquad\begin{cases}-\ddot u(x)+ q(x)u(x)=\lambda u(x\\
u(0)=0\\ u(\pi)=0.\end{cases}$$
The fact that the $n$-th eigenfunction has exactly $n+1$ zeros in $[0, \pi]$ may be seen as a consequence that 


*

*non trivial solution of a second order linear ODE, in particular the eigenfunctions of (SL), must have simple zeros (by the unicity of the solution of the Cauchy problem);

*in the space of all functions in $C^2([0,\pi])$ zero on the boundary, the subset $A$ of those all whose zeros are simple, is an open set with infinitely many connected components, and each component is characterized by the (finite) common number of zeros of functions in it.

*the $n$-th (normalized) eigenfunction of (SL) depends continuously on the coefficient $q(x)$; therefore, for any n, the n-th eigenfunctions are in the same connected component of $A$, irrespectively on $q(x)$. Thus they have the same number of zeros, which is the same as the $n$-th eigenfunction corresponding to $q= 1 $(constant), that is $n+1.$ 
A: You can get the maximum principle for subharmonic functions: Write $F$ for the supremum of $f$ in $\Omega$, write $A$ for the set where $f = F$ and $B$ for the set where $f < F$. Then
$\Omega = A \cup B$.
Now, B is open by upper semicontinuity. If the first is non-empty then it is fairly straightforward to show that it too must be open and therefore the whole domain.
