TITLE: $[K(\pi, n), K(\rho, n)] \cong \text{Hom}(\pi, \rho)$
QUESTION [5 upvotes]: For Abelian groups $\pi$ and $\rho$, what is the easiest way to see that $$[K(\pi, n), K(\rho, n)] \cong \text{Hom}(\pi, \rho)?$$My idea is the use the natural isomorphism$$[X, K(\rho, n)] \cong \tilde{H}^n(X; \rho)$$and universal coefficients, but I am stuck to that degree. Could anyone help?

REPLY [4 votes]: You need one additional tool, which is the Hurewicz theorem. Let me write $B^n A$ for $K(A, n)$. Then the Hurewicz theorem tells you that
$$A \cong \pi_n B^n A \cong H_n(B^n A, \mathbb{Z})$$
and then universal coefficients tells you that
$$H^n(B^n A, C) \cong \text{Hom}(H_n(B^n A, \mathbb{Z}), C) \cong \text{Hom}(A, C)$$
as desired. (Note that all we used was that $B^n A$ has first $n$ homotopy groups $0, 0, \dots A$; we don't use anything about its homotopy groups past degree $n$.)