Order of a product of subgroups. Prove that $o(HK) = \frac{o(H)o(K)}{o(H \cap K)}$. Let $H$, $K$ be subgroups of $G$. Prove that $o(HK) = \frac{o(H)o(K)}{o(H \cap K)}$.
I need this theorem to prove something. 
 A: The group $H \times K$ acts on the set $HK \subseteq G$ via $(h,k) x := hxk^{-1}$. Cleary the action is transitive. The stabilizer of $1 \in HK$ is easily seen to be isomorphic to $H \cap K$. The orbit-stabilizer "theorem" implies $|HK| \cdot |H \cap K| = |H \times K| = |H| \cdot |K|$.
By the way, this proof also works when $H,K$ are infinite.
A: Here is LaTex-ed version of the proof posted in BBred's comment. 
I've tried to add details of one place of the proof. If the OP explains which part of the proof is the problem, perhaps that part can be explained in more detail. I've made this answer a CW - anyone, feel free to contribute.

Certainly the set $HK$ has $|H||K|$ symbols.
  However,not all symbols need represent distinct group elements. That is, we may have $hk=h'k'$ although $h\ne h'$ and $k\ne k'$.
  We must determine the extent to which this happens.
For every $t\in H\cap K$, $hk =(ht)(t^{-1} k)$, so each group element in $HK$ is represented by at least $|H\cap K|$ products in $HK$.
But $hk = h'k'$ implies $t = h^{-1} h' = k(k')^{-1}\in H\cap K$ so that $h'=ht$ and $k' = t^{-1} k$. Thus each element in $HK$ is represented by exactly $|H\cap K|$ products. So, $$|HK|= \frac{|H||K|}{|H\cap K|}.$$ 

If we have $hk=h'k'$ and we multiply this by $h^{-1}$ from left and by ${k'}^{-1}$ from right, we get $$k{k'}^{-1}=h^{-1}h.$$ 
Maybe it should be stressed that $t\in H$, since $t=h^{-1}h'$; and $t\in K$ since $t=k{k'}^{-1}$. (Which means $t\in H\cap K$.)                       
A: This is similar to Martin Brandenburg's answer. It is from Steve Roman's Fundamentals Of Group Theory.
Define a function $f: H \times K \to HK$ which maps $(h, k) \mapsto hk$. This is a surjective function and the fibers $f^{-1}(y)$ partition $H \times K$ into $|HK|$ disjoint sets. Since $|H \times K| = |H| \cdot |K|$, all that remains is to show that each fiber $f^{-1}(y)$ has size $|H \cap K|$.
Fix $y = hk \in HK$. Every element in $H \times K$ can be written as $(hu, vk)$ for some $u \in H$ and $v \in K$. But
$$f(hu, vk) = hk \text{ iff } huvk = hk \text{ iff } uv = 1 \text{ iff } v = u^{-1} $$
which means
$$f^{-1}(y) = \{(hu, u^{-1}k) \: : \: u \in H \cap K\}$$
Thus, $f^{-1}(y)$ indeed has size $|H \cap K|$.
A: 
Lemma: $\color{blue}{ H\times K/\mathcal R}$ has $n$ elements that is,
$\color{blue}{n= |H\times K/\mathcal R| }$ and we have,
$$ \color{blue}{|HK|= |H\times K/\mathcal R| =\frac{|H\|K|}{|H\cap K|}} $$
This is a consequence of  $E_1$ and $E_2$ see below for all the details.

Consider the map
\begin{split}
\phi :&& H\times K\to HK\\
&& (h,k)\mapsto hk
\end{split}
Clearly, $\phi $ is onto (surjective ). Now we consider the relation,
$$\color{red}{(h,k)\mathcal R(h',k')\Longleftrightarrow hk=h'k'\Longleftrightarrow \phi(h,k)=\phi(h',k')}$$
It is easy to check that $\mathcal R$ is an equivalent relation on $H\times K$.

