Search

Search papers and lessons

Dirichlet Character

Level 4 · 13 min read

A Dirichlet character mod q is a multiplicative pattern on the integers that depends only on the remainder mod q, and the set of them splits the integers coprime to q into classes that analysis can separate.

On this page

  • Colour = topic mix
  • Discrete math
  • Abstract algebra
  • Linear algebra
  • ReadReady to readNot yet

TL;DR

A Dirichlet character modulo qq is a rule that assigns a complex number to every whole number, depends only on the remainder when the number is divided by qq, and multiplies correctly: the value at a product is the product of the values. It is zero on numbers that share a factor with qq. Together the characters for one modulus describe every way the numbers coprime to qq can be sorted, and that sorting is the tool Dirichlet used to show that each such progression of remainders contains infinitely many primes.

Builds on: Group (Abstract Algebra), Complex Numbers, Euler's Totient Function · Leads to: primes in arithmetic progressions, and the analytic study of LL-functions

Where it's used

Primes in arithmetic progressions. The primes can be sorted by their remainder mod qq. Dirichlet's theorem says that every remainder aa that shares no factor with qq is hit by infinitely many primes. His proof uses one LL-function for each character, so the characters are the instruments that separate the classes and show that none of them is empty.

Primality tests. The Solovay–Strassen test checks a candidate number using the Jacobi symbol, a generalisation of the quadratic characters, which are the characters of order 2. The test is built on the arithmetic of residues mod the candidate, and the character values say which residues behave like squares.

Analytic number theory. The LL-function of a character is a sum over the integers, and its value at the point s=1s = 1 can be a familiar number. For the character mod 4 below, the series 1−13+15−⋯1 - \frac{1}{3} + \frac{1}{5} - \cdots is π/4\pi/4, the Leibniz series. The same kind of sum, with the character as its sign pattern, gives counts of primes in each class.

Counting primes by residue. Looking at how many primes fall into each residue class, as in the realistic example below, is a standard way to test whether classes are balanced, and the character sum measures the imbalance.

How it works

Start with the modulus q=5q = 5. The numbers 1,2,3,41, 2, 3, 4 share no factor with 5 (coprime to it), and multiplying them mod 5 gives back a number in the same set. These four residues form a group. Their generator is 22, because the powers of 22 mod 5 cycle through all four: 21=22^1 = 2, 22=42^2 = 4, 23=32^3 = 3, 24=12^4 = 1.

A character must send the group to the unit circle, the complex numbers of size 1, and it must respect multiplication. Here is one way to build it.

  1. Choose a value for the generator. Set χ(2)=i\chi(2) = i, where ii is the square root of −1-1. Any value zz of size 1 would do if z4=1z^4 = 1, because 22 returns to 11 after four steps and the character must return to 11 as well. The value ii is the simplest choice that is not 11 or −1-1. Check: ii has size 1, and i4=1i^4 = 1.
  2. Fill in the powers of the generator. Since 22=42^2 = 4 mod 5, we need χ(4)=χ(2)2=i2=−1\chi(4) = \chi(2)^2 = i^2 = -1. Since 23=32^3 = 3, we need χ(3)=i3=−i\chi(3) = i^3 = -i. Since 24=12^4 = 1, we need χ(1)=i4=1\chi(1) = i^4 = 1. Check: four steps around the cycle return to 1, as they must.
  3. Test multiplication. Take 2⋅3=6≡12 \cdot 3 = 6 \equiv 1. The rule requires χ(6)=χ(2)χ(3)=i⋅(−i)=1\chi(6) = \chi(2)\chi(3) = i \cdot (-i) = 1, and indeed χ(1)=1\chi(1) = 1. Check: the rule holds for this product.
  4. Extend to all integers. For a number nn that shares a factor with 5, set χ(n)=0\chi(n) = 0. Only n=0n = 0 mod 5 does this here. Check: χ(5)=0\chi(5) = 0, which keeps the multiplicative rule true for every product.
  5. Read the table. The character takes the values χ(1),χ(2),χ(3),χ(4),χ(5)\chi(1), \chi(2), \chi(3), \chi(4), \chi(5) equal to 1,i,−i,−1,01, i, -i, -1, 0, and then the same pattern repeats every 5 whole numbers. This is a Dirichlet character modulo 5.
flowchart LR
  A[Residues coprime to 5: 1, 2, 3, 4] --> B[Multiply mod 5]
  A --> C[Map each residue to a point on the unit circle]
  B --> D[Products match: chi of ab equals chi of a times chi of b]
  C --> D

