Let $(G, n)$ be a pair where $G$ is an abelian group and $n \in \mathbb{N}$. Recall that an **Eilenberg-MacLane space** is a connected CW complex $X$ such that $\pi\_r(X) = G$ if $r=n$ and $0$ otherwise. An Eilenberg-MacLane space is unique up to homotopy equivalence. A direct argument is given in Hatcher's book based on the Whitehead theorem (that a weak equivalence of CW complexes is a homotopy equivalence): one shows that there is always *an* Eilenberg-MacLane space of a given form (that starts with a wedge of $r$-spheres and then goes up). Then, one explicitly checks that given any Eilenberg-MacLane space, one can define a map from this one into the other one which induces an isomorphism on the homotopy group in dimension $n$, though. This relies on a particular construction of the Eilenberg-MacLane space, though.


Is there a more functorial way of seeing this?


One half of an approach is the following. We know that the Eilenberg-MacLane spaces represent the cohomology functors (with coefficients in $G$) on $CW\_\*$, the homotopy category of pointed CW complexes. This implies uniqueness.


But I don't think this is logically correct given the above constraint. Namely, the fact that *any* Eilenberg-MacLane space represents the cohomology functor relies, I think, on the fact that any two are homotopy equivalent. Namely, the proof I know of this fits the various $\{ K(G,n) \}$ into an $\Omega$-spectrum and then argues that they represent a cohomology theory which satisfies the dimension axiom, so is singular cohomology with coefficients. I don't see how it is obvious that *any* $K(G,n)$ can be fit into an $\Omega$-spectrum, though, without using the homotopy equivalence above.



Is there a functorial proof that Eilenberg-MacLane spaces are unique up to homotopy equivalence?
I think you're referring to the argument on page 366 of Hatcher. But there is an earlier argument for $n=1$ in Chapter 1B, which works just as well in general (as Eric Wofsey points out above).


Hatcher deduces



> 
> Theorem 1B.8: The homotopy type of a
>  CW complex $K(G,1)$ is uniquely
>  determined by $G$.
> 
> 
> 


from the following (which is the "functorial" perspective on Eilenberg-MacLane spaces):



> 
> Proposition 1B.9. Let $X$ be a
>  connected CW complex and let $Y$ be a
>  $K(G,1)$. Then every homomorphism
>  $\pi\_1(X,x\_0)\to \pi\_1(Y,y\_0)$ is
>  induced by a map $(X,x\_0)\to (Y,y\_0)$
>  that is unique up to homotopy fixing
>  $x\_0$.
> 
> 
> 


I won't spell out the details of the argument (you should just read pages 90–91 of Hatcher), but roughly, the proof of the proposition breaks up into the following steps.


1. There are no obstructions to defining the map on the 0-skeleton (send everything to the basepoint).
2. The map from $\pi\_1(X)$ to $\pi\_1(Y)$ tells you how to define the map on the 1-skeleton.
3. The fact that the map is a homomorphism means you can extend it to the 2-skeleton.
4. There are no obstructions to extending the map to the 3-skeleton, the 4-skeleton, etc., since any map of the boundary of a ≥3-cell (i.e. a ≥2-sphere) into $Y$ extends over the whole cell.
5. (For uniqueness) Any two such maps are homotopic on the 1-skeleton, since the map on $\pi\_1(X)$ is specified. This lets you extend any map of $X\times$$\{$$0,1$$\}$ to the 1-skeleton of $X\times [0,1]$. To extend to all of $X\times [0,1]$ and thus prove the maps are homotopic, apply Steps 3 and 4 again.


Once you understand this argument, I think it is definitely worth understanding for yourself why the same steps work for a general $K(G,n)$. The lemma you mention (Lemma 4.31, page 366) is exactly the higher-dimensional analogue of Step 3.


