[proofplan]
Given any two points in $Y$, we lift them to $X$ via the surjection, connect the lifts by a path in $X$ (using path-connectedness of $X$), and push forward by $f$ to obtain a path in $Y$. The composition of continuous maps is continuous, so the result is a continuous path in $Y$ between the two chosen points.
[/proofplan]
custom_env
admin
[step:Lift two arbitrary points of $Y$ to $X$ and connect them by a path]Let $y_1, y_2 \in Y$. Since $f: X \to Y$ is surjective, there exist points $x_1, x_2 \in X$ with $f(x_1) = y_1$ and $f(x_2) = y_2$. Since $X$ is path-connected, there exists a continuous map
\begin{align*}
\gamma: [0,1] &\to X
\end{align*}
with $\gamma(0) = x_1$ and $\gamma(1) = x_2$.[/step]
custom_env
admin
[guided]The surjectivity hypothesis is consumed here: without it, we cannot guarantee the existence of preimages $x_1, x_2$. If $f$ were merely continuous (not surjective), we would only know that $f(X) \subset Y$ is path-connected — not that all of $Y$ is. The theorem as stated concerns $Y$ itself, so surjectivity is essential.[/guided]
custom_env
admin
[step:Push forward by $f$ to obtain a path in $Y$]Define the composition
\begin{align*}
f \circ \gamma: [0,1] &\to Y \\
t &\mapsto f(\gamma(t)).
\end{align*}
Since $\gamma: [0,1] \to X$ is continuous and $f: X \to Y$ is continuous, the composition $f \circ \gamma: [0,1] \to Y$ is continuous. Moreover,
\begin{align*}
(f \circ \gamma)(0) &= f(\gamma(0)) = f(x_1) = y_1, \\
(f \circ \gamma)(1) &= f(\gamma(1)) = f(x_2) = y_2.
\end{align*}
Therefore $f \circ \gamma$ is a path in $Y$ from $y_1$ to $y_2$. Since $y_1$ and $y_2$ were arbitrary points of $Y$, the space $Y$ is path-connected.[/step]
custom_env
admin
[guided]The argument is structurally identical to the proof that the [Continuous Image of a Connected Space is Connected](/theorems/296), but even more direct: there is no contradiction argument needed. Path-connectedness has a constructive character — to show two points are connected, produce a path — whereas connectedness requires ruling out all possible separations.
Note that the path $f \circ \gamma$ need not be injective or even surjective onto any particular subset of $Y$. We only need its endpoints to be $y_1$ and $y_2$ and its domain to be the interval $[0,1]$.
The surjectivity assumption cannot be weakened to mere continuity. For example, the inclusion map $\iota: \{0, 1\} \hookrightarrow \mathbb{R}$ (with $\{0,1\}$ discrete) is continuous, and $\{0, 1\}$ is not path-connected. Of course here $\{0,1\}$ is not path-connected either, but the point is that $\iota$ is not surjective, so even if the domain were path-connected, we could only conclude that $\iota(\{0,1\}) = \{0,1\}$ is path-connected — not that $\mathbb{R}$ is. (In this case $\mathbb{R}$ happens to be path-connected for other reasons.)
More precisely, the theorem applied without surjectivity gives: if $X$ is path-connected and $f: X \to Y$ is continuous, then $f(X)$ is path-connected (in the subspace topology inherited from $Y$). The proof is identical — we simply replace $Y$ by $f(X)$ throughout, and surjectivity onto $f(X)$ is automatic.[/guided]