The diagram says the same thing as the walkthrough: the character is a map that turns the multiplication of residues into multiplication of complex numbers.

The math

The formal definition and the main facts come in four parts, following the walkthrough: the group of units, the character as a homomorphism, the count and orthogonality of characters, and the LL-function.

Step 1 in symbols: the units mod q

Let (Z/qZ)×(\mathbb{Z}/q\mathbb{Z})^\times be the set of residues aa mod qq with gcd⁡(a,q)=1\gcd(a, q) = 1 (greatest common divisor 1), under multiplication mod qq. It is a group with φ(q)\varphi(q) elements, where φ\varphi is Euler's totient. For q=5q = 5 it is {1,2,3,4}\{1, 2, 3, 4\}, and φ(5)=4\varphi(5) = 4.

Step 2 in symbols: the character

A Dirichlet character modulo qq is a map χ:Z→C\chi : \mathbb{Z} \to \mathbb{C} with these properties:

χ(n+q)=χ(n),χ(mn)=χ(m) χ(n),χ(n)=0 when gcd⁡(n,q)>1,\chi(n + q) = \chi(n), \qquad \chi(mn) = \chi(m)\,\chi(n), \qquad \chi(n) = 0 \text{ when } \gcd(n, q) > 1,

and ∣χ(n)∣=1|\chi(n)| = 1 for the units. Restricted to (Z/qZ)×(\mathbb{Z}/q\mathbb{Z})^\times, the character is a group homomorphism to the unit circle, meaning a map that turns products into products. Euler's formula writes each such value as eiθe^{i\theta}, so the character is a set of angles, one per residue. Since aφ(q)≡1(modq)a^{\varphi(q)} \equiv 1 \pmod q for every unit aa (Euler's theorem), we get χ(a)φ(q)=1\chi(a)^{\varphi(q)} = 1, and every value is a root of unity.

In the example, χ(2)=i\chi(2) = i means χ(2)=eiπ/2\chi(2) = e^{i\pi/2}, so the angle is π/2\pi/2.

Step 3 in symbols: how many, and orthogonality

There are exactly φ(q)\varphi(q) characters modulo qq, and they form a group under pointwise multiplication. The principal character χ0\chi_0 is 1 on units and 0 elsewhere. Two relations are the reason characters are useful. For any unit aa,

∑χχ(a) χ(b)‾=φ(q)⋅1[a≡b(modq)],\sum_{\chi} \chi(a)\,\overline{\chi(b)} = \varphi(q) \cdot \mathbf{1}[a \equiv b \pmod q],

where the sum is over all characters and  ⋅ ‾\overline{\,\cdot\,} is complex conjugation. The indicator 1[⋅]\mathbf{1}[\cdot] is 1 when its statement is true and 0 otherwise. This lets a condition on the remainder be written as an average over characters, which is how Dirichlet split the primes into classes.

Step 4 in symbols: the L-function

For a character χ\chi and a complex number ss with real part greater than 1, define

L(s,χ)=∑n=1∞χ(n)ns.L(s, \chi) = \sum_{n=1}^{\infty} \frac{\chi(n)}{n^s}.

For a nonprincipal character the series also converges at s=1s = 1, and Dirichlet's proof depends on L(1,χ)≠0L(1, \chi) \neq 0 for every character. The character mod 4 gives L(1,χ4)=π/4L(1, \chi_4) = \pi/4, as the realistic example shows.

Worked examples

Example
Tiny: a character mod 5 at each value

Take the character mod 5 built above, with χ(2)=i\chi(2) = i, χ(4)=−1\chi(4) = -1, χ(3)=−i\chi(3) = -i, χ(1)=1\chi(1) = 1, and χ(5)=0\chi(5) = 0. Check the multiplicative rule on the pair (3,4)(3, 4).

  1. The product is 3⋅4=123 \cdot 4 = 12, and 12≡2(mod5)12 \equiv 2 \pmod 5. So χ(12)=χ(2)=i\chi(12) = \chi(2) = i.
  2. The product of the values is χ(3)χ(4)=(−i)(−1)=i\chi(3)\chi(4) = (-i)(-1) = i.
  3. The two sides agree: i=ii = i.
  4. Check a second pair, (2,2)(2, 2). The product is 44, so χ(4)=−1\chi(4) = -1, and χ(2)2=i2=−1\chi(2)^2 = i^2 = -1. They agree.