Fact.I. Let define by $[h,k]_\mathcal R$ the class of an element $(h,k) \in H\times K.$ that is $$[h,k]_\mathcal R =\left\{ (a,b) \in  H\times K: (a,b)\mathcal R (h,k) \right\}$$
Fact. II. let denote $n\in \mathbb N$ the number of classes of $ H\times K$ with respect to the relation $\mathcal R.$ Also we denote by $\color{blue}{ H\times K/\mathcal R}$ the set of class. Precisely we have,
$$\color{blue}{ H\times K/\mathcal R= \{[h_1,k_1]_\mathcal R, [h_2,k_2]_\mathcal R\cdots, [h_n,k_n]_\mathcal R\}} $$
Where, $(h_j,k_j)_j$ is a set of representative class of $H\times K/\mathcal R $.

For instance a representative class in $\Bbb Z_2 $ is $\{0,1\}$
First Equality: We consider the $\overline{\phi}$ the quotient map of $\phi$ w.r.t $\mathcal R.$ defines as follows:
\begin{split}
\overline{\phi} :&& H\times K/\mathcal R \to HK\\
&& [h,k]_\mathcal R \mapsto  \phi(h,k) = hk
\end{split}

*

*$\overline{\phi} $ is well define since from the red line above we have,

$$\color{red}{(h',k') \in [h,k]_\mathcal R\Longleftrightarrow (h,k)\mathcal R(h',k')\Longleftrightarrow hk=h'k'\Longleftrightarrow \overline{\phi}([h,k]_\mathcal R)=\overline{\phi}([h',k']_\mathcal R)}\tag{Eq}.$$

*

*$\overline{\phi}$ is onto (surjective): in fact for $g \in HK$ by definition of $HK$ there exist $h\in H$
and $k\in K $ such that $ g = hk = \overline{\phi}([h,k]_\mathcal R)$


*$\overline{\phi}$ is one-to-one(injective): This is a direct consequence of (Eq) since we have
$$\color{red}{[h',k']_\mathcal R = [h,k]_\mathcal R\Longleftrightarrow (h',k') \in [h,k]_\mathcal R \Longleftrightarrow \overline{\phi}([h,k]_\mathcal R)=\overline{\phi}([h',k']_\mathcal R)}\tag{Eq}.$$

conclusion $\overline{\phi}$ is a bijection and therfore,
$$\color{blue}{n=|H\times K/\mathcal R| = |HK|}\tag{$E_1$} $$

we are jumping to the second way, starting  from the following observation.

Fact. III  Since $\mathcal R$ is an equivalent relation, we know that $\color{red}{([h_j,k_j]_\mathcal R)_{1\le j\le n}}$ is a partition of $H\times K$ that is,
$$\color{red}{ |H\times K| = \sum_{j=1}^{n} |[h_j,k_j]_\mathcal R| }$$
Claim:(see the proof Below)
$$\color{red}{|[h_j,k_j]_\mathcal R| = |H\cap K|}$$

Second Equality: Since for any finte sets A and B we have $|A\times B| =|A|\times|B|,$ using the claim and the foregoing relations, we get that
$$\color{blue}{|H|\times|K| = |H\times K| = \sum_{j=1}^{n} |[h_j,k_j]_\mathcal R|  = \sum_{j=1}^{n} |H\cap K|   = n |H\cap K| \\=|H\times K/\mathcal R||H\cap K|}$$
Since $ n = |H\times K/\mathcal R|$.
Then $$ \color{blue}{n= |H\times K/\mathcal R| =\frac{|H\|K|}{|H\cap K|}}\tag{$E_2$} $$
Proof of the claim:
Now we would like to investigate $|[h,k]_\mathcal R|$.
$$\color{blue}{(h',k')\in [h,k]_\mathcal R \Longleftrightarrow hk=h'k'\Longleftrightarrow h'^{-1}h=k'k^{-1}\in H\cap K .}$$

