[Math] Let $A\subset R^{n}$ . Then $A$ is disconnected iff there exists a continuous and surjective functon $f:A\to${0,1}

calculusgeneral-topologymetric-spacesreal-analysis

Let $A\subset R^{n}$ . Then $A$ is disconnected iff there exists a continuous and surjective function $f:A\to${0,1}

How can I prove this?
To prove $\rightarrow$, I know that if $A$ is disconnected, then there are two open, non empty and disjoint sets $U,V\subset R^n$ such that $A=U\cup V$ , $A\cap U \ne \emptyset $, $A\cap V \ne \emptyset$ and $A \cap U \cap V=\emptyset$ .

Then we define a function $f(x)=\begin{cases} 0, & x \in U \\ 1, & x \in V\\
\end{cases}$

We can see that this function is surjective because both sets are non empty and there is not an $x$ such that $f(x)=0$ and $f(x)=1$ (the sets are disjoint). Is this correct?

Then I don't know how to prove the continuity of $f$, I've tried using the fact that $f$ is continuous iff the inverse image of an open(closed) set is open(closed) in $A$, but I still struggle using the concepts of relative open and closed sets(my professor didn't explain them very well) so I don't know how to finish the proof.

Any help will be apprecciated, thanks.

Best Answer

The topology on $\{0,1\}$ is the discrete topology, i.e. all subsets are open.

Restrict $f$ to $A$. All you need to check that the preimage of each open set is open. It is clear for $\{0,1\}$ are $\emptyset$, and you have shown that $f^{-1}(\{1\})=V\cap A$ (which is open in the induced topology on $A$) and $f^{-1}(\{0\})=U\cap A$ (which is open in the induced topology on $A$). So you are actually done!

Related Question