# Under what conditions should a sub-group of a direct sum, itself be a direct sum?

This is a question I'm struggling a couple of days with:

Let $G_1,G_2$ be abelian groups, and let $H$ be a subgroup of $G:=G_1\oplus G_2$. Under what conditions must $H$ be a group of the form $H_1\oplus H_2$, where $H_1$ is a subgroup of $G_1$ and $H_2$ is a subgroup of $G_2$?

Obviously, this is not true for any pair of abelian groups, as can be seen by the example:

$$G_1 := \mathbb{Z}_2 ,\ \ G_2 := \mathbb{Z}_2, \ \ H := \{(0,0), (1,1)\}$$

The motivation behind this question comes from this question about the minimal size of a set that generates a finite abelian group.

• $(1,1)$ does not belong to $\mathbb{Z}_1\oplus \mathbb{Z}_2$. – David P Jan 31 '14 at 20:59
• @DavidPeterson Corrected. – SomeStrangeUser Jan 31 '14 at 21:11

In the case of finite groups, you need $G_{1}$ and $G_{2}$ to be of coprime orders.
If the order are coprime, say $n_{i} = \lvert G_{i} \rvert$, then a subgroup $H$ is the product of $H^{n_{2}} \le G_{1}$ and $H^{n_{1}} \le G_{2}$. Basically because there are $a_{i}$ such that $a_{1} n_{1} + a_{2} n_{2} = 1$, so if $h \in H$, then $$h = (h^{a_{2}})^{n_{2}} (h^{a_{1}})^{n_{1}} \in H^{n_{2}} \times H^{n_{1}}.$$
If the are not coprime, say the prime $p$ divides the order of both, and $a_{i}$ is an element of order $p$ of $G_{i}$, then $\langle (a_{1}, a_{2}) \rangle$ is a subgroup of order $p$ intersecting both $G_{1}$ and $G_{2}$ trivially.