Is $\text{Hom}(A\oplus B, G) = \text{Hom}(A, G)\oplus \text{Hom}(B, G)$ true? I'm reading Hatcher's Algebraic Topology, and in the proof of the Universal Coefficients Theorem (Page 192), it says for abelian groups $A$ and $B$, and an arbitrary group $G$, we have $\text{Hom}(A\oplus B, G) = \text{Hom}( A, G)\oplus \text{Hom}( B, G)$.
Is that true?
Take $A = B = \mathbb{N}$ and the $G$ the free product $\mathbb{N} * \mathbb{N}$. What is the corresponding map between $\text{Hom}( A\oplus B, G)$ and $\text{Hom}( A, G)\oplus \text{Hom}(B, G)$?
Thanks.
 A: If $A,B$ are groups, then $A \times B$ is the product in the category of groups, meaning that $\hom(-,A \times B) \cong \hom(-,A) \times \hom(-,B)$. But we also have a description of the covariant hom functor $\hom(A \times B,-)$. Namely:
$$\hom(A \times B,G) \cong \{f \in \hom(A,G),g \in \hom(B,G) : \forall a \in A, b \in B(f(a) \text{ commutes with } g(b))\}$$
It is easy to write down maps in both directions and to show that they are inverse to each other. One uses that $(a,b)=(1,b)(a,1)=(a,1)(1,b)$ in $A \times B$.
If $G$ is abelian, then the commutation condition becomes superfluous, so that $\hom(A \times B,G) \cong \hom(A,G) \times \hom(B,G)$.
If $G$ is not abelian, this is not (always) the case, even if $A,B$ are abelian. In fact, $\hom(A,-) \times \hom(B,-) \cong \hom(A * B,-)$, where $A * B$ is the coproduct of $A,B$ in the category of groups (unfortunately known as "free product"), and the natural map $A * B \to A \times B$ is surjective but no isomorphism when $A,B$ are non-trivial: If $a \in A, b \in B$ are $\neq 1$, then $aba^{-1} b^{-1}$ lies in the kernel. Actually the kernel is generated, as a normal subgroup, by these elements - this follows from the isomorphism above and the Yoneda Lemma.
A: Yes, that's true (if we interpret the $=$ to mean natural isomorphism).
To describe the map $\text{Hom}(A,G)\oplus\text{Hom}(B,G)\to \text{Hom}(A\oplus B,G)$, suppose we have $f\in\text{Hom}(A,G)$ and $g\in\text{Hom}(B,G)$. Define a map $h\in\text{Hom}(A\oplus B,G)$ by $h(a,b) = f(a) + g(b)$. I'll leave it to you to check that the map $(f,g)\mapsto h$ is an isomorphism.
Also, note that $\mathbb{N}$ is not an abelian group, it's only a commutative monoid. Maybe you meant to use $\mathbb{Z}$ in your example? But also $\mathbb{Z}*\mathbb{Z}$ is not an abelian group. The free product of two groups is never abelian (unless one of the groups is trivial).
