Here I mean the version with all but finitely many components zero.

2$\begingroup$ (Added for posterity): See also <mathoverflow.net/questions/38763/…> $\endgroup$ – Loop Space Sep 15 '10 at 8:06

$\begingroup$ Maybe this should be closed? $\endgroup$ – Sean Tilson Mar 26 '13 at 2:20

$\begingroup$ The same question was asked on math.stackexchange: math.stackexchange.com/questions/282268/… $\endgroup$ – Seirios Jun 27 '14 at 16:15
This is the swindle, isn't it?
There's an elegant way to phrase this with lots of sines and cosines, but working it all out is too much like hard work. Here's the quick and dirty way.
Let $T: S^\infty \to S^\infty$ be the "shift everything down by 1" map.
Then for any point $x \in S^\infty$, $T(x)$ is not a multiple of $x$ and so the line between them does not go through the origin. We can therefore define a homotopy from the identity on $S^\infty$ to $T$ by taking the homotopy $t x + (1  t)T(x)$ and renormalising so that it is always on the sphere (incidentally, although you are working in $\ell^0$, by talking about a sphere you implicitly have a norm).
Then we simply contract the image of $T$, which is a codimension 1 sphere, to a point not on it, say $(1,0,0,0,0,...)$. Again, we can use 'orrible sines and cosines, but renormalising the direct path will do.
(Incidentally, there's nothing special about which space you are taking the sphere in. So long as your space is stable in the sense that $X \oplus \mathbb{R} \cong X$ then this works)
Added a bit later: Incidentally, if you want to work in a space that doesn't support a norm (such as an infinite product of copies of $\mathbb{R}$) you can still define the sphere as the quotient of $X$ without the origin by the action of $\mathbb{R}^+$. The argument above still works in this case.
Added even later: Revisiting this in the light of the duplicate: Is $L^p(\mathbb{R})$ minus the zero function contractible?, the key property on $T$ is that it be continuous, injective, have no eigenvectors, and be not surjective. These conditions imply the following:
 injective ⟹ the endpoint of the homotopy is not the origin
 no eigenvalues ⟹ the homotopy does not pass through the origin en route
 not surjective ⟹ there is a point not in the image to which the image can be contracted
 continuous ⟹ the homotopy is jointly continuous
Finally, there's no difference between the sphere and the space minus a point (indeed, without a norm the "space minus a point" is easier to deal with). Indeed, the homotopy described here actually works on the "space minus a point" and is just renormalised to work on the sphere.
Kind of late to the party, but the (weak) contractibility follows from $\pi_i(S^\infty) = 0$ for $i>0$.

10$\begingroup$ Indeed. This follows from the fact that every compact subset is contained in some finite S^n, which then can be contracted in S^{n+1}. This sort of argument is more generally useful to show the contractibility of this sort of infinitedimensional object when it may be nonobvious how to write down a contraction explicitly. $\endgroup$ – Eric Wofsey Oct 11 '09 at 23:20
General fact: Let $A_{1} \subset \ldots A_n \subset \ldots$ be a filtration of cellular inclusions of $CW$ complexes. (More generally, let this be a filtration of cofibrations). Then $A_n$ contractible in $A_{n+1}$ $\implies$ $A:=\operatorname{colim}_n A_n$ is contractible. (Here $A$ is given the weak topology.)
Proof: Consider the composition $A_n \times I \xrightarrow{\text{contraction}} A_{n+1} \to A$. Since $A_n \to A$ is a cofibration, extend the above map to a map $A \times I \xrightarrow{\alpha_n} A$. The map $f: A\times I \to A$ defined by $f_t=\alpha_{n+1}(2^{n+1} t2^{n+1}+2)\circ\alpha_n(1)\circ\ldots\circ\alpha_1(1)$ for $1\frac{1}{2^n}\leq t \leq 1\frac{1}{2^{n+1}}$, is the required retraction. It is continuous because $f_t$ is continuous when restricted to each $A_n$ and obviously $f_a$ is continuous for all $a \in A$.
Now give $S^\infty$ the canonical $\mathbb{Z}/2$ equivariant cell structure (i.e. the pullback of the canonical cell structure on $RP^\infty$). The skeletal filtration satisfies the hypotheses of this general fact: $S^n \xrightarrow{i} S^{n+1}$ is null homotopic: $S^{n+1}$ can be given an $n$skeleton that is a point. By the cellular approximation theorem, the map $i$ is homotopic to one that factors through this particular $n$skeleton.
I guess this is more complicated than the other answers but this shows that a lot of other things are contractible too (like Milnor space).

$\begingroup$ This is just surprising. Can I suggest you to improve the notation? It is a bit confusing. $\endgroup$ – Ivan Di Liberti Nov 5 '17 at 17:30

$\begingroup$ Why the map $f$ reach just one point when $f_1$? It seems like in principle is just a sequence of points $x_n=\alpha_n(1)\circ \cdots \alpha_1(1)$ $\endgroup$ – Yotas Trejos Apr 24 '19 at 14:26
Another nice solution to a similar question is at http://katlas.math.toronto.edu/drorbn/index.php?title=07081300/the_unit_sphere_in_a_Hilbert_space_is_contractible:
Let $H=L^2([0,1])$ and define $S^\infty = \{x \in H : \x\=1\}$.
Claim. $S^\infty$ is contractible.
Proof. For any $t \in [0,1]$ and any $f \in H$ define $f_t(x)= f$ for $0<x<t$ and $f_t(x)=1$ for $t<x<1$. Observe that $t \mapsto f_t/\f_t\$ is continuous and gives the desired retraction to the point $f=1$.

$\begingroup$ Neat, even though this is contracting a different S^\infty. The argument can also be modified to contract the unit sphere in L^2(N) (where N is the set of natural numbers), a third version of S^\infty. $\endgroup$ – Anton Geraschenko Oct 9 '09 at 6:52

$\begingroup$ Should that f_t(x) = f should be f_t(x) = f(x)? $\endgroup$ – Loop Space Oct 9 '09 at 7:05

7$\begingroup$ One has to be careful in infinite dimensions with topology. This contraction does work, but proving that it is continuous takes a smidgen more work than simply saying that t > f_t/f_t is continuous. It needs to be jointly continuous in both f and t, which needs a line or two to show. It is not uniformly continuous in both f and t, though, which is why the obvious adaptation of this for the general linear group group only proves that that group is contractible in the weak topology, not the strong topology. Compare the length of Kuiper's theorem with that of Atiyah and Segal. $\endgroup$ – Loop Space Oct 9 '09 at 7:40
3 proofs on Wikipedia  basically the same arguments as above. The Hilbert space part is superfluous.
Here are my thoughts on the matter. However, this is not too much more than what is done above. I think...
$\quad$ We seek to show that a homotopy from the identity map of $S^{\infty}$ ($id_{S^{\infty}}$) to a constant map can be constructed and thus it must be nullhomotopic, $i.e.$, contractible. Let $T: S^\infty \to S^\infty$ be the "shift everything 'down' by 1" map given by $(x_1, x_2, x_3,...) \mapsto (0, x_1, x_2,...)$. Then for any point, $x$ and its image $T(x)$, the line between them does not go through the origin.
$\quad$ We can therefore define a homotopy from the identity on $S^\infty$ to T by taking a homotopy and renormalizing, so that it is always on the sphere, as follows. Let $f_t: \mathbb{R}^{\infty} \setminus 0 \rightarrow \mathbb{R}^{\infty} \setminus 0$ be given by
$$f_t(x_1,x_2,...) = (1t)(x_1, x_2,...) + tT(x_1, x_2,...).$$ (Note that the vector $f_0 = id_{\mathbb{R}^{\infty}}$ and that $f_t$ takes nonzero vectors to nonzero vectors $\forall t \in \left[ 0, 1\right]$.) Then we can renormalize it to ensure everything is still on $S^{\infty}$, $i.e.$, $$\frac{f_t}{\left f_t\right} = F(x,t) : S^{\infty} \times I \rightarrow S^{\infty}.$$ Thus we now have that $id_{S^{\infty}} \simeq T$. Or, in other words, $F$ gives a homotopy from the identity map of $S^{\infty}$ to the map $(x_1, x_2, x_3,...) \mapsto (0, x_1, x_2,...)$.
$\quad$ Then we simply contract the image of $T$ , which is a codimension 1 sphere, to a point not on it, say $(1,0,0,0,0,...) = N$ (north pole). So let $g_{t} : \mathbb{R}^{\infty} \setminus 0 \rightarrow \mathbb{R}^{\infty} \setminus 0$ be given by
$$g_t(x_1, x_2, ...) = (1t)(0, x_1, x_2,....) + t(1, 0, 0, ...).$$ Now observe that $g_0 = f_1$, $f_0 = id_{S^{\infty}}$, and $g_1 = N$ (a constant). Again we can renormalize to guarantee everything is still on $S^{\infty}$, $i.e.$, $$\frac{g_t}{\left g_t\right} = G(x,t) : S^{\infty} \times I \rightarrow S^{\infty}.$$ Furthermore, we have that $\frac{g_0}{\left g_0\right} = \frac{f_1}{\left f_1\right}$. Therefore, it follows that $T \simeq N$ ($G$ gives a homotopy from
$T$ to the north pole) and since the composition of homotopies is again a homotopy we have that $id_{S^{\infty}} \simeq N$. Hence the desired result follows and we conclude that $S^{\infty}$ is contractible.