[Math] Show that if $Y$ is path-connected, then the set $[I, Y]$ (the homotopy classes of maps from $I$ to $Y$) has a single element

algebraic-topologygeneral-topology

Show that if $Y$ is path-connected, then the set $[I, Y]$ (the set of homotopy classes of maps from $I$ to $Y$) has a single element.

Now I understand that there are two similar questions, here : Show that a set of homotopy classes has a single element and here : If $Y$ is path-connected, then there is only one homotopy class of maps $[0,1] \to Y$

Now in both questions both of the people who asked the question picked two continuous maps $f_1, f_2 : I \to Y$ and showed that $f_1 \simeq c \simeq f_2$ where $c$ was some constant map.

But I don't see why we can't just choose an arbitrary continuous function $f : I \to Y$ and show that $f \simeq c$ where $ c: I \to Y$ is some constant map, then we'd have thus shown that all continuous maps from $I$ to $Y$ are homotopic to $c$ (since $f$ was chosen arbitrarily) and thus we'd arrive at $[I, Y]= \{[c]\}$.

Best Answer

You can do this.

Note that the identity map on $I$ is homotopic to the constant map taking $I$ to $0$. Composing with $f$, $f$ is homotopic to the constant map taking $I$ to $f(0)$.

If $Y$ is path-connected and $y_0$ is your favourite point there, then there is a path from $f(0)$ to $y_0$. This induces a homotopy from the constant map taking $I$ to $f(0)$ and the constant map taking $I$ to $y_0$. Therefore $f$ is homotopic to the constant map taking $I$ to $y_0$.

One could replace $I$ by any contractible space in the foregoing.