Learn / Math / Subgroups, Cosets & Roots of Unity
19. Subgroups, Cosets & Roots of Unity
Roots of Unity · Lesson 20 of 26 · 12:14
How a cyclic group hides smaller groups inside it, why every subgroup's size has to divide the group's size, and how one special subgroup — the roots of unity — becomes the evaluation domain every proof system runs its polynomials over, checked all at once by a single vanishing polynomial.

Last time added three number-theory tools: Euclid, the Chinese Remainder Theorem, and Euler. This lesson looks at the structure inside a finite field itself — how a group can contain smaller groups, how those smaller groups slice the big one into equal pieces, and how one special set of numbers, the roots of unity, becomes the “domain” that modern proof systems actually work on. One small example carries the whole lesson: the prime 1313.

One number that makes everything

Mod 1313, the nonzero numbers 11 through 1212 form a group under multiplication. A group is cyclic if one number — a generator — produces every other number just by taking powers of it.

one number that makes everything Do the powers of 2, mod 13, visit every nonzero number? STEP 1 — list the powers k 2k mod 13 1 2 2 4 3 8 4 3 5 6 6 12 7 11 8 9 9 5 10 10 11 7 12 1 24 = 16 = 13 + 3, so 3 STEP 2 — count them 12 different values, and none repeated, so all of 1 to 12 appear 2 is a generator, and the group has size 12 212 ≡ 1 (mod 13), as Fermat says A GENERATOR REACHES EVERY NONZERO NUMBER The size of the group is the number of steps before it returns to 1.
Fig. 1 — the powers of 2 mod 13 visit every nonzero number exactly once before returning to 1, so 2 is a generator of the whole group.
Cyclic group generator

g1,g2,…,gn−1 are all distinct, and gn≡1(modp)g^1, g^2, \ldots, g^{n-1} \text{ are all distinct, and } g^n \equiv 1 \pmod p

A generator gg reaches every nonzero number mod pp before cycling back to 11. The number of steps it takes is the order of the group — here, 1212.

Groups inside the group

A natural question follows: inside this group of twelve, are there smaller groups — sets closed under multiplication on their own? There are, and they’re easy to find.

groups inside the group Which smaller groups live inside the powers of 2 mod 13? STEP 1 — one size for each divisor of 12 sizes 1, 2, 3, 4, 6, 12 STEP 2 — build each from 2 to the power 12 ÷ size size generator elements 1 212 = 1 {1} 2 26 = 12 {1, 12} 3 24 = 3 {1, 3, 9} 4 23 = 8 {1, 8, 12, 5} 6 22 = 4 {1, 4, 3, 12, 9, 10} 12 2 all of 1 to 12 STEP 3 — stays inside itself in {1, 3, 9}: 3×9 = 27 = 1, and 9×9 = 81 = 3 (mod 13) both results inside the set ONE SUBGROUP FOR EACH DIVISOR OF 12 Multiply any two members and you stay inside.
Fig. 2 — one subgroup for every divisor of 12, each built by raising the generator to the power 12 divided by that divisor.

Each subgroup is built the same way: raise the generator 22 to the power 1212 divided by the target size. Checked inside the smallest nontrivial one, {1,3,9}\{1, 3, 9\}: multiplying any two members lands back inside the set — exactly what “closed” means.

Slicing the group into copies

Take one of these subgroups and multiply the whole set by a number outside it. The result is a shifted copy, called a coset. These copies tile the group perfectly — no overlaps, no gaps.

slicing the group into copies Take H = {1, 5, 12, 8}. Can shifted copies of H tile the whole group? STEP 1 — shift by 2 2 × {1, 5, 12, 8} = {2, 10, 24, 16} = {2, 10, 11, 3} (mod 13) STEP 2 — shift by 4 4 × {1, 5, 12, 8} = {4, 20, 48, 32} = {4, 7, 9, 6} STEP 3 — put them together H = {1, 5, 12, 8} 2H = {2, 10, 11, 3} 4H = {4, 7, 9, 6} together, these three sets cover every nonzero number: 123456789101112 3 slices of size 4 = 12 No number appears twice, and none is missing. COSETS CUT THE GROUP INTO EQUAL SLICES Each coset is a shifted copy of the subgroup.
Fig. 3 — shifting H = {1, 5, 12, 8} by 2 and by 4 produces two more cosets that, together with H, cover every nonzero number mod 13 exactly once.
Cosets

