Intermediate value theorem

Statement
Suppose $$X$$ is a connected space and $$f:X \to \R$$ is a continuous map, where $$\R$$ is the real line with the usual Euclidean topology. Then, if there exist $$x_1,x_2 \in X$$ with $$f(x_1) < f(x_2)$$, $$f(X)$$ contains the closed interval $$[f(x_1),f(x_2)]$$. In other words, $$f$$ takes all intermediate values between $$f(x_1)$$ and $$f(x_2)$$.

Related facts

 * Extreme value theorem

Facts used

 * 1) uses::Connectedness is continuous image-closed