Show that every homeomorphism of metric spaces maps connected components to connected components.
I come up with a proof, but I did not include the fact that homeomorphism is bijective:
Let $X$ and $Y$ are homeomorphic metric spaces and $f: X\rightarrow Y$ be such a homeomorphism. Further assume $S$ is a component in $X$, out goal is to show that $f(S)$ is a component in $Y$. Clearly, $f(S)$ is connected. It remains to show that $f(S)$ is indeed a maximal connected set, i.e. if $f(S) \subset U$ for some connected $U$, then $f(S) = U$. Assume the contrary that $U \neq f(S)$, then $S \subset f^{-1}(U)$. Note that $U$ is connected implies $f^{-1}(U)$ is connected. But it implies $S$, being a component in $X$, is contained in a connected set, contradicting to the assumption that $S$ is maximal. Thus, $U = f(S)$ and $f(S)$ is indeed maximal.
I have only made use of the fact that a homeomorphism is continuous. I assume that the above proof is not valid then? What's wrong with the above proof? Or did I unintentionally use the fact that $f$ is bijective?
Thanks in advance.
You used that $f^{-1}$ is continuous when you said "Note that $U$ is connected implies $f^{-1}(U)$ is connected." You took the image of a connected set under the continuous function $f^{-1}$..
It can be slightly simplified, showing: suppose $U$ is connected and $f[S] \subseteq U$, then $U = f[S]$. This holds as $f^{-1}[f[S]] = S \subseteq f^{-1}[U]$ (note the first step also uses bijectivity) and $f^{-1}[U]$ is connected (as $f^{-1}$ is continuous, as said) so $S = f^{-1}[U]$ by maximality of $S$, and so (again bijectivity) $f[S] = U$, done.