gH={gh:h∈H}gH = \{gh : h \in H\}

A coset is a subgroup HH shifted by multiplying every element by some gg. Every element of the full group lands in exactly one coset, so the cosets partition the group into equal-size slices.

Why sizes must divide

This slicing explains a famous rule — Lagrange’s theorem. If every slice is the same size, the subgroup’s size times the number of slices has to equal the group’s size, which forces the subgroup’s size to divide the group’s size.

why sizes must divide Could a subgroup of size 5 live inside a group of size 12? size of subgroup × number of cosets = size of group STEP 1 — test sizes size 4: 4 × 3 = 12 ✓ size 6: 6 × 2 = 12 ✓ size 5: 12 ÷ 5 is not a whole number — impossible STEP 2 — the same for single numbers orders mod 13: 2 has order 12, 5 has order 4, 3 has order 3, 12 has order 2 and each divides 12 STEP 3 — Fermat appears every order divides 12, so a12 = 1 for every nonzero a example: 312 = (33)4 = 14 = 1 ✓ ORDERS ALWAYS DIVIDE THE GROUP SIZE Fermat's little theorem falls out of this.
Fig. 4 — a subgroup of size 5 can't exist inside a group of size 12, because 12 isn't a multiple of 5. The same rule, applied to single elements, is Fermat's little theorem.
Lagrange's theorem

∣H∣×[number of cosets]=∣G∣|H| \times [\text{number of cosets}] = |G|

Every subgroup’s size divides the group’s size — and so does every single element’s order, since the powers of one element form a subgroup. Set the group to the nonzero numbers mod a prime pp, size p−1p - 1: every order divides p−1p - 1, which is exactly Fermat’s little theorem from Topic 5.

The numbers that return to 1

Now put the size-44 subgroup from Fig. 2 to work. It’s special: its elements are precisely the numbers whose fourth power is 11 — the fourth roots of unity.

the numbers that return to 1 Which numbers x satisfy x4 = 1, mod 13? STEP 1 — test candidates 14 = 1 ✓ 54 = 625 = 48×13 + 1 ✓ 84 = 4096 = 315×13 + 1 ✓ 124 = (−1)4 = 1 ✓ 24 = 16 = 3 ✗ STEP 2 — name them {1, 5, 12, 8} are the 4th roots of unity (a polynomial of degree 4 has at most 4 roots) STEP 3 — one number generates them ω = 5: 51 = 5, 52 = 12, 53 = 8, 54 = 1 domain = {ω0, ω1, ω2, ω3} = {1, 5, 12, 8} 52 = 12 = −1, just like i2 = −1 ROOTS OF UNITY ARE POWERS OF ONE SPECIAL NUMBER n-th roots of unity exist mod p exactly when n divides p − 1.
Fig. 5 — the size-4 subgroup found earlier is exactly the set of 4th roots of unity mod 13, and one number, 5, generates all of them.
Roots of unity

xn≡1(modp)  ⟺  x∈⟨ω⟩,ωn≡1x^n \equiv 1 \pmod p \iff x \in \langle \omega \rangle, \quad \omega^n \equiv 1

An nn-th root of unity exists mod pp exactly when nn divides p−1p - 1 — the same divisibility rule from Lagrange’s theorem, now describing which “clock sizes” a prime field can offer.

A polynomial that is zero on the domain

Here’s where this becomes useful for proofs. Given a domain — a set of points — there’s a single polynomial that’s zero on every point of it and nowhere else: the vanishing polynomial.

a polynomial that is zero on the domain Which polynomial is zero on exactly {1, 5, 12, 8}? STEP 1 — use the root property every domain point satisfies x4 = 1, so Z(x) = x4 − 1 STEP 2 — test it Z(1) = 0 ✓ Z(5) = 624 = 48×13, so 0 ✓ Z(12) = (−1)4 − 1 = 0 ✓ Z(8) = 4095 = 315×13, so 0 ✓ outside the domain: Z(2) = 16 − 1 = 15 = 2, not zero STEP 3 — write it as factors Z(x) = (x − 1)(x − 5)(x − 12)(x − 8) constant term: (−1)(−5)(−12)(−8) = 480 = 12 = −1 (mod 13) ✓ Z(x) IS ZERO ON THE DOMAIN AND NOWHERE ELSE It is called the vanishing polynomial.
Fig. 6 — Z(x) = x^4 - 1 is zero at every point of {1, 5, 12, 8} and nowhere else, and factors cleanly into (x - 1)(x - 5)(x - 12)(x - 8).
The vanishing polynomial

