Describe the groups of homomorphisms of abelian groups Let $G$ and $H$ be the abelian groups $G=\mathbb{Z}/30\mathbb{Z}\oplus\mathbb{Z}$ and $H=\mathbb{Z}/15\mathbb{Z}\oplus\mathbb{Z}/7\mathbb{Z}$. Determine the number of group homomorphisms from $G$ to $H$, that is, the number of elements of $Hom_{\mathbb{Z}}(G,H)$.
How do I find the mappings that could keep the operations from $G$ to $H$? Can I start to do it by separating the problem into $\mathbb{Z}/30\mathbb{Z}\to\mathbb{Z}/15\mathbb{Z}$ and $\mathbb{Z}\to\mathbb{Z}/7\mathbb{Z}$, and multiply them together?
Thank you very much!
 A: Hint: Let $A_i, 1 \leq i \leq n$ be a finite collection of abelian groups and let $B$ be another abelian group. Then $Hom(\oplus_{i=1}^n A_i, B)\cong \oplus_{i=1}^n Hom(A_i, B)$ and $Hom(B, \oplus_{i=1}^n A_i)\cong \oplus_{i=1}^n Hom(B, A_i).$
Using this we have $$Hom(G,H) \cong Hom(\mathbb Z/30\mathbb Z, \mathbb Z/15\mathbb Z) \oplus Hom(\mathbb Z/30\mathbb Z, \mathbb Z/7\mathbb Z) \oplus Hom(\mathbb Z, \mathbb Z/15\mathbb Z) \oplus Hom(\mathbb Z, \mathbb Z/7\mathbb Z).$$
Added: (1). To define a group homomorpshism $\phi: G_1 \to G_2,$ where $G_1$ is a cyclic group, it's enough to define on a generator of $G_1.$ In general, $Hom(\mathbb Z, m\mathbb Z, \mathbb Z/n\mathbb Z) \cong \mathbb Z/d\mathbb Z,$ where $d=gcd(m,n).$
(2). To find a homomorphism $\phi: \mathbb Z/30\mathbb Z \to \mathbb Z/15\mathbb Z,$ we need to find the possible images of $\bar 1$ (as noted above). Also note that, $|\phi (\bar 1)|$ must divide 30. Using the same argument it's easy to show that the only homomorphism $\mathbb Z/30\mathbb Z \to \mathbb Z/7\mathbb Z$ is the zero homomorphism.
