Dirichlet Characters
The Legendre symbol sends n to (−1)ind n. Replace −1 by any root of unity and you get a Dirichlet character: a function on the integers mod p that turns products into products of complex numbers on the unit circle. There are exactly p − 1 of them. You will build them all from a primitive root, sort them by order, reality and parity, show that none has a period shorter than p, and prove the orthogonality relations that every later lesson depends on.
Where this lesson is headed
In words: characters are the multiplicative functions mod p with values on the unit circle; there is one for each j mod p − 1, and every nontrivial one sums to 0. Here ω = cos(2π/(p − 1)) + i sin(2π/(p − 1)). A character of order q exists exactly when q | p − 1, and its parity is χ(−1) = (−1)(p−1)/q.
You will use
The index ind n and its rules (Lesson 02); the count φ(q) of elements of order q in a cyclic group of order p − 1 (Lesson 01); the Legendre symbol (Lesson 03); complex multiplication and conjugation (Lesson 04). One new fact about complex numbers: multiplying points on the unit circle adds their angles.
p: an odd prime; g: a primitive root
ωm = cos(2π/m) + i sin(2π/m), a primitive m-th root of unity; ω = ωp−1
character mod p: χ with χ(ab) = χ(a)χ(b), χ(1) = 1, χ(n + p) = χ(n), and χ(n) = 0 when p | n
χ0: the trivial character, 1 on every unit
order: least q ≥ 1 with χ(n)q = 1 for all units n
parity: χ is even if χ(−1) = 1, odd if χ(−1) = −1
01. Multiplicative functions on the circle
Start with p = 13, g = 2 and j = 3. Then χ(2) = ω3 = i, where ω is a primitive 12th root of unity, so every value χ(n) = iind n is one of 1, i, −1, −i. The circle shows where each χ(n) lands. Change j to see other characters, and watch what their sum does.
Guided experiments
Do these in order. "Set this up" chooses p and j. For values that are powers of i, answer with the exponent k in ik.
Characters for other moduli
The same definition works for any modulus r: a multiplicative, r-periodic function, zero when gcd(n, r) > 1. Two you will meet again:
χ−4(n) = (−1)(n−1)/2 for odd n tells you p mod 4; χ−3(n) = (n/3). Both are real and odd. Check: χ−4(ab) = χ−4(a)χ−4(b) because odd numbers ≡ 3 (mod 4) multiply like −1.
02. Building and sorting the characters
Each step has the general statement on the left and your p and j from Stage 01 on the right.
Roots of unity
ωm = cos(2π/m) + i sin(2π/m) sits on the unit circle at angle 2π/m. Multiplying unit-circle points adds angles, so ωmk has angle 2πk/m and
The m-th roots of unity 1, ωm, …, ωmm−1 form a cyclic group under multiplication. For m = 4 they are 1, i, −1, −i. The conjugate of a unit-circle point is its inverse: ω̄ = ω−1.
There are exactly p − 1 characters
Construction. For each j, χj(n) = ωj·ind n (and 0 if p | n) is well defined, since ind n is defined mod p − 1 and ωp−1 = 1. It is multiplicative because indices add.
Completeness. Any character is fixed by c = χ(g), since χ(gk) = ck. And cp−1 = χ(gp−1) = χ(1) = 1, so c = ωj for some j. Different j mod p − 1 give different characters. So there are exactly p − 1, and χjχk = χj+k.
Orders
χjm = χjm is trivial exactly when (p − 1) | jm, so
Every order divides p − 1, and (as for elements in Lesson 01) exactly φ(q) characters have order q for each q | p − 1. A character of order q takes values in the q-th roots of unity.
Real and non-real characters
χ is real (all values ±1 or 0) exactly when χ2 = χ0, i.e. order 1 or 2. The only order-2 character is j = (p − 1)/2:
the Legendre symbol. Every other nontrivial character takes a non-real value somewhere. If χ has order 4, then χ2 has order 2, so χ(n)2 = (n/p): χ is real exactly on the squares.
Parity
ind(−1) = (p − 1)/2, so χj(−1) = ωj(p−1)/2 = (−1)j. For χ of order q, j = k(p − 1)/q with gcd(k, q) = 1. If (p − 1)/q is even, j is even. If it is odd, q is even, so k is odd, and j is odd. Either way:
For q = 4: the quartic characters are odd exactly when (p − 1)/4 is odd, that is p ≡ 5 (mod 8). That is the definition of P* from Lesson 03.
Orthogonality
Sum over n. Let S = ∑n χ(n) over the units. If χ ≠ χ0, pick a with χ(a) ≠ 1. As n runs over the units so does an, so
Sum over χ. Dually, for a unit n ≢ 1, the sum ∑j χj(n) = ∑j (ωind n)j is a geometric sum of a root of unity ≠ 1, which is 0. So
Characters can pick out a single residue class. That is how Lesson 13 counts primes in progressions.
No period shorter than p: primitive characters
Suppose a nontrivial χ also had period d with 0 < d < p. Then every integer combination of p and d is a period, including gcd(p, d) = 1. A function of period 1 is constant, but χ(0) = 0 and χ(1) = 1. Contradiction. So every nontrivial character mod p has least period p: it is primitive, of conductor p. (χ0 is the exception: it agrees with the constant 1 away from multiples of p, and has conductor 1.)
03. The characters mod p
Assemble the argument, then test it on every prime below 200.
Complete proof
Classification. A character is fixed by c = χ(g), and cp−1 = 1, so c = ωj. Conversely ωj·ind n is multiplicative and well defined. Hence the characters form a cyclic group of order p − 1 generated by χ1, and ord χj = (p − 1)/gcd(j, p − 1); by Lesson 01 there are φ(q) of each order q | p − 1.
Real characters and parity. χ is real iff χ2 = χ0, giving χ0 and χ(p−1)/2 = (·/p). Since ind(−1) = (p − 1)/2, χj(−1) = (−1)j; writing j = k(p − 1)/q with gcd(k, q) = 1 gives χ(−1) = (−1)(p−1)/q.
Orthogonality. For χ ≠ χ0 choose χ(a) ≠ 1; then χ(a)S = S forces S = 0. For n ≢ 0, 1, ζ = ωind n ≠ 1 is a (p − 1)-th root of unity and ∑j ζj = (ζp−1 − 1)/(ζ − 1) = 0.
Conductor. The periods of a function on ℤ are closed under integer combinations; if d (0 < d < p) were a period, so would be 1 = gcd(p, d), contradicting χ(0) = 0, χ(1) = 1. ∎
Computer check
For every odd prime below 200 and every character: multiplicativity on all pairs, both orthogonality relations, the order count φ(q), the parity rule, and that no shift below p is a period.