Z(x)=xn−1=∏r∈domain(x−r)Z(x) = x^n - 1 = \prod_{r \in \text{domain}} (x - r)

For a domain of nn-th roots of unity, the vanishing polynomial has this remarkably simple closed form — no need to multiply out nn separate factors by hand.

The quotient trick

Now the payoff. If another polynomial is zero at every point of the domain, it has to be a multiple of Z(x)Z(x). Instead of checking many points one at a time, a proof system checks a single division.

the quotient trick If P(x) is zero at every point of {1, 5, 12, 8}, what does that tell us about P? P is zero on the domain ⇒ P(x) = Z(x) × q(x) for some polynomial q STEP 1 — an example that passes, P(x) = x5 − x P(r) = r × (r4 − 1) = r × 0 = 0 for every domain point r ✓ STEP 2 — divide x5 − x = (x4 − 1) × x, so q(x) = x, remainder 0 STEP 3 — an example that fails, P(x) = x2 − 1 P(1) = 0 and P(12) = 0, but P(5) = 24 = 11 ✗ not zero everywhere, so not divisible by Z(x) ZERO ON THE DOMAIN MEANS DIVISIBLE BY Z(x) One division checks every point of the domain at once.
Fig. 7 — a polynomial that's zero on the whole domain divides evenly by Z(x); one that's zero at only some of it doesn't.
The quotient trick

P(r)=0 for every domain point r  ⟺  P(x)=Z(x)×q(x)P(r) = 0 \text{ for every domain point } r \iff P(x) = Z(x) \times q(x)

This single divisibility check — does Z(x)Z(x) divide P(x)P(x) with zero remainder — replaces checking every one of the nn domain points individually. It’s the same completeness check this series introduced back in the entropy lesson’s “three promises,” now with its machinery fully exposed.

Where these tools show up

So where does all of this appear in practice?

where these tools show up SUBGROUPS domain sizes must divide p − 1, so proof systems pick fields where p − 1 has a big power of 2 Why the field is chosen. ROOTS OF UNITY the evaluation domain: the points circuits and FFTs use The domain of the proof. COSETS AND Z(x) shifted copies of the domain, and the polynomial that proves zero on all of it Many checks in one. A SMALL DOMAIN, A BIG SHORTCUT Next up: quadratic residues and square roots.
Fig. 8 — subgroups, roots of unity, and cosets with the vanishing polynomial, and where each one actually shows up in a proof system.

Subgroup sizes must divide p−1p - 1, so proof systems pick primes where p−1p - 1 has a large power of 22 — that’s why the field gets chosen the way it does. Roots of unity become the evaluation domain: the exact points circuits and FFTs use. And cosets, together with the vanishing polynomial, are how a system checks that a polynomial is zero across a whole shifted copy of the domain — many checks folded into one. A small domain, in other words, is a very big shortcut. Next up: quadratic residues and square roots.

Key takeaways
  • A cyclic group’s generator reaches every element through its powers before cycling back to 11; the number of steps is the group’s order.
  • Every divisor of the group’s size produces a subgroup, built by raising the generator to (group size ÷ divisor).
  • Cosets — shifted copies of a subgroup — tile the whole group into equal, non-overlapping slices.
  • Lagrange’s theorem: a subgroup’s size always divides the group’s size; applied to a single element’s order, this is exactly Fermat’s little theorem from Topic 5.
  • Roots of unity are the subgroup whose elements satisfy xn≡1x^n \equiv 1, and the vanishing polynomial Z(x)=xn−1Z(x) = x^n - 1 is zero exactly on that domain and nowhere else.
  • The quotient trick — checking whether Z(x)Z(x) divides a polynomial with zero remainder — replaces checking every domain point individually with a single division.