# Image of a disconnected set is disconnected

I'm aware that the image of a connected set is connected and the preimage of a disconnected set is disconnected. However, I'm struggling to find an example of a disconnected set such that the image of the disconnected set is also disconnected. Can the preimage of a connected set be disconnected?

HINT: I assume that you want $f$ to be continuous. Consider the function $f:\Bbb R\to\Bbb R:x\mapsto x^2$. What is the image of $\{-1,1\}$? What is the pre-image of $[1,2]$?
• Image of $\{-1,1\}$ is connected, should we take $\{0,1\}$ instead? – Akash Gaur Jun 24 '20 at 16:07
If $$f:X \to Y$$ is continuous, then the contrapositive of $$A$$ connected $$\implies f(A)$$ connected is $$f(A)$$ disconnected $$\implies A$$ disconnected. Pre-image of a disconnected set is disconnected is incorrect, eg. let $$f:\mathbb R \to \mathbb R$$ be the constant zero function, then the pre-image of $$\{0,1\}$$ is connected.
For the other examples, take the image of $$\{0,1\}$$ under the identity function on $$\mathbb R$$ and the pre-image of $$\{0\}$$ under the constant zero function $$f:\{0,1\} \to \mathbb R$$ under the subspace topology of $$\mathbb R$$.