This proof is from Dummit & Foote and parts from it are spread throughout the book. I'm having problems proving thing or two the way the authors meant it to be proved.
Let and be subgroups (any subgroups) of group G and
a/ The number of elements of HK is
b/ Each element of HK can be written in different ways as product of h and k
c/ In particular if then each element of HK can be written in unique way as product of h and k
a/ Goes by the book. HK is really union of all cosets of K in G, which are of type hK for some . Distinct cosets are always disjoint and have equal number of elements equal to the elements of the subgroup - in this case K. So we seek how many such distinct cosets are there and multiply their number by .
So when in principle are two cosets and equal in G? If , then . But we are interested only in the case when our and are elements from H. This gives another property - for and in H, too. Therefore and therefore (only applies when our and are from H)
So the number of distinct cosets of K in HK is equal to the number of distinct cosets of in . The number of cosets of in H is |H|/|(H \cap K)| by Lgarange's theorem and this gives the end result of |K||H|/|(H \cap K)| elements of HK.
c/ It's easy to derive H by simple combinatorial argument. All different sequences hk for which the first element is from H and the second from K are |H||K|. All distinct elements of HK are |H||K|/|(H \cap K)| by a). If |(H \cap K)| is bigger than 1 it means that the number of distinct elements is strictly smaller than the number of sequences hk which means that some of them denote the same element.
b/ But how to prove that each element of HK can be written by exactly |(H \cap K)| different ways? In other words if |(H \cap K)| is 2 how to prove that each element has exactly two sequences of type hk and there are no elements that have three such sequences to represent them and there are no elements that have one such sequence to balance the number.
D&F left this as an excercise mentioning that it follows easily from a) and it implies c). I cannot do it.