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$.