Interpretation: a character turns the arithmetic of residues into arithmetic of unit-circle points. Once the value at a generator is chosen, every other value is forced.

Example
Standard: the character mod 4 and the Leibniz series

The character mod 4 is χ4(n)=1\chi_4(n) = 1 if n≡1(mod4)n \equiv 1 \pmod 4, −1-1 if n≡3(mod4)n \equiv 3 \pmod 4, and 00 if nn is even. Its values for n=1,…,8n = 1, \dots, 8 are 1,0,−1,0,1,0,−1,01, 0, -1, 0, 1, 0, -1, 0.

  1. The terms of the LL-series at s=1s = 1 are χ4(n)/n\chi_4(n)/n. Start with n=1n = 1: the term is 11, and the partial sum is 11.
  2. Add n=3n = 3: the term is −1/3-1/3, so the partial sum is 2/3≈0.6672/3 \approx 0.667.
  3. Add n=5n = 5: the term is +1/5+1/5, so the partial sum is 13/15≈0.86713/15 \approx 0.867.
  4. Add n=7n = 7: the term is −1/7-1/7, so the partial sum is about 0.7240.724.
  5. Check: the partial sums after n=5n = 5 and after n=7n = 7 are on opposite sides of π/4≈0.785\pi/4 \approx 0.785. They bracket the limit.
  6. Interpretation: the series 1−13+15−17+⋯1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \cdots converges to L(1,χ4)=π/4L(1, \chi_4) = \pi/4. The character supplies the alternating signs, and its zeros on even numbers remove those terms entirely.

Try it: what is the partial sum after n=9n = 9? Answer: 0.724+1/9≈0.8350.724 + 1/9 \approx 0.835, which is above π/4\pi/4 again, so the sums keep oscillating around the limit.

Example
Realistic: primes split into two classes

Dirichlet's theorem says the primes split evenly in the long run between the two classes 11 and 33 mod 44, but the split at any finite point can be lopsided. Use the character χ4\chi_4 and sum it over the primes.

  1. The primes up to 20 are 2,3,5,7,11,13,17,192, 3, 5, 7, 11, 13, 17, 19. The prime 2 gets χ4(2)=0\chi_4(2) = 0, so it drops out.
  2. Primes ≡1(mod4)\equiv 1 \pmod 4 are 5,13,175, 13, 17, each with value +1+1. Their sum is 33.
  3. Primes ≡3(mod4)\equiv 3 \pmod 4 are 3,7,11,193, 7, 11, 19, each with value −1-1. Their sum is −4-4.
  4. The character sum over these primes is 3+(−4)=−13 + (-4) = -1.
  5. Check: the total number of odd primes is 7=3+47 = 3 + 4, and −1=3−4-1 = 3 - 4.
  6. Interpretation: up to 20, the class 3 mod 43 \bmod 4 has one more prime than the class 1 mod 41 \bmod 4. Character sums measure this lean, and it is a known pattern that the class 3 mod 43 \bmod 4 tends to lead at small ranges.

Try it: how does the character sum change when the primes up to 30 are included? Answer: add 23≡323 \equiv 3 (value −1-1) and 29≡129 \equiv 1 (value +1+1), giving −1−1+1=−1-1 - 1 + 1 = -1. The sum stays at −1-1, with class 11 having 5,13,17,295, 13, 17, 29 and class 33 having 3,7,11,19,233, 7, 11, 19, 23.

Common mistakes and tradeoffs

Misconception 1: any function that repeats mod q is a character. It is tempting to think that periodicity is the whole definition. In fact a character must also be multiplicative, and it must be zero on numbers that are not coprime to qq. The constant pattern 11 fails the zero rule: 22 shares a factor with 44, so χ(2)\chi(2) must be 00, and the constant pattern gives 11.

Misconception 2: the principal character is trivial. It is tempting to think that the character that is 1 on units is the same as the constant function 1. In fact it is 0 at every number that shares a factor with qq, not only at multiples of qq, so it keeps the zero rule. It is still the right character for counting numbers coprime to qq, which is what the orthogonality relation uses.

Misconception 3: there is one character per modulus. It is tempting to think of a character as a single object. In fact there are φ(q)\varphi(q) of them, and their values together describe the whole group of units.

When to use it. Use characters when a question is about residue classes that are coprime to a modulus, when a sum over integers needs a sign or weight pattern, or when a result holds for a whole class of residues at once. Do not reach for them when a simple congruence check answers the question.

