Proposition $:$ $S^\infty$ is contractible.
Proof $:$ First define $f_t : \Bbb R^\infty \longrightarrow \Bbb R^\infty$ by $f_t(x_1,x_2,\cdots) = (1-t) (x_1,x_2,\cdots) + t(0,x_1,x_2,\cdots).$ This takes non-zero vectors to non-zero vectors for all $t \in [0,1],$ so $\frac {f_t} {|f_t|}$ gives a homotopy from the identity map of $S^\infty$ to the map $(x_1,x_2,\cdots) \mapsto (0,x_1,x_2,\cdots).$ Then the homotopy from this map to a constant map is given by $\frac {g_t} {|g_t|}$ where $g_t(x_1,x_2,\cdots) = (1-t) (0,x_1,x_2,\cdots) + t(1,0,0,\cdots).$
This proof is given in my lecture note and it is copied from Hatcher's book. I don't understand the construction of the homotopy. I know that a topological space $X$ is contractible if there exists $x_0 \in X$ such that $Id_X \simeq C_{x_0},$ where $C_{x_0}$ is the constant function taking every element of $X$ to the specific point $x_0.$ Here $X = S^{\infty}.$ So the homotopy $H$ should be defined on $S^{\infty} \times I$ and should take values in $S^{\infty}.$ But instead it is defined on $\Bbb R^{\infty} \times I.$ I don't understand what's going here? Why are we taking $\Bbb R^{\infty}$ here and exploiting convexity of the space? Can anybody please shed some light on it? Any suggestion regarding this will be warmly appreciated.
Thanks in advance.