TITLE: Order of a product of subgroups. Prove that $o(HK) = \frac{o(H)o(K)}{o(H \cap K)}$.
QUESTION [43 upvotes]: 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.

REPLY [2 votes]: 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|$.