# Topological space is connected, if any continious map is constant.

Suppose $Y$ is discrete topology. Show that $X$ is connected, if any continuous map $f: X\rightarrow Y$ is constant.

So, we can assume that $X$ is not connected, then there exists such open $U,V$ that $U\cap V=\emptyset$, $U\cup V=X$. $f$ is continuous, so $f^{-1}(V)=\{x\in X|f(x)\in V\}$ is open for any open $V$. But I cannot combine these facts to get contradiction. Can anybody help me?

• You cannot consider $f^{-1}(V)$ since $V\subset X$. Apr 11, 2016 at 9:19
• you forgot to mention that $U,V$ are not empty. Apr 11, 2016 at 9:26
• An alternative, equivalent definition of non-connected space is: take the two-element set $\;\{0,1\}\in\Bbb R\;$ with the inherited topology (and this is thus a discrete space), then a space $\;X\;$ is disconnected iff there exists a continuous surjection $\; X\to\{0,1\}\;$ . This question's exercise seems to point towards this equivalence, and it is thus important, as remarked below, to note that it must be $\;|Y|\ge2\;$ . Apr 11, 2016 at 9:35

The statement is not true in general.

If e.g. $Y$ is a singleton then any map $f:X\to Y$ is constant. However $X$ is not necessarily connected.

The statement is true under the extra condition that $Y$ contains at least $2$ elements.

If there are two distinct elements $u,v\in Y$ then you can define a function $f:X\to Y$ prescribed by $x\mapsto u$ if $x\in U$ and $x\mapsto v$ if $x\in V$. This function is not constant, but can be shown to be continuous.

You forgot to mention that $U$ and $V$ are not empty.

Let $f$ take the value $x$ on $U$ and the value $y$ on $V$. Because we're mapping into the discrete topology, $\{ x \}$ and $\{ y \}$ are open subsets of $Y$. $f$ is not constant, but it is continuous.

As 5xum points out, I've been a bit sloppy here: I have used the fact that $x \not = y$ without justification. This implicitly assumes that $Y$ has more than one element, and in fact the theorem is false if $Y$ has only one element (because then every function $X \to Y$ is constant, not just the continuous ones).

• This answer also shows that in order for the statement to be true, $Y$ needs to have at least two elements.
– 5xum
Apr 11, 2016 at 9:18

Your statement is true if you correct it slightly:

A topological space $$X$$ is connected if any continuous map from $$X$$ to any two-point discrete set is constant.

Proof.

I use the definition of a connected topological space given in [1]:

A topological space $$X$$ is connected if there does not exist a continuous map from $$X$$ onto a two-point discrete space.

Denote this two-point discrete space by $$\{0, 1\}$$. Then we can rewrite the above statement more mathematically as:

$$X$$ connected if: $$\neg (\exists f: X \rightarrow \{0, 1\}, f$$ continuous and surjective$$)$$

This is equivalent to:

$$\forall f: X \rightarrow \{0, 1\} \text{ continuous}, f \text{ not surjective}$$

$$\iff$$

$$\forall f: X \rightarrow \{0, 1\} \text{ continuous}, f(X) = \{0\} \text{ or } f(X) = \{1\}$$ i.e., $$f$$ is constant, as required. $$\square$$

References

[1] Definition 12.1 page 114 of "Introduction to Metric & Topological Spaces", Second Edition, by Wilson A. Sutherland