Advanced Number Theory Note #15: The Legendre symbol (a|p) as a Dirichlet character mod p

Legendre The Legendre symbol was introduced by the great 19th Century mathematician Adrien-Marie Legendre (the charicature shown here is the only known contemporary likeness of him). It has proved to be very useful as a shorthand for stating a number’s quadratic character and also in calculations thereof.

If p is an odd prime, then the Legendre symbol (a|p) = 1 if a is a quadratic residue of p, (a|p) = -1 if a is a quadratic non-residue of p, and (a|p) = 0 if a \equiv 0 (mod p).

The Legendre symbol has a number of well known properties which are useful for calculations and are summarised here for convenience:

LegendreProperties

QuadraticCharacterOf2

QuadraticReciprocity

The last property, the law of quadratic reciprocity, is actually a deep result which has been studied in depth and proved in numerous different ways by Gauss and others. Indeed, it was for the purpose of finding his own proof of this result that Legendre invented the Legendre symbol. In a later note I will explore in detail a proof of the law of quadratic reciprocity using Gauss sums and Legendre symbols. This proof hinges on the fact that the Legendre symbol (a|p) is a Dirichlet character mod p. In the present short note I want to quickly show explicitly why this is the case by highlighting three key facts about Legendre symbols:

I. The Legendre symbol (a|p) is a completely multiplicative function of a.

II. The Legendre symbol (a|p) is periodic with period p.

III. The Legendre symbol vanishes when p|a.

Fact III follows immediately from the definition of Legendre symbols, and II is true because we have

a \equiv a +p (mod p)

and therefore (by property (a) above)

(a|p) = (a + p|p)

so the Legendre symbol is periodic with period p.

To prove I, observe that if p|a or p|b then ab \equiv 0 (mod p) so

(ab|p) = (a|p) \cdot (b|p) = 0

since at least one of (a|p) or (b|p) must be zero.

If p \not| a and p \not| b, then p \not| ab and we have (by property (d) above)

(ab|p) \equiv (ab)^{(p-1)/2}

\equiv (a)^{(p-1)/2} \cdot (b)^{(p-1)/2}

\equiv (a|p) \cdot (b|p) (mod p)

Therefore

(ab|p) - (a|p) \cdot (b|p)

is divisible by p, and since this difference cannot actually equal a multiple of p (the terms can only take the values 1 or -1), the difference must be zero. The Legendre symbol is therefore completely multiplicative as claimed in I.

Since (a|p) is a completely multiplicative function of a which is periodic with period p and vanishes when p|a, it follows that (a|p) is a Dirichlet character \chi(a) mod p as claimed.

I will illustrate this with two examples. First, let p = 7. We have

1^2 \equiv 1 (mod 7)

2^2 \equiv 4 (mod 7)

3^2 \equiv 2 (mod 7)

so the quadratic residues of 7 are 1, 2 and 4 and the quadratic non-residues are 3, 5 and 6. The Legendre symbol (a|7) therefore takes the values

(1|7) = 1

(2|7) = 1

(3|7) = -1

(4|7) = 1

(5|7) = -1

(6|7) = -1

These are exactly the values of the fourth character in the Dirichlet character table mod 7:

mod 07

Thus, (a|7) = \chi_4(a) mod 7.

For a second example, let p = 11. We have

1^2 \equiv 1 (mod 11)

2^2 \equiv 4 (mod 11)

3^2 \equiv 9 (mod 11)

4^2 \equiv 5 (mod 11)

5^2 \equiv 3 (mod 11)

so the quadratic residues of 11 are 1, 3 and 4, 5 and 9 and the quadratic non-residues are 2, 6 and 7, 8, and 10. The Legendre symbol (a|11) therefore takes the values

(1|11) = 1

(2|11) = -1

(3|11) = 1

(4|11) = 1

(5|11) = 1

(6|11) = -1

(7|11) = -1

(8|11) = -1

(9|11) = 1

(10|11) = -1

These are exactly the values of the sixth character in the Dirichlet character table mod 11:

mod 11

Thus, (a|11) = \chi_6(a) mod 11.