SituationWhat goes wrongBetter choice
Whether a residue is a square, for a prime modulusOrder-2 characters answer it, which is more machinery than neededThe Legendre symbol, which is the quadratic character for a prime
Only one residue class mattersFull character theory is more than neededA direct congruence check
Modulus is not prime and the group is not cyclicCharacter values are harder to write downDecompose the group into cyclic factors and combine characters
Need the density of primes in a classCharacters give the answer only through LL-functionsAnalytic tools built on L(s,χ)L(s, \chi)

History

Peter Gustav Lejeune Dirichlet introduced characters in 1837 to prove that every progression a,a+q,a+2q,…a, a + q, a + 2q, \dots with gcd⁡(a,q)=1\gcd(a, q) = 1 contains infinitely many primes. Earlier results had handled special cases, but his method was new: he used sums over the integers, weighted by characters, and showed that the sums do not vanish.

The method became the foundation of analytic number theory. Later mathematicians studied the LL-functions of characters in detail, and the question of whether L(1,χ)≠0L(1, \chi) \neq 0 remained central to proofs. The idea of decomposing a finite group by its characters also spread into algebra and physics, where it is called the representation theory of finite groups.

The Leibniz series 1−13+15−⋯=π/41 - \frac{1}{3} + \frac{1}{5} - \cdots = \pi/4 was known well before characters were defined, and the character mod 4 shows that it is an LL-value. This is one of the early links between a simple sign pattern and the analytic structure of the integers.

Recap

  • A Dirichlet character mod qq is a multiplicative function of the integers that depends only on the residue mod qq and is zero on numbers sharing a factor with qq.
  • Restricted to the units mod qq, a character is a homomorphism to the unit circle, so its values are roots of unity fixed by a choice at a generator.
  • There are φ(q)\varphi(q) characters, and they satisfy orthogonality relations that let a residue condition be written as an average over them.
  • The LL-function L(s,χ)L(s, \chi) turns a character into a sum over the integers, and its value at s=1s = 1 gives results such as π/4\pi/4.
  • Next, read about primes in arithmetic progressions for the theorem these tools prove, and Cyclic Group for the group structure behind the units.

Check yourself

QuestionRecall: what are the three defining properties of a Dirichlet character modulo qq?Show answer

It is periodic mod qq, so χ(n+q)=χ(n)\chi(n + q) = \chi(n). It is completely multiplicative, so χ(mn)=χ(m)χ(n)\chi(mn) = \chi(m)\chi(n) for all integers mm and nn. And it is zero on every integer that shares a factor with qq. For the units mod qq, the values also have size 1.

QuestionComputation: a character mod 5 has χ(2)=i\chi(2) = i. What are χ(3)\chi(3), χ(4)\chi(4) and χ(1)\chi(1)?Show answer

Since 23≡3(mod5)2^3 \equiv 3 \pmod 5, we have χ(3)=χ(2)3=i3=−i\chi(3) = \chi(2)^3 = i^3 = -i. Since 22≡42^2 \equiv 4, we have χ(4)=χ(2)2=i2=−1\chi(4) = \chi(2)^2 = i^2 = -1. Since 24≡12^4 \equiv 1, we have χ(1)=χ(2)4=i4=1\chi(1) = \chi(2)^4 = i^4 = 1, which agrees with the requirement that χ(1)=1\chi(1) = 1 for any character.

QuestionWhy: why does a nonprincipal character give a sum over the integers that can be used to split primes into classes, when the constant function 1 cannot?Show answer

The constant function 1 gives the same weight to every residue class, so it counts all numbers coprime to qq equally and cannot separate classes. A nonprincipal character takes different values on different units and sums to zero over the units. The orthogonality relation then lets the indicator of one residue class be written as an average of characters, which turns a question about one class into sums that can be estimated analytically.

QuestionApplied: a student counts primes mod 4 up to 50 and finds that class 1 has more primes than class 3. Does this contradict Dirichlet's theorem, and what should they check?Show answer

It does not contradict the theorem. Dirichlet's theorem says both classes contain infinitely many primes, not that they are equal at every finite point. The student should compute the character sum ∑χ4(p)\sum \chi_4(p) over the primes up to 50, which measures the difference between the two classes, and check that the count is correct. They should also check that the bound they use does not include the prime 2, which is not in either class. A lopsided count at a finite range is expected, and the long-run split is the claim the theorem makes.

Sources