In an exercise I am asked to prove the following:
Prove that a continuous image of a path-connected space is path-connected.
So the first thing that came to mind was:
Let $f:(X,\tau) \to (Y,\tau_1)$ be continuous, and $(X,\tau)$ path connected. Then let $a,b \in Y$ such that $a \neq b$. Then let $a'\in f^{-1}(\{a\})$ and $b' \in f^{-1}(\{b\})$ such that $a' \neq b'.$ Because $(X,\tau)$ is path-connected there exists a path from $a'$ to $b'$ and then what I thought is based on that prove that there exists a path from $a$ to $b$. ´
But my question is: How do I know that $\exists a' \in X: f(a')= 0$, because we don't know if our function is surjective or not. Previously the book stated the following propertie:
Let $(X,\tau)$ and $(Y,\tau_1)$ be topological spaces and $f(X,\tau) \to(Y,\tau_1)$ surjective and continuous. If $(X,\tau)$ is connected then $(Y,\tau_1)$ is also connected.
Is the exercise that I'm trying to solve badly formulated or is indeed correct and the function does not need to be surjective?
The goal is not to prove that $Y$ is path-connected. Rather, it is to prove that $f(X)$ is path-connected. And then your approach works. That is, if $a,b\in f(X)$, there are $a',b'\in X$ such that $f(a')=a$ and thet $f(b')=b$. If $\gamma$ is a path in $X$ that goes from $a'$ to $b'$, then $f\circ\gamma$ is a path in $f(X)$ that goes from $a$ to $b$.