Let $X, Y$ be topological spaces and $f: X\to Y$ continuous. Show that $f$ maps connected sets onto connected sets.
I am not sure if I understand the definition of a connected set right. Our definitions are as follows:
A topological space $X$ is "connected" if $\emptyset$ and $X$ are the only sets, which are closed and open in $X$.
A subset of a topological space is "connected" if it is "connected" with regards to the subspace topology.
Therefor a set $A\subseteq X$ is connected, if $A$ and $\emptyset$ are the only closed and open ("clopen") sets with regards to the subspace topology?
Now for the proof:
Let $\emptyset\neq A\subset X$ be connected. Therefor $A$ is not clopen with regards to the subspace topology.
I have to show, that $f(A)$ is not clopen with regards to the subspace topology.
Suppose $\emptyset\neq f(A)\subset Y$ is clopen. Since $f$ is continuous the preimage of open and closed sets is open and closed. Hence $A$ is clopen. Which contradicts the assumption.
Is this correct? Thanks in advance.