Algebraic Topology Hatcher Chapter 3.1 Problem 13 The Problem: Let $\langle X, Y\rangle$ denote the set of basepoint-preserving homotopy classes of basepoint preserving maps $X\rightarrow Y$. Using Proposition 1B.9, show that if $X$ is a connected CW complex and $G$ is an abelian group, then the map $\langle X, K(G, 1)\rangle \rightarrow H^1(X;G)$ sending a map $f: X \rightarrow K(G, 1)$ to the induced homomorphism $f_*:H_1(x) \rightarrow H_1(K(G, 1))\approx G$ is a bijection, where we identify $H^1(X;G)$ with Hom$(H_1(X), G)$ via the universal coefficient theorem.
Notes: The universal coefficient theorem allows us to deduce that there is a surjective map $h:H^1(X;G) \rightarrow Hom(H_1(X), G)$. $K(G, 1)$ is any space whose fundamental group is isomorphic to $G$ and has contractible universal covering space. Proposition 1B.9 states: Let X be a connected CW complex and let $Y$ be a $K(G, 1)$. Then every homomorphism $\pi_1(X, x_0) \rightarrow \pi_1(Y, y_0)$ is induced by a map $(X, x_0) \rightarrow (Y, y_0)$ that is unique up to homotopy fixing $x_0$. The induced map in this problem probably comes from this proposition.
To prove that the map in the problem is bijective we can go for surjectivity and injectivity. Injectivity is obvious because if $f=g$ then $f_* = g_*$. I'm not sure how I would prove surjectivity though...
Thanks you!
 A: Suppose I have a map $f:X \rightarrow K(G,1)$, $X$ connected. Given a cellular map $S^k \rightarrow X$, $k>1$, I can consider the complex $X'$ obtained by attaching that cell. I can ask two questions: Can I extend $f$ to $X'$ and, if so, is this unique up to a homotopy relative $X$?
We can construct $K(G,1)$ as a cell complex with 2-skeleton given by a wedge of circles, one for each element of $G$, with disks attached via all relations in $G$. As well, any connected CW complex is homotopy equivalent to one with a 1-skeleton a wedge of circles, simply by contracting a maximal tree in the 1-skeleton. We can again replace by a homotopy equivalent complex to ensure that the 2-disks are attached via sequences of clockwise and counterclockwise loops around the circles in the 1-skeleton. This follows from our knowledge of the fundamental group of the wedge of circles.
The point of this is to make obvious how to define a map into a $K(G,1)$ given a homomorphism $\pi_1(X) \rightarrow K(G,1)$. Suppose we have $X$ following the conditions we just set out. Van Kampen tells us that the fundamental group of $X$ has presentation $\langle  e^1_i | \phi(e^2_j) \rangle$ where the $e^1$ are the 1-cells and the $\phi$ are the characteristic maps written as words corresponding to how they wrap around the 1-cells.
Now given a homomorphism $f:\langle  e^1_i | \phi(e^2_j) \rangle  \rightarrow K(G,1)$, we can define a map on the 2-skeleton of $X$ by sending the cell $e^1_i$ to $f(e^1_i)$ and the disk $e^2_j$ to the disk corresponding to the relation $\phi(e^2_j)$ because every 2-cell in $X$ corresponds to a relation in $\pi_1(X)$ that is preserved by $f$ since $f$ is a homomorphism.
Let us abuse notation and call this map $f:X^2 \rightarrow K(G,1)$, from the 2-skeleton to the $K(G,1)$. Now we can return to the question of the first paragraph. Pick a 3-cell attached via $\psi$, can we extend this map along this cell? Well we can extend $f$ over the 3-cell, if and only if, $f \circ \psi$ is nullhomotopic (this is exactly the universal property of the cone on a map). Well, the great part about $K(G,1)$ is that all the higher homotopy groups vanish. Hence, we have no obstruction to this extension. Similarly, we can extend cell by cell until we have extend $f$ to a map $f:X \rightarrow K(G,1)$ and cellular approximation tells us that since we haven't changed the 2-skeleton the map on fundamental groups are the same. This is surjectivity in your question.
Now the second question is could these extension have been homotopically different. Well, let's say I extend $f$ to $f': X \cup e^k \rightarrow K(G,1)$ and $f'':X \cup e'^k \rightarrow K(G,1)$. Having a homotopy relative $X$ between these two is exactly the information of a map $X \cup e^k \cup e'^k \cup e^{k+1} \rightarrow K(G,1)$,  where the $e^{k+1}$ is attached along the sphere $e^k \cup e'^k$, such that it restricts to $f'$ and $f''$ on the respective subcomplexes.
But this is just a version of the previous question! Now we wish to extend a map along a $(k+1)$-cell, which is again possible since the homotopy groups of the codomain vanish above 1.
So we see that the extension $f$ we came up with is homotopically unique, regardless of the choices we made. This almost gives us injectivity. All that is left is to check that any map $h:X \rightarrow K(G,1)$ can be homotoped to a map on 2-skeleton that coincides with how we defined the continuous function associated to $f: \pi_1(X) \rightarrow G$ because when it is in this form it can arise from extending the map on the 2-skeleton cell by cell, which we showed was homotopically unique.
First homotope $h$ so it is a cellular map. Then on the 1-skeleton this follows from the fact that if a $1$-cell is mapped around k 1-cells of $K(G,1)$ via $g_1 ^\pm \dots g_n ^\pm$ where $\pm$ denotes which way we wrap around the cell, the map restricted to this circle can be homotoped so that it is wrapped via the word $(\pm g_1) \dots (\pm g_n)$, where $\pm$ in front denotes whether we should take the inverse of $g_n$ or not. This follows from the fact that $(-g)g$ is a relation in $G$ and hence we add a disk along this relation in $K(G,1)$.
Presumably one could also argue directly for the 2-cells, but this would probably be gross. Instead we can resuse the above idea about extending maps again! We have shown that it is possible to homotope the map from the 2-skeleton so that 1-cells get wrapped around collections of 1-cells via words in $G$.
Consider $X^2 \times I$ and its subcomplex given by $(X^2 \times I) ^2$. The homotopy we just described gives a map from this subcomplex to $K(G,1)$ restricting to $f$ on $X^2 \times \{0\}$ and $g$ on $X^2 \times \{1\}$. Can we extend this map to all of $X^2 \times I$? Well the only thing left to add are 3-cells, and we both know that extending to 3-cells isn't an issue when the codomain is $K(G,1)$.
Hence, we have a homotopy from $g$ to $f$, on the 2-skeleton. By homotopy extension, we have a homotopy from $g$ defined on the whole $X$ to something that agrees with $f$ on the 2-skeleton. And now the homotopical uniqueness result from earlier implies injectivity.