Consider the map
\begin{split}
f :&& [h,k]_\mathcal R \to H\cap K\\
&& (h',k')\mapsto  h'^{-1}h=k'k^{-1}
\end{split}
The above relation shows that $f$ is well defined as a map. We will show that $f$ is a bijective map to conclude.


*

*$f$ is onto(surjective): Let $s\in  H\cap K $. if we let
$ k' =  h s^{-1}~~~\text{and}~~~ k'=sk$ then $$\color{red}{h'k' = hs^{-1} sk =hk\Longleftrightarrow (h',k')\mathcal R (h,k) \implies (h',k') \in  [h,k]_\mathcal R}$$
and $$\color{red}{f(h',k')= f(hs^{-1}, sk)} = s.$$
this prove that $f$ is onto.

*

*$f$ is one-to-one(injective): let, $(a,b), (x,y)\in  [h,k]_\mathcal R $ such that $f(a,b)=f(x,y)$.
we have
$$f(a,b) =a^{-1}h =bk^{-1} ~~~~\text{and}~~~f(x,y) =x^{-1}h =yk^{-1}$$
then,
\begin{split}
f(a,b)=f(x,y)&\implies& \color{blue}{a^{-1}h =bk^{-1}} =\color{red}{x^{-1}h =yk^{-1}}\\
&\implies& \color{blue}{a^{-1}h =x^{-1}h} ~~~~\text{and}~~~~\color{red}{ bk^{-1}=yk^{-1}}\\
&\implies& \color{blue}{a^{-1} =x^{-1}} ~~~~\text{and}~~~~\color{red}{ b=y}\\
&\implies& \color{red}{a =x} ~~~~\text{and}~~~~\color{red}{ b=y}\\
&\implies& (a,b)=(x,y)
\end{split}
Hence  $f$ is bijective then the claim follows
A: We know that
$$HK=\bigcup_{h\in H} hK$$
and each $hK$ has the same cardinality $|hK|=|K|$. (See ProofWiki.)
We also know that for any $h,h'\in G$ either $hK\cap h'K=\emptyset$ or $hK=h'K$.
So the only problem is to find out how many of the cosets $hK$, $h\in H$, are distinct.
Since
$$hK=h'K \Leftrightarrow h^{-1}h'\in K$$
(see ProofWiki)
we see that for each $k\in K$, the elements $h'=hk$ represent the same set. (We have $k=h^{-1}h'$.)
We also see that if $k=h^{-1}h'$ then $k$ must belong to $H$. 
Since the number of elements that represent the same coset is $|H\cap K|$, we have $|H|/|H\cap K|$ distinct cosets and $\frac{|H||K|}{|H\cap K|}$ elements in the union. 
A: Firstly, it can be shown that $HK \le G \iff H \unlhd HK$ or $K \unlhd HK$. Without loss of generality, we can assume that $K \unlhd HK$.
Let $T = H\cap K$. Then $T \unlhd H$.
Consider the function $f: H/T \to HK/K$ where $f(hT)=hK$ for each left coset $hT \in H/T$.
Suppose $f(hT)=f(gT)$ for some $hT, gT \in H/T$. Then $hK=gK$. So $h^{-1}g \in K$. But since $h, g \in H, h^{-1}g \in H$. So $h^{-1}g \in T$. Then $hT=gT$. So $f$ is an injective function.
Now take $(hk)K \in HK/K$ where $h \in H$ and $k \in K$. Then $(hk)K=hK$. So there exists $hT \in H/T$ such that $f(hT)= (hk)K$. So $f$ is a surjective function.
Since $f$ is a bijective function, $|H/T|=|HK/K|$. Then $\frac {|H|}{|T|}= \frac {|HK|}{|K|}$. Thus $|HK|= \frac {|H||K|}{|T|} = \frac {|H||K|}{|H \cap K|}$.
