# A topological space $X$ has the Intermediate Value Property iff it is Connected

Prove: A topological space $X$ has the intermediate value property if and only if it is connected.

$\impliedby$: We will prove the negation (no intermediate value property $\implies$ not connected):

$X$ does not have the intermediate value property so there exists $f:X\to \mathbb{R}$ continuous and $a,b\in X$, and $t\in \mathbb{R}$ such that $f(a)<t<f(b)$ for every $x\in X$ such that $f(x)\neq t$.

We define $U=f^{-1}((t,\infty)),V=f^{-1}((-\infty,t))$ so $V,U$ are open as $f$ is continuous (which means that the preimage of an open image is an open image), non empty (as $a\in V$, $b\in U$), disjoint ($(t,\infty),(-\infty,t)$) and their union is all $X$ (we assumed that for all $x\in X$, $f(x)\neq t$). So $X$ is not connected .

$\implies:$ We will prove the negation (not connected $\implies$ no intermediate value property):

$X$ is not connected so there are $U,V$ open, non empty, disjoint, such that $U \cup V = X$, and we will define $f:X\to \mathbb{R}$ as $$f(x)= \begin{cases} 0 & \text{if x \in U}, \\ 1 & \text{if x \in V}. \end{cases}$$

1. Why is this function continuous?

2. It does not have the intermediate value property as there is no $x\in X$ such that $0 <f(x)< 1$?

• By convention, we may say "intermediate value property". – xbh Aug 27 '18 at 11:39
• "Mean value" usually refers to a certain derivative related theorem, not the continuity related property you're after. – Arthur Aug 27 '18 at 11:45

## 1 Answer

The function is continuous because the preimage of every open set is open. In particular can be either empty, either $X$, either $U$ or $V$.

Moreover, $f$ does not have the intermediate value property, as you said, thus you proved the result.

• And $\{0,1\}$ are open as we can take $B_0(\frac{1}{2})\subseteq \{0\}$ and the same for $1$? – newhere Aug 27 '18 at 11:46
• Well, they are open in the restricted topology to $f(X)$. But usually I prefer looking at it like: "every open set in $\mathbb{R}$ can 1. not contain $0,1$ 2. contain only one of them 3. contain both of them". And so keep on looking at open sets in $\mathbb{R}$ instead of looking at the restricted topology. – LucaMac Aug 27 '18 at 11:50
• One more thing, why can we say that "and there union is all $X$ (we assumed that for all $x\in X,f(x)\neq t$)" – newhere Aug 27 '18 at 12:09
• Every element in $X$ has its image in $\mathbb{R} \setminus \{ t \}$ , thus is either in $f^{-1}((-\infty,t))$ or in $f^{-1}((t,+\infty))$. – LucaMac Aug 27 '18 at 12:12