Why is $\operatorname{Hom}\left(\bigoplus_{\mathbb{N}} \mathbb{Z}, \mathbb{Z} \right) \simeq \prod_{\mathbb{Z}} \mathbb{Z}$? So I was working on a few exercises. Eventually I came across this isomorphism
$$\operatorname{Hom}\left(\bigoplus_{\mathbb{N}} \mathbb{Z}, \mathbb{Z} \right) \simeq \prod_{\mathbb{N}} \mathbb{Z}$$
and I was wondering if someone could help me understand this in detail. I have issues understanding the map itself and particularly seeing how such isomorphism (canonically) might look like. What's the obvious choice here (if there is any)?
Thanks for any help!
 A: Let $e_0=(1,0,0,...), e_1=(0,1,0,0,...), ...$ be the canonical free basis for $\bigoplus_\mathbb{N}\mathbb{Z}$. Define maps $$\phi:\prod_\mathbb{N}\mathbb{Z}\rightleftarrows\text{Hom}(\bigoplus_\mathbb{N}\mathbb{Z}, \mathbb{Z}):\psi$$ by $\phi(a_0, a_1, ...)=\{(x_0, x_1,...)\mapsto\sum_{i\in\mathbb{N}}x_ia_i\}_{(x_0,x_1,...)\in\bigoplus_\mathbb{N}\mathbb{Z}}$ and $\psi(f)=(f(e_0),f(e_1),f(e_2),...)$. Since elements of $\bigoplus_\mathbb{N}\mathbb{Z}$ have only finitely many non-zero entries, $\phi$ is well-defined, and it is easy to check that both $\phi$ and $\psi$ are $\mathbb{Z}$-module maps. Because an element of $\text{Hom}(\bigoplus_\mathbb{N}\mathbb{Z}, \mathbb{Z})$ is uniquely determined by its action on the basis elements $e_0, e_1, ...$, we see that $(\phi\circ\psi)(f)=f$, and it is also a straightforward calculation to see that $(\psi\circ\phi)(a_0, a_1, ...)=(a_0, a_1,...)$. Hence $\phi$ and $\psi$ are mutual inverses and thus isomorphisms.
A: Let $a = (a_1, a_2, ...) \in \prod_{\mathbb{N}}\mathbb{Z}$. Then define
$$\phi_a : \bigoplus_{\mathbb{N}} \mathbb{Z} \to \mathbb{Z}$$
in the obvious way (taking $(n_1, n_2, ...)$ to $\sum a_i n_i$ - which is a finite sum).
This defines a map
$$\prod_{\mathbb{N}} \mathbb{Z}\to \operatorname{Hom}\left(\bigoplus_{\mathbb{N}} \mathbb{Z}, \mathbb{Z} \right) $$
which you can check is a bijection (one nice way is to see if you can construct an inverse, hint: consider $\phi(0,..., 0, 1, 0,...)$).
A: In general, the universal property of the direct sum of abelian groups says that any homomorphism $f$ from $\bigoplus_{i\in I}A_i$ to an abelian group $B$ corresponds to a family of homomorphisms $\{f_i\colon A_i\to B\mid i\in I\}$. Thus, you automatically have that
$$\mathrm{Hom}\left(\bigoplus_{i\in I}A_i,B\right) \cong \prod_{i\in I}\mathrm{Hom}(A_i,B).$$
(Similarly, maps into the direct product correspond to families of maps into the factors, so $\mathrm{Hom}(B,\prod_{i\in I}A_i)\cong \prod_{i\in I}\mathrm{Hom}(B,A_i)$.)
So it just comes down to knowing that $\mathrm{Hom}(\mathbb{Z},\mathbb{Z})\cong \mathbb{Z}$.
