TITLE: If two CW complexes have isomorphic homotopy groups, are they homotopy equivalent?
QUESTION [9 upvotes]: I denote with $\pi_{i}$ i-homotopy group. If I have $X,Y$ CW-complex and $\pi_{i}(X)=\pi_{i}(Y)$ for all $i$. Can I say that $X$ and $Y$ are homotopic equivalent? What type of equivalence is it?

REPLY [14 votes]: You cannot say that $X$ and $Y$ are homotopy equivalent if $\pi_i(X) = \pi_i(Y)$ for all $i$. This is because the definition of homotopy equivalence requires that there is some continuous map $f: X \longrightarrow Y$ that is invertible up to homotopy. Hence the isomorphisms $\pi_i(X) \cong \pi_i(Y)$ need to be induced by such a homotopy equivalence $f$.
The standard counterexample is $X = S^2 \times \Bbb R P^3$ and $Y = S^3 \times \Bbb R P^2$. These groups have isomorphic homotopy groups (this follows from the fact that they both have fundamental group $\Bbb Z/2$ and universal cover $S^2 \times S^3$), but $H_5(X) \cong \Bbb Z$ and $H_5(Y) \cong 0$ as $X$ is compact and orientable but $Y$ is compact and nonorientable. Homotopy equivalent spaces have isomorphic homology groups, so we see that $X$ and $Y$ in this example could not possibly be homotopy equivalent.