Intermediate Value Theorem (Topology)

Theorem
Let $f: X \to Y$ be a continuous map, where $X$ is a connected space and $Y$ is an ordered set in the order topology.

If $a$ and $b$ are two points of $X$ and if $r$ is a point of $Y$ lying between $f(a)$ and $f(b)$, then there exists a point $c$ of $X$ such that $f(c) = r$.

Proof
Let $a, b \in X$, and let $r \in Y$ lie between $f \left({a}\right)$ and $f \left({b}\right)$.

Define sets $A = f \left({X}\right) \cap \left({-\infty \,.\,.\, r}\right)$ and $B = f \left({X}\right) \cap \left({r \,.\,.\, \infty}\right)$.

These sets are clearly disjoint, and they are clearly nonempty since one contains $f \left({a}\right)$ and the other contains $f \left({b}\right)$.

We can also see that they are both open by definition as the intersection of open sets.

Assume there is no point $c$ such that $f \left({c}\right) = r$.

Then $f \left({X}\right) = A \cup B$, so $A$ and $B$ constitute a separation of $X$.

But this contradicts the fact that the image of a connected space under a continuous mapping is connected.

Also see

 * Intermediate Value Theorem of calculus, which follows as a corollary from this by considering $\R$ under the order topology and noting that Subset of Real Numbers is Interval iff Connected.