K.P. Boateng
Notebook

Notebook

Lagrange's theorem, visually

Take the integers mod 6 under addition, Z/6Z={0,1,2,3,4,5}\mathbb{Z}/6\mathbb{Z} = \{0, 1, 2, 3, 4, 5\}, and the subgroup H={0,3}H = \{0, 3\}. Now shift HH by every element of the group and see what you get.

0+H={0,3}0 + H = \{ 0, 3 \}, 1+H={1,4}1 + H = \{ 1, 4 \}, 2+H={2,5}2 + H = \{ 2, 5 \}.

Figure 1. The three cosets of {0, 3}. Every element sits in exactly one tile, and every tile has two elements.

Shifting by 0 or 3 gives back {0,3}\{0, 3\}. Shifting by 1 or 4 gives {1,4}\{1, 4\}. Shifting by 2 or 5 gives {2,5}\{2, 5\}. Three tiles, two elements each, six elements in all. That is already the whole theorem in miniature.

Two facts make it work

Lemma 1.

Two cosets are either identical or disjoint.

Lemma 2.

Every coset gHgH has exactly ∣H∣|H| elements, because h↦ghh \mapsto gh is a bijection from HH to gHgH.

The first lemma says the tiles never overlap. The second says they are all the same size. Since every element gg lies in its own coset gHgH, the tiles cover all of GG.

Theorem (Lagrange)

∣G∣=[G:H]⋅∣H∣|G| = [G : H] \cdot |H|

Here [G:H][G : H] is the number of cosets. In particular, ∣H∣|H| divides ∣G∣|G|.

Checking it with code

A computer can find the tiles. This collects every shifted copy of HH and keeps only the distinct ones.

// cosets.ts
const G = [0, 1, 2, 3, 4, 5];
const H = [0, 3];
const cosets = new Map<string, number[]>();
 
for (const g of G) {
  const c = H.map((h) => (g + h) % 6).sort((a, b) => a - b);
  cosets.set(c.join(","), c);
}
 
console.log([...cosets.values()]); // [[0,3],[1,4],[2,5]]

What it rules out

A group of order 6 can only have subgroups of order 1, 2, 3 or 6. There is no subgroup of order 4, and you know that without checking a single element.

Careful: the converse is false. A4A_4 has order 12 but no subgroup of order 6.