A canonical construction proving $\left|HK\right| = \left|H\right|\left|K\right| / \left|H \cap K\right|$?

Sure. In fact, we can prove “it” in general, without assuming $G$ is finite (quotation marks because we will actually prove a different equality, from which this one can be deduced in the finite case).

We define a map from $H\times K$ to $HK$. The maps sends $(h,k)$ to $hk$.

Then we figure out the size of each fiber:

First, let $d\in H\cap K$. Then the pair $(hd,d^{-1}k)$ maps to the element $(h,k)$. Thus, there are at least $|H\cap K|$ elements in each fiber.

Now suppose that $(h,k)$ and $(h’,k’)$ map to the same thing. That is, that $hk=h’k’$. Then $(h’)^{-1}h=k’k^{-1}=d\in H\cap K$. That is, $h=h’d$ and $k=d^{-1}k’$, so that the pair $(h,k)$ is equal to the pair $(h’d,d^{-1}k’)$. So every element in the fiber of $(h,k)$ is of the form above.

Thus, the cardinality of the domain equals the cardinality of the image times the size of the fibers (since all fibers have the same size), so $$|H||K| = |HK||H\cap K|.$$

In the case where all quantities are finite (for example, if $G$ is finite, or if $HK$ is finite), then we can divide through by $|H\cap K|$ to get $$|HK| = \frac{|H||K|}{|H\cap K|},$$ the desired equality.


You can also prove the assertion in the setting of group actions. Note that the group $H \times K$ acts transitively on the set $HK$ by $(h, k) * x := hxk^{-1}$ for each $x \in HK$. The stabilizer of the element $1 \in HK$ is obviously isomorphic to $H \cap K$. So the assertion follows by the orbit stabilizer theorem.


Define $\pi:H\times K\to HK$ by $(h,k)\to hk$.

Note that for all $hk\in HK$, the map $\sigma$: $\pi^{-1}(hk)\to H\cap K$ by $(h',k')\mapsto h'h^{-1}=k'k^{-1}\in H\cap K$ is bijective.

Thus $\forall hk \in HK, |\{(h',k')\in H\times K:hk=h'k'\}|=|\pi^{-1}(hk)|=|H\cap K|$. Therefore, $|HK||H\cap K|=|H\times K|=|H||K|$.

Edited:

As Artuo commented below, we have to take care of the representative of each $hk$ in HK. I fixed the problem in the following version, But the idea remains the same. You can read the previous version, which is perhaps more intuitive, with the representative of $hk$ in mind.

Define $\pi:H\times K\to HK$ by $(h,k)\to hk$.

Note that for all $x\in HK$, $x=hk$ for some $h\in H, k\in K$. The map $\sigma$: $\pi^{-1}(x)\mapsto H\cap K$ by $(h',k')\to h'h^{-1}=k'k^{-1}\in H\cap K$ is bijective.

Thus $\forall x \in HK, |\pi^{-1}(x)|=|H\cap K|$.

If we take $x=(h,k)$, then $|\{(h',k')\in H\times K:hk=h'k'\}|=|\pi^{-1}(x)|=|H\cap K|$.

Therefore, $|HK||H\cap K|=|H\times K|=|H||K|$.