Number System

Legendre Symbol

Square tiles are sorted into three compartments in a black-and-orange print.

Legendre Symbol definition

The Legendre symbol tells whether an integer is zero, a nonzero square, or a nonsquare modulo an odd prime.

In Spanish
símbolo de Legendre
Topic
Integer equations and number theory

Legendre Symbol in a picture

Legendre Symbol diagramModulo 7, squaring the nonzero residues gives the distinct values 1, 2, and 4.Reduce a modulo 7A multiple of 7 gives symbol 0Check the nonzero squaresThey are 1, 2, and 4Classify every other residueIt gives symbol −1
Modulo 7, squaring the nonzero residues gives the distinct values 1, 2, and 4.

How it works

For an odd prime p, write (a/p) as a symbol. Its value is 0 if p divides a, 1 if a is a nonzero square modulo p, and −1 otherwise. Euler’s criterion computes the same value modulo p from a^((p−1)/2).

Worked examples

Find the symbol (2/7).

It is 1 because 3² ≡ 2 modulo 7.

Find (3/7).

It is −1 because 3 is absent from the list of square residues.

Find (14/7).

It is 0 because 7 divides 14.

Common mistake

The notation resembles a fraction, but its value comes from modular squareness.

Quick check

What is the Legendre symbol (4/7)?

Which moduli are used in this definition?

Show answer

Odd primes.

What are its three possible values?

Show answer

−1, 0, and 1.

Sources

Flashcard

Legendre Symbol

Reveal the definition

The Legendre symbol tells whether an integer is zero, a nonzero square, or a nonsquare modulo an odd prime.

Effortless Math. “Legendre Symbol.” Math Dictionary.