# $H_1\times H_2 <G_1\times G_2 \Rightarrow H_1<G_1, H_2<G_2$?

Let $H_1, H_2, G_1, G_2$ be groups. Clearly if $H_1<G_1$ and $H_2<G_2$, then $H_1\times H_2<G_1\times G_2$.

I'm wondering if the converse statement is true. I'm quite sure it's not. Can you find a counterexample?

If you consider the external direct product, then the converse is true: Let $a, b \in H_1$, then $(a, 1), (b,1) \in H_1 \times H_2$. Then $(ab^{-1},1) =(a,1)(b,1)^{-1} \in H_1 \times H_2)$, and $ab^{-1} \in H_1$, which implies $H_1$ is a subgroup, and $H_1 \le G_1$. Similarly for $H_2 \le G_2$.
If you consider internal direct product, it is not true: Let $G=\{1,a,b, ab\}$, the elementary abelian group of order 4. Write $G_1=<a>$, $G_2= <b>$, then $G=G_1 \times G_2$. Let $H_1=\{1, ab\}$, $H_2=1$. Note $H_1H_2=H_1\times H_2 \le G_1\times G_2$, but $H_1 \not \le G_1$ or $G_2$.
I call $e_1$ the unit of group $G_1$ and $e_2$ the unit of group $G_2$. Because $H_1\times H_2$ is a subgroup of $G_1\times G_2$, we must have $(e_1, e_2)\in H_1\times H_2$, so $e_i\in H_i$ for both $i$.
Now take $h,k\in H_1$. We know $(h,e_2), (k, e_2)\in H_1\times H_2$ so we have the product $(hk, e_2)\in H_1\times H_2$ and therefore $hk\in H_1$. Can you continue from here?
It depends even on the very construction of products and the notion of natural inclusion. For example is $A\times (B\times C)=(A\times B)\times C$ or merely $A\times (B\times C)\cong(A\times B)\times C$? Is $A\times B<A\times (B\times C)$? If yes, this easily leads to a counterexample.
The subgroup $\;\langle (1,1)\rangle=\{(0,0)\,,\,(1,1)\} \le \Bbb Z_2\times\Bbb Z_2\;$ can be taken as $\;\langle (1,1)\rangle\times\{0\}\;$ , and the first factor isn't a subgroup of $\;\Bbb Z_2\;$ , of course...