Now that we have some initial tools about CW complexes, it is time to prove one of the first really interesting results. It says that, basically, homotopy groups are enough to determine CW complexes up to homotopy equivalence—almost.

Theorem 1 (Whitehead) Suppose ${X, Y}$ are connected CW complexes. Suppose ${f: X \rightarrow Y}$ is a continuous map and $\displaystyle f: \pi_n(X, x_0) \rightarrow \pi_n(Y, f(x_0))$

is an isomorphism for any choice of ${x_0 \in X}$. Then ${f}$ is a homotopy equivalence.

It is important to note that this theorem does not to say that two CW complexes with the same homotopy groups are isomorphic! We will give examples of this in the sequel. Nonetheless, the more correct point is that the homotopy groups as functors are enough to detect homotopy equivalences among CW complexes.

I should, perhaps, note that the homotopy groups at different points of a path-connected space are isomorphic in a natural way. This point deserves more elaboration. But the point for now is that an ordinary (unpointed) homotopy equivalence between path-connected spaces induces isomorphisms in the homotopy groups.

The theorem can actually be proved with fairly elementary tools. We shall do so in this post.

The first thing to note is that we can assume ${f}$ is a cellular map. This follows because we can homotope ${f}$ to be cellular by the cellular approximation theorem.

Now we can factor ${f}$ into the composition $\displaystyle X \rightarrow M_f \rightarrow Y,$

where ${M_f}$ is the mapping cylinder of ${f}$; since ${f}$ is cellular, this is itself a CW complex (see below). Then the map ${i: X \rightarrow M_f}$ is an inclusion (in fact, an inclusion of a subcomplex) and the map ${M_f \rightarrow Y}$ is a homotopy equivalence. So it is sufficient to assume that ${f}$ is the inclusion of a subcomplex. In particular, we are reduced to proving:

Theorem 2 Let ${(Z, x_0) }$ be a subcomplex of the pointed CW complex ${(X, x_0)}$. Suppose ${Z \rightarrow X}$ induces isomorphims on all the homotopy groups at ${x_0}$. Then ${X}$ deformation retracts onto ${Z}$.

The proof

Alright. So we have the identity map ${1_X: X \rightarrow X}$. We want to homotope this to something taking values in ${Z}$, such that the homotopy doesn’t move on ${Z}$. This is precisely what a deformation retraction (some people add the prefix “strong”) is. This will be accomplished by the following compression lemma, which in turn is a corollary of the compression criterion a while back.

Lemma 3 (Compression lemma) Suppose ${Z \subset X}$ is a CW subcomplex, and ${(A, B)}$ any pair. Suppose ${f: (X, Z) \rightarrow (A, B)}$ is a map of pairs. Suppose moreover that for every dimension ${n}$ of an ${n}$-cell in ${X-Z}$, we have ${\pi_n(A, B) = 0}$ (at any basepoint in ${B}$). Then ${f}$ is homotopic relative to ${Z}$ to a map ${g}$ with ${g(X) \subset B}$.

So the condition is that ${(A, B)}$ have mild homotopic requirements. The conclusion is that we can homotope ${f}$ such that the image at the end lies in this smaller subspace ${B}$, but at all points the homotopy doesn’t move on ${Z}$. If these relative homotopy groups vanish, there is no obstruction to “compressing” ${f}$ into ${B}$.

Proof: The way to do this is, as is customary among CW arguments, cell by cell. Let us suppose inductively that we have homotoped ${f}$ such that ${X^{k}}$ lands inside ${B}$, and the homotopy is stationary on ${B}$. We will now homotope ${f}$ to get the ${k+1}$ skeleton inside ${B}$ while leaving the ${k}$-skeleton stationary.

Fix a ${k+1}$-cell ${e_{k+1}}$ in ${X^{k+1} - Z}$. Then the homotoped version of ${f}$, which I will call ${f_k}$, sends the boundary of ${e_{k+1}}$ into ${B}$ by assumption. So we have a map $\displaystyle (D^{k+1}, S^{k+1}) \rightarrow (A, B)$

from ${e_{k+1} \rightarrow X \stackrel{f_k}{\rightarrow} A}$. But by the compression criterion for homotopy groups, we know that this can be homotoped relative the boundary to a map ${e_{k+1} \rightarrow B}$. We apply this homotopy for all the ${k+1}$-cells at once to homotope ${f_{k+1}}$ so that the ${k+1}$-cells all have image lying in ${B}$; then we use the fact the inclusion ${X^{k+1} \rightarrow X}$ is a cofibration to extend the homotopy to ${X}$. In the end, we have homotoped ${f_{k}}$ to ${f_{k+1}}$ changing nothing on ${X^{k-1}}$.

So we can homotope ${f}$ such that each piece of the skeleton is taken care of. How do we get them all in? Well, we compose the homotopies $\displaystyle f \simeq f_1 \simeq f_2 \simeq \dots$

such that the first one is done in the time ${[0, 1/2]}$, the second in ${[1/2, 3/4]}$, and so on. Since the sequence ${f_1 \rightarrow f_2 \rightarrow \dots}$ becomes fixed eventually on any fixed finite subcomplex, this infinite composition is continuous. And in total, we get the homotopy from ${f}$ to something which has image landing in ${B}$. $\Box$

And now, it is time to prove the Whitehead theorem. As I said, it is really enough to take the case of the inclusion of a subcomplex, i.e. to prove the second incarnation of the Whitehead theorem. We have to show that if ${Z \rightarrow X}$ is the inclusion of a subcomplex whose relative homotopy groups vanish, then ${X}$ deformation retracts onto ${Z}$. This is now a direct consequence of the compression lemma. And that proves the Whitehead theorem—almost.

The loose end

Technically, I never showed one thing, namely that if ${f: X \rightarrow Y}$ is a cellular map between CW complexes, then the mapping cylinder ${M_f = (X \times I) \cup_f Y}$ is a CW complex. Let us do this now. First, it is a general and well-known fact that the product of two CW complexes is a CW complex. So ${X \times I}$ is a CW complex. And, from the construction, ${X = X \times \left\{0\right\}}$ is a subcomplex.

It’s the attaching that we have to check.

(Caution: The product of two CW complexes should not be given the product topology, but the “compactly generated” topology. This is because a CW complex has the W for weak: the topology is the weak topology on the skeleta. I don’t want to go into these technical details; consult a book on homotopy theory.)

Anyway, we have to show:

Lemma 4 Let ${X}$ be a CW complex and ${A \subset X}$ a subcomplex. Suppose ${f: A \rightarrow Y}$ is a cellular map (for ${Y}$ another CW complex). Then the space ${X \cup_f Y}$ is a CW complex.

Proof: We take as the cells the cells of ${X}$ not in ${A}$ and the cells of ${Y}$. This is kosher, because ${X-A}$ is the union of various cells, ${A}$ being a subcomplex. The reason we have to require ${f: A \rightarrow Y}$ to be cellular, though, is that the boundary of each ${n}$-cell has to be contained in a union of ${n-1}$-cells. $\Box$