# Image of a connected space under a continuous map is connected, proof

In Munkres' Topology there is a theorem which states that the image of a connected space under a continuous map is connected.

In the proof of this, they let $f: X \rightarrow Y$ be continuous, where $X$ is connected, and prove that $Z = f(X)$ is connected. It says that since the restricted map to $Z$ is also continuous, it suffices to consider $g: X \rightarrow Z$. Supposing that $Z = A \cup B$ is a separation, then $g^{-1}(A)$ and $g^{-1}(B)$ are disjoint nonempty open sets whose union is $X$. And then they form a separation of $X$ which is contradicting the fact that $X$ is connected.

So here is my question: The reason we know that $g^{-1}(A)$ and $g^{-1}(B)$ are nonempty is because $g$ is a surjection (according to the book). But how do we know for sure that $g$ is a surjection? We are told that $f$ is continuous and that $g$ is a restriction to $Z$, but what if $f$ is injective, couldn't $g$ be injective as well?

• That $Z=A\cup B$ is a separation of $Z$ means that $A$ and $B$ are disjoint. This implies $g^{-1}(A)$ and $g^{-1}(B)$ are disjoint, regardless of whether $g$ is a surjection. Rather, the surjectivity of $g$ is needed to conclude $g^{-1}(A)$ and $g^{-1}(B)$ are non-empty. May 13 '17 at 21:02
• We know that $g$ is surjective by definition, because it is the restriction of $f$ to its image. May 13 '17 at 21:02
• Yes, I meant to write nonempty but for some reason wrote disjoint instead. My bad. May 13 '17 at 21:12
• It is not quite clear to me why $g$ must be surjective because it is a restriction of $f$ to its image. May 13 '17 at 21:14
• @frej.mh A function $f\colon X\to Y$ is surjective if for all $y\in Y$ there exists an $x\in X$ such that $f(x) = y$, that is $y$ is in the image of $f$. A function only fails to be surjective if there is something in its codomain that is not in its image, so if we restrict to the image that can't happen. May 13 '17 at 21:32

To say that $Z=f(X)$ means that $Z = \{f(x) \,|\, x \in X\}$. The restriction of the function $f : X \to Y$ to the subset $Z \subset Y$ is the function $g : X \to Z$ defined by $g(x)=f(x)$ for all $x \in X$ (sometimes this is called a "range restriction", as opposed to the usual notion of restriction which might be called a "domain restriction").

If we take any element $z \in Z$, then applying the definition of $Z$ we have $z=f(x)$ for some $x \in X$, and then applying the definition of $g$ we have $z=g(x)$. In other words, for each $z \in Z$ there exists $x \in X$ such that $g(x)=z$. This is exactly what it means for the function $g$ to be surjective.

By the way, $g$ might well be injective, but you asked about surjectivity which is different than (and logically independent from) injectivity.

$g^{-1}(A)$ and $g^{-1}(B)$ are disjoint because $A$ and $B$ are disjoint.

Usually when we speak of restricting a function, we mean taking a subset of the domain of a function. I do not know what you call it when you change the target (codomain) of funtion to the image of the function.

In any case, if you change the target of a function to its image, then the new function (sure looks like the old one) will always be surjective.

So your function is surjective onto its image (with subspace topology) by definition. Of course it could be injective as well, but that does not change the claim that connected sets go to connected sets.