Twist on a common problem. It is well-known that the following statement is false, using $G = G_1 = G_2$ and considering the subgroup $\{ (g,g) : g \in G \} \le G_1 \times G_2$:
For any groups $G_1$ and $G_2$, any subgroup of $G_1 \times G_2$ must be of the form $H_1 \times H_2$ for some subgroups $H_i \le G_i$.
Is there a way to characterize the pairs $(G_1,G_2)$ for which it is true?
Best Answer
To spill the beans: this happens if and only if both $G_1$ and $G_2$ are torsion groups, and for every $x\in G_1$ and $y\in G_2$, $\gcd(|x|,|y|)=1$.
Once you figure out the statement one can prove it directly, as I do below; but I arrived at it using my favorite "hammer" to deal with subgroups of $G_1\times G_2$, Goursat's Lemma. So I leave the development that led to the result below.
The subgroups of $G_1\times G_2$ are described by Goursat's Lemma. Each such subgroup corresponds to a $5$-tuple $(H_1,N_1,H_2,N_2,\varphi)$, where
Such a tuple corresponds to the subgroup $$\{ (x,y)\in G_1\times G_2\mid x\in H_1, y\in H_2, \varphi(xN_1)=yN_2\}.$$
So the question is: when will such a subgroup be equal to $H_1\times H_2$? That will happen if and only if $\varphi(xN_1)=yN_2$ for every $x\in H_1$ and every $y\in H_2$. This in turn means that $N_1=H_1$ and $N_2=H_2$.
If $G$ is a group, Let us denote by $\mathbf{HS}(G)$ the class of all groups that are isomorphic to a homomorphic image of a subgroup of $G$ (that is, isomorphic to $H/N$ for some $H\leq G$ and $N\triangleleft H$).
Thus, we have:
For finite groups, the condition is very strong:
Proof. Since the order of an element of $\mathbf{HS}(G)$ divides the order of $G$ when $G$ is finite, condition 2 implies condition 2 of the theorem. If $|G_1|$ and $|G_2|$ are not relatively prime, let $p$ be a prime dividing both, and let $x\in G_1$, $y\in G_2$ be elements of order $p$. The subgroup $\langle (x,y)\rangle$ is cyclic of order $p$ with both projections nontrivial, and so it is not of the form described in 1. $\Box$
Proof. 1. Let $x\in G_1$ be of infinite order. Let $y\in G_2$ be an arbitrary nontrivial element. Then there is a quotient of $\langle x\rangle$ isomorphic $\langle y\rangle$, and the conclusion follows from the theorem.
In summary the promised result:
This follows directly from the development done above, but here is a direct, constructive, elementary proof that does not invoke Goursat's Lemma.
Proof. For the "if" directly, if $S$ is a subgroup of $G_1\times G_2$ and $(x,y)\in S$, then since $\gcd(|x|,|y|)=1$ there exist $a$ and $b$ such that $a\equiv 0\pmod{|x|}$, $a\equiv 1\pmod{|y|}$, and $b\equiv 1\pmod{|x|}$, $b\equiv 0\pmod{|y|}$. Then $(x,y)^a = (e,y)$ and $(x,y)^b=(x,e)$, so both $(x,e)$ and $(e,y)$ are in $S$. Thus, $S=\pi_1(S)\times\pi_2(S)$.
For the "only if" clause, let $x\in G_1$ and $y\in G_2$; we must prove they are both torsion elements and their orders are relatively prime. Without loss of generality assume that $x\neq e$ (if both are trivial, they desired conclusion follows). Consider the group $H=\langle (x,y)\rangle$. Because $H=H_1\times H_2$ for some subgroups $H_1\leq G_1$ and $H_2\leq G_2$, we must have $(x,e)\in H$. So there exists an integer $k$ such that $(x,y)^k = (x^k,y^k)=(x,e)$. In particular, $y$ is of finite order that divides $k$; and $x$ is also of finite order and $k$ is congruent to $1$ modulo the order of $x$. That means that the order of $x$ is relatively prime to $k$, and hence to its divisor the order of $y$; so $x$ and $y$ are torsion elements and $\gcd(|x|,|y|)=1$, as claimed. $\Box$