# Is there always a non-constant continuous map?

Let $$X, Y$$ be topological spaces.

I want to understand better the structure of the space $$C(X,Y)$$ of all continuous functions from $$X$$ to $$Y$$. Clearly, if $$X$$ has the indiscrete topology and $$Y$$ has the discrete topology, then the only continuous functions are the constants.

Now come my questions:

1.) If $$X$$ is not indiscrete, is there always a non-constant continuous function?

2.) If $$Y$$ is not discrete, is there always a non-constant continuous function?

3.) If $$X$$ is not indiscrete and $$Y$$ is not discrete, is there always a non-constant continuous function?

It seems to be very hard to construct a non-constant continuous map just by knowing that there is one non-trivial open set in $$X$$ and/or one set in $$Y$$ not being open. But on the other hand I am not able to construct a counterexample.

Thanks in advance for all help!

• Related/duplicate? – Existence of non-constant continuous functions – Martin R May 29 '19 at 12:05
• By "the indescrete topology", do you mean the trivial topology (i.e. $\{X, \emptyset\}$)? – 5xum May 29 '19 at 12:05
• There is no nonconstant continuous function from $\Bbb R$ to $\Bbb R_{\text{cocountable}}$, where $\Bbb R_{\text{cocountable}}$ is the cocountable topology (countable complement topology). [proof: $f(\Bbb Q)$ is countable, hence closed in $\Bbb R_{\text{cocountable}}$. $f^{-1}(f(\Bbb Q))$ is a closed set containing $\Bbb Q$, hence equal to $\Bbb R$. $f^{-1}(f(\Bbb Q))=\Bbb R$ implies $f(\Bbb R)=f(f^{-1}(f(\Bbb Q)))\subseteq f(\Bbb Q)$, hence $f(\Bbb R)$ is countable. A countable, connected subset of $\Bbb R_{\text{cocountable}}$ must be a one-point set. Hence $f$ is constant.] – YuiTo Cheng May 29 '19 at 12:14
• Yes, that is what I mean by the indiscrete topology. – Daniel W. May 29 '19 at 12:17

Let $$X$$ be topology on $$\{1, 2, 3\}$$ with base of $$\{1\}, \{1, 2\}, \{1, 3\}$$ and $$Y$$ be any Hausdorff space.
Assume $$f(1) \neq f(2)$$. Take open $$U \subset Y$$ s.t. $$f(2) \in U$$, $$f(1) \notin U$$. Then $$2 \in f^{-1}(U)$$, $$1 \notin f^{-1}(U)$$, so $$f^{-1}(U)$$ is not open. So $$f(1) = f(2)$$.
Analogously, $$f(1) = f(3)$$, and so $$f$$ is constant.