TITLE: homotopic maps?
QUESTION [5 upvotes]: For cell complexes, Whitehead's theorem says that a weak homotopy equivalence is an actual homotopy equivalence. More generally, if I have two maps between cell complexes which agree on homotopy groups, are they homotopic?

REPLY [11 votes]: This is not something that is generally true.  In particular, if one map is taken to be trivial, you would get the statement "Maps between cell complexes inducing zero on all homotopy groups are nulhomotopic".
As a quick counterexample, consider homotopy classes of maps between the Eilenberg-MacLane spaces $\Bbb CP^\infty = K(\Bbb Z, 2) \to K(\Bbb Z, 4)$.  Such maps necessarily induce trivial maps on all homotopy groups.  However, this set is also a natural description of $H^4(\Bbb C P^\infty) \cong \Bbb Z$.
More generally, let $X$ be an infinite-dimensional complex with $n$-skeleton $X^n$.  Then the set $\lim^1 [\Sigma X^n, Z]$ is in correspondence with homotopy classes of maps $X\to Z$ whose restriction to $X^n$ are nulhomotopic for all $n$.  (These are sometimes called phantom maps.)  This condition implies that these maps induce the zero map on all homotopy, homology, and cohomology groups.  This can be used to show that there are uncountably many nontrivial maps $\Bbb C P^\infty \to S^3$.  The argument is due to Brayton Gray and can be found in in 1.2.4 of May and Ponto's More Concise Algebraic Topology  
Note that if you limit yourself to finite cell complexes, then the stable homotopy version of your statement is the still-open Freyd Generating Hypothesis.