Showing that a group $G$ with two distinct, normal subgroups of index $p$ has order $p^2$

A friend of mine and I were working together to solve this exercise:

Let $G$ be a group, and $p$ a prime number. Let $H, K$ be normal subgroups of $G$. Suppose that $|G:H| = |G:K| = p$, and that $H\cap K = \{1\}$. Show that $G\simeq\mathbb{Z}_p\times\mathbb{Z}_p$.

We thought that the quickest way to solve it was showing that $G$ has exactly $p^2$ elements.

For that purpose, we first tried to prove that $|G|\leq p^2$. We chose $a,b\in xH\cap yK$, that are two elements of $G$ belonging to the intersection of a coset of $H$ with a coset of $K$. This means that $a = xh$ and $b=xh'$ for some $h,h'\in H$ and for some $x\in G$ (because $a,b\in xH$). Similarly, $a=yk$ and $b=yk'$, for some $k,k'\in K$ and for some $y\in G$ (because $a,b\in yK$).

Then, $$xh=yk\implies hk^{-1}=x^{-1}y$$ and $$xh'=yk'\implies h'k'^{-1}=x^{-1}y.$$

This brings us to $hk^{-1}=h'k'^{-1}$, which we can rewrite as $hh'^{-1}=k'^{-1}k$. This element belongs to $H\cap K=\{1\}$, thus $h = h'$ and $k = k'$: hence $a = b$. This proves that the intersection of a coset of $H$ with a coset of $K$ cannot contain more than one distinct element.

We made use of this information when we noted that, regardless of how many elements $G$ has, there exist at most $p^2$ intersections of cosets of $H$ with cosets of $K$, and each one of them contains at most one element. Thus, we deduced that $|G|\leq p^2$.

Now, here are my questions:

• How do I prove that $|G|\ge p^2$, in order to conclude that $|G|=p^2$ (and thus that $G\simeq\mathbb{Z}_p\times\mathbb{Z}_p$)?
• Is the proof rigorous enough so far, or were some of our assumptions incorrect?
• This exercise is related to a part of our algebra course in which nothing beyond direct product of groups had been explained yet, so we could not make use of the Sylow theorems, of anything about group actions and so on. Is there a simpler way to solve this exercise, using only "basic" tools of group theory (e.g. quotient groups, the homomorphism and isomorphism theorems and anything regarding the direct product of groups)?
• Is $G$ assumed to be finite at the outset? – Tim Raczkowski Jan 7 '16 at 20:46
• @TimRaczkowski The exercise said nothing on that point, so I assume that $G$ may also be infinite. Anyway, given that $G$ has to be isomorphic to $\mathbb{Z}_p\times\mathbb{Z}_p$, I guess it can't be infinite. Plus, if our half of the proof is correct, $|G|\leq p^2$ definitely implies that $G$ is finite. – Labba Jan 7 '16 at 20:48

You can use the following fact: If $H,K$ are subgroups of $G$, $H\cap K=\{1\}$ and $hk=hk$ for all $h\in H$ and $k\in K$, then $G\cong H\times K$.
Now, $hk\in hK,Hk$. Since $H$ is normal in $G$, $Hk=kH$. So, by your argument above, $\{hk\}=hK\cap kH$. But $kh\in hK\cap kH$ by a similar argument.
• Thanks for your answer :) So, if I got it right, you say that $hk$ belongs to the $hK$ and $Hk$ cosets (the latter being $kH$ anyway, because of the normality of $H$), and the same can be said about $kh$ that belongs both to the $kH$ and $Kh$ cosets (again, the $hK$ coset). In short, $hk, kh\in kH\cap hK$ and, by my part of the proof, $kh = hk$ because only one element can be found in this intersection. Hence, $G\simeq H \times K$ because $H\cap K = \{1\}$ and they commute with each other. Did I get everything? And this also proves that $|G| = p^2$, right? – Labba Jan 7 '16 at 21:15
• I really have to thank you :) Anyway, there's still something I fear I'm missing: even if this shows that $G\simeq H\times K$, does this prove that $|H| = |K| = p$ as well? – Labba Jan 7 '16 at 21:18
• Well if $|G|=p^2$, and $[G:H]=[G:K]=p$, so $|H|=|K|=p$. – Tim Raczkowski Jan 7 '16 at 21:21
• Hmm....I seem to keep missing a detail each time. $[G:H]=[G:K]\implies |H|=|K|$. Suppose $|HK|=n^2$. Now, $n^2|p^2\implies$n=1, or $n=p$. If $n=1$, then $H=N=\{1\}$ and $|G|=p$. So assuming $H\ne K$, we get the result. – Tim Raczkowski Jan 7 '16 at 21:38
Since $H,K$ normal in $G$ and $H\cap K=\{1\}$, $HK\cong H\times K$. $|G:HK|\cdot|HK:H|=|G:H|=p$. So $|HK:H|$ divides $p$. $|HK:H|=1$, or $p$. Suppose it is $1$. $HK=H$, $K\subseteq H$. $|G:H|\cdot|H:K|=|G:K|$, $p|H:K|=p$, so $H=K$, contradiction. So $|HK:H|=p$, $|G:HK|=1$. $G=HK$. Now, $|G:H|=|HK:H|=|K:H\cap K|$ by second isomorphism theorem. So $p=|K|$. Similarly, $|H|=p$. $G\cong \mathbb{Z}/p\mathbb{Z}\times\mathbb{Z}/p\mathbb{Z}$.