In homotopy theory (a branch of mathematics), the Whitehead theorem states that if a continuous mapping f between topological spaces X and Y induces isomorphisms on all homotopy groups, then f is a homotopy equivalence provided X and Y are connected and have the homotopy-type of CW complexes. This result was proved by J. H. C. Whitehead in two landmark papers from 1949, and provides a justification for working with the CW complex concept that he introduced there.
More accurately, we suppose given CW complexes X and Y, with respective base points x and y. Given a continuous mapping
such that f(x) = y, we consider for n ≥ 0 the induced homomorphisms
where πn denotes for n ≥ 1 the n-th homotopy group. For n = 0 this means the mapping of the path-connected components; if we assume both X and Y are connected we can ignore this as containing no information. We say that f is a weak homotopy equivalence if the homomorphisms f* are all isomorphisms. The Whitehead theorem then states that a weak homotopy equivalence, for connected CW complexes, is a homotopy equivalence.
Spaces with isomorphic homotopy groups may not be homotopy equivalent 
A word of caution: it is not enough to assume πn(X) is isomorphic to πn(Y) for each n ≥ 1 in order to conclude that X and Y are homotopy equivalent. One really needs a map f : X → Y inducing such isomorphisms in homotopy. For instance, take X= S2 × RP3 and Y= RP2 × S3. Then X and Y have the same fundamental group, namely Z2, and the same universal cover, namely S2 × S3; thus, they have isomorphic homotopy groups. On the other hand their homology groups are different (as can be seen from the Künneth formula); thus, X and Y are not homotopy equivalent.
The Whitehead theorem does not hold for general topological spaces or even for all subspaces of Rn. For example, the Warsaw circle, a subset of the plane, has all homotopy groups zero, but the map from the Warsaw circle to a single point is not a homotopy equivalence. The study of possible generalizations of Whitehead's theorem to more general spaces is part of the subject of shape theory.
Generalization to model categories 
In any model category, a weak equivalence between cofibrant-fibrant objects is a homotopy equivalence.
- J. H. C. Whitehead, Combinatorial homotopy. I., Bull. Amer. Math. Soc., 55 (1949), 213–245
- J. H. C. Whitehead, Combinatorial homotopy. II., Bull. Amer. Math. Soc., 55 (1949), 453–496
- A. Hatcher, Algebraic topology, Cambridge University Press, Cambridge, 2002. xii+544 pp. ISBN 0-521-79160-X and ISBN 0-521-79540-0 (see Theorem 4.5)