[Math] why all constant functions are continuous.$?$

analysisgeneral-topology

I have read that if we let $(X, \tau_x)$ and $(Y, \tau_y)$ be topological spaces, and $f: X \rightarrow Y$ is constant, then f is continuous. Can anyone please explain why? I assume we must look at the preimage of the open sets in $(Y, \tau_y)$..?

Thanks in advance

Best Answer

If $f$ is constant then the preimage of any set is either empty or all of $X$, so it is open. Hence $f$ is continuous.

Related Question