Number TheoryHonors · Lesson 02 / 16← Lesson 01Lesson 03 →
Lesson 02 · The multiplicative group · 50–65 minutes

Index and the Power Map

Lesson 01 showed that a primitive root g writes every unit as a power, n ≡ gk. The exponent k is the index of n, a logarithm for arithmetic mod p: it turns multiplication into addition mod p − 1. With it, questions about powers mod p become linear congruences. You will use it to count the solutions of xℓ ≡ 1, find which units are ℓ-th powers, split the units into cosets, and prove Wilson's theorem.

Where this lesson is headed

ind(ab) ≡ ind a + ind b  (mod p − 1),   #{x : xℓ ≡ 1} = gcd(ℓ, p − 1)

In words: in index coordinates the unit group is just the integers mod p − 1 under addition. Raising to the ℓ-th power becomes multiplying by ℓ, so everything about x ↦ xℓ is decided by d = gcd(ℓ, p − 1): it is d-to-one, its image H is the set of units whose index is divisible by d, and the units split into d cosets of H.

You will use

Primitive roots exist, and 1, g, …, gp−2 are the p − 1 units, each once (Lesson 01). Lagrange's bound: a degree-d polynomial has at most d roots mod p (Lesson 01, step 5). The linear congruence rule: c·X ≡ b (mod m) is solvable exactly when gcd(c, m) divides b, and then it has gcd(c, m) solutions mod m (Growing Clock 02, step 4).

p: an odd prime; g: a primitive root mod p

indg(n): the k in {0, …, p − 2} with gk ≡ n

ℓ: an exponent; d = gcd(ℓ, p − 1)

H: the image of x ↦ xℓ (the ℓ-th powers)

coset: a set gjH of units

01. A logarithm for arithmetic mod p

Start with p = 7 and its primitive root g = 3. The powers 30, …, 35 are 1, 3, 2, 6, 4, 5, so ind 2 = 2, ind 6 = 3, and so on. Then choose an exponent ℓ and watch where x ↦ xℓ sends each unit.

The index table

Click two units to multiply them: their indices add mod p − 1.

The power map x ↦ xℓ

d = gcd(ℓ, p − 1)
Solutions of xℓ ≡ 1
Size of the image H

Guided experiments

Do these in order. "Set this up" chooses p, g and ℓ.

    Why a logarithm?

    Ordinary logarithms turn products into sums: log(ab) = log a + log b. The index does the same thing mod p, except that the sums are taken mod p − 1, because gp−1 ≡ 1 wraps the exponents around.

    So a question like "solve x3 ≡ 5 (mod 13)" becomes "solve 3X ≡ ind 5 (mod 12)", a linear congruence you already know how to handle.

    The index is also called the discrete logarithm. Computing it for large p is believed to be hard, which is why it is used in cryptography; for the primes here a table is instant.

    The counts all come out as gcd(ℓ, p − 1). Stage 02 shows why, by turning everything into a linear congruence.