0

Prove $X$ (Metric Space) is connected $\iff$ for every continuous $f:X\rightarrow \mathbb R$, $f(X)$ is connected and $ \subset \mathbb R$

I'd appreciate if somebody posted a whole answer, so that I can work through it.

I tried proving by contradiction. Assume $X$ is connected but $f(X)$ is not. Then we can find open sets $U,V$ that partition $f(X)$ and their intersection is empty.

Then $f^{-1}(U)\cap(X)\subset X$ and $f^{-1}(V)\cap(X)\subset X$. Since $U\cap V$ is empty we also get that $f^{-1}(U)\cap f^{-1}(V)$ is empty. Thus they $f^{-1}(U)\cap(X)$ and $f^{-1}(V)\cap(X)$ partition $X$ which is a contradiction?

This proof would work for $f:X\rightarrow Y$ where $Y$ is another metric space, but does it also work for $\mathbb R$?

GRS
  • 2,495

2 Answers2

2

It is straightforward, using the definition of continuity and connectedness to show that if $f(X)$ is not connected, then $X$ is not connected. That is, if $f(X) = W \cup Z$ where $W,Z$ are two non empty disjoint open sets, then $f^{-1}(W), f^{-1}(Z)$ are two non empty disjoint open sets whose union equals $X$. This proves one direction.

If $X$ is disconnected, then there are two non empty disjoint open sets $U,V$ such that $X=U\cup V$. Define $f(u) = 1$, for $u \in U$ and $f(v) = 0$ for $v \in V$. Since $f(X)$ is not connected you have shown the other direction.

Addendum: To show that $f$ is continuous, we need to show that $f^{-1}(W)$ is open for all open $W \subset \mathbb{R}$. There are only four cases to consider (1) $\{0,1\} \subset W$, in which case $f^{-1}(W) = X$, (2) $ 1 \in W, 0 \notin W$, in which case $f^{-1}(W) =U$, (3) $ 0 \in W, 0 \notin W$, in which case $f^{-1}(W) =V$ and (4) $\{0,1\} \cap W = \emptyset$, in which case $f^{-1}(W) = \emptyset$.

In all cases, $f^{-1}(W)$ is open, hence $f$ is continuous.

copper.hat
  • 172,524
  • Note this applies to all topological spaces, not just metrizable ones. – DanielWainfleet Feb 19 '16 at 21:15
  • @copper.hat I was looking at past questions and I noticed that $f$ in your example is not continuous, so this example wouldn't work? – GRS May 10 '16 at 11:36
  • @GRS: The $f$ is continuous. The inverse image of any open set (recall the range consists of just two points) is open. – copper.hat May 10 '16 at 15:09
  • @copper.hat Is it because ${1,0}$ is the whole space, then it's open? Is every singleton an open set? I know that $X$ and the empty set are open and closed. – GRS May 10 '16 at 15:26
  • @GRS: Well, no. I added an explanation above... – copper.hat May 10 '16 at 15:47
  • I see, so $W$ is not actually ${1,2}$ as I origninally thought, but instead it's any subset in $\mathbb R$. Thanks – GRS May 10 '16 at 15:55
  • 1
    @GRS: Any open subset. Note that $f$ is continuous iff the inverse image of any open set is open. – copper.hat May 10 '16 at 15:58
1

Suppose $X$ is connected. Suppose $f[X] \subseteq \mathbb{R}$ is not connected, so $f[X] \subseteq U \cup V$, where $U,V$ are open, and $U \cap V \cap f[X] = \emptyset$, which implies that $f^{-1}[U] \cap f^{-1}[V] = \emptyset$. These inverse images are open by continuity. Also, $f[X] \subseteq U \cup V$ implies that $X = f^{-1}[U] \cup f^{-1}[V]$ and also $U \cap f[X] \neq \emptyset$ (and similarly for $V$) implies that both $f^{-1}[U]$ and $f^{-1}[V]$ are non-empty. So $X$ would not be connected, contradiction.

Suppose that $X$ is not connected. Then $X = U \cup V$, where both are open, disjoint, non-empty. Then define $f$ to be $0$ on $U$, $1$ on $V$ and check $f$ is continuous on $X$. But its image is $\{0,1\}$ which is not connected in the reals. This shows the other implication (by their negatives).

Henno Brandsma
  • 242,131