TITLE: Does homotopy depend on function or the image?
QUESTION [7 upvotes]: I am just starting to read about algebraic topology, and I wonder whether homotopy depends on function or the image. According to Munkres' definition, two continuous function $f,g:[0,1]\to Y$ are said to be homotopic if there exists a continuous map $F:[0,1]\times[0,1]\to Y$ such that
$$F(0,x)=x_0$$
$$F(1,x)=x_1$$
$$F(x,0)=f(x)$$
$$F(x,1)=g(x)$$
Now if $f:[0,1]\to Y$ is a given continuous function, and $g:[0,1]\to f(X)$ is a surjective continuous function with the same end points as $f$. Is it necessary for $f$ and $g$ homotopic?

REPLY [8 votes]: No. Consider the case of the unit circle $S_1=\mathbb R/\mathbb Z$. The map $f(x)=x$ winds around the circle once, where $g(x)=x+x$ winds around the circle twice. They have the same image and the same endpoints, but are not homotopic.
A somewhat more general example is to take any curve not homotopic to the trivial curve. Then, construct a new curve which traverses that curve once, and then traverses it in reverse. The former isn't homotopic to the trivial curve, but the latter is.

REPLY [3 votes]: No. Consider the paths
$$
f: [0, 1] \to S^1 : t \mapsto (\cos 2 \pi t, \sin 2 \pi t)\\
g: [0, 1] \to S^1 : t \mapsto (\cos 4 \pi t, \sin 4 \pi t).
$$
These are both surjective onto the unit circle $S^1$, and have the same starting and ending points, but are not homotopic as paths in $S^1$. (They are homotopic as maps into $\mathbb R^2$, though!)