If $[G:H]$ and $[G:K]$ are relatively prime, then $G=HK$

I'm struggling to proof that if $H$ and $K$ are subgroups of finite index of a group $G$ such that $[G:H]$ and $[G:K]$ are relatively prime, then $G=HK$. I don't know why I can't answer it, because this question seems easy. I'm stuck maybe because I've studied so far just Lagrange's theorem and some of its consequences. But I think we don't need much more, because this is the material covered so far by the Hungerford's book.

I need help.

Thanks.


Solution 1:

We have the following fact:

  1. If $H$ and $K$ are subgroups of a group $G$, then $[H:H\cap K]\leq [G:K]$. If $[G:K]$ is finite, then $[H:H\cap K]=[G:K]$ if and only if $G=KH$. This is proposition $4.8$ of chapter I in Hungerford's Algebra.

It is easy to prove that $[G:H][H:H\cap K]=[G:K][K:H\cap K]$, from this conclude that $[G:H]\mid [K:H\cap K]$; since $[G:H]$ and $[G:K]$ are relatively prime, and combinig this with $(1)$ we get $[G:H]=[K:H\cap K]$, so...

Solution 2:

Try proving that [$G$ : $H\cap K$] $=$ [$G$ : $H$][$G$ : $K$].

And then see how you can use the fact that $|HK| = \frac{|H||K|}{|H\cap K|}$