# Maps between Eilenberg–MacLane spaces

I was re-reading an algebraic topology book the other day, and I came across the following problem:

Suppose that $\pi$ and $\rho$ are abelian groups and $n\geq 1$. Determine $[K(\pi,n),K(\rho,n)]$, the set of (based) homotopy classes of maps between the corresponding Eilenberg-MacLane spaces.

I believe that the following is a solution: We have two functors $K(-,n)$ from (discrete) abelian groups to (the homotopy category of nice) topological spaces, and $\pi_n = [S^n,-]$ going the other direction. When we suitably restrict these functors, they appear to be inverses. Therefore $[K(\pi,n),K(\rho,n)]\cong \hom_{Ab}(\pi,\rho)$

I have two questions. Is the solution correct, or are there errors in the logic? If it does work, is there a way to make it completely transparent that the functors are inverse to each other? And if it is correct, if we suitably topologize $\pi_n(-)$, does this extend to non-discrete topological groups?

Second, is there a different way to approach the problem which better illuminates what is going on or illustrates an important point about $K(\pi,n)$?

-
@Grigory M: I mean that if we restrict to the (full sub-)category of CW complexes with homotopy groups concentrated in degree $n$ and discrete abelian groups, the two functors seem to induce inverse equivalences, if I am thinking about things correctly. – Aaron Jun 4 '11 at 7:05
It's certainly true, but this statement is exactly equivalent to the problem you quote. You can't prove it... well, without doing something :-) – Grigory M Jun 4 '11 at 7:08
I mean, it has an obvious part: $\pi_n\circ K(-;n)\cong Id$; but the part $K(-;n)\circ\pi_n\cong Id$ relies on the problem. – Grigory M Jun 4 '11 at 7:10

Recall that $[X,K(G,n)]=H^n(X;G)$. Hence $[K(\pi,n),K(\rho,n)]=H^n(K(\pi,n);\rho)$ — which (by Hurewicz theorem + universal coefficients) is exactly $\hom(\pi,\rho)$.

-
Thanks. I had come up with the first part of this, and then thought, "I wish I could use Hurewicz here, but coefficients and cohomology. Oh well," and promptly abandoned the line of reasoning. However, I know that isn't the only way to do the problem, because in the book it appears before they introduce cohomology at all. Is there a good way that uses less technology? – Aaron Jun 4 '11 at 16:30
I don't know. Some obstruction theory proof, perhaps?.. Anyway, let me give a warning: if you find an easy proof, check that it doesn't "prove" that, say, $[\mathbb T^2,S^2]\to\hom(\pi_1(\mathbb T^2),\pi_1(S^2))=0$ is injective. – Grigory M Jun 4 '11 at 16:59

Here is a sketch of an alternate proof that does not invoke representability of $H^n$.

First, if $\langle g_1, \dots \mid r_1, \dots\rangle$ is a presentation for $G$, we can find a CW complex with $\pi_k(X) = 0$ for $k < n$ and $\pi_k(X) = G$, as follows. First, by looking at the relative homotopy groups, one sees rather easily that $\vee_S S^n$ has $\pi_n$ free abelian on $|S|$ generators. So wedge on a sphere for every generator of the group. Now add an $(n+1)$-cell whose attaching map is $r_1$; relative homotopy LES again (+ excision) shows that this kills the given relator and only the given relator. Now do this for every relation, and then glue on higher cells to kill off higher homotopy groups. This is a construction of $K(G,n)$.

Now for a homomorphism $\varphi: G \to H$, let's construct a continuous map $f_\varphi: K(G,n) \to K(H,n)$ inducing that map on homotopy groups. The construction here is rather obvious: send the $n$-cells to wherever the generators go under $\varphi$; the assumption that $\varphi$ is a homomorphism means that you can extend this map continuously over the $(n+1)$-cells; and the fact that $\pi_k(K(H,n)) = 0$ for $k>n$ means you can extend it continuously over the $(k+1)$-cells.

Now given two maps that both induce $\varphi$, I want to find a map $K(G,n) \times I \to K(H,n)$ that extends them. Putting the obvious cell structure on $K(G,n) \times I$, first extend across the new $(n+1)$-cells by finding a homotopy between the maps from the $S^n$s (which is true by the assumption that they both induce the same map on $\pi_n$); now for the higher cells, the story is the same as before: because $\pi_k(K(H,n)) = 0$ for $k>n$, we can automatically extend them.

Note that I needed an explicit model for $K(G,n)$ here, but not for $K(H,n)$. By Whitehead this implies that if $K'$ is another CW complex model for $K(G,n)$, the two spaces are homotopy equivalent (and otherwise are weakly so); hence the same answer applies no matter what model I pick for $K(G,n)$.

-