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 is an odd prime, then the Legendre symbol if is a quadratic residue of , if is a quadratic non-residue of , and if (mod ).

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

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 is a Dirichlet character mod . 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 is a completely multiplicative function of .

II. The Legendre symbol is periodic with period .

III. The Legendre symbol vanishes when .

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

(mod )

and therefore (by property (a) above)

so the Legendre symbol is periodic with period .

To prove I, observe that if or then (mod ) so

since at least one of or must be zero.

If and , then and we have (by property (d) above)

(mod )

Therefore

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

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

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

(mod )

(mod )

(mod )

so the quadratic residues of are , and and the quadratic non-residues are , and . The Legendre symbol therefore takes the values

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

Thus, mod .

For a second example, let . We have

(mod )

(mod )

(mod )

(mod )

(mod )

so the quadratic residues of are , and , and and the quadratic non-residues are , and , , and . The Legendre symbol therefore takes the values

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

Thus, mod .