# Definition:Legendre Symbol

## Definition

Let $p$ be an odd prime.

Let $a \in \Z$ be an integer.

### Definition 1

The Legendre symbol $\left({\dfrac a p}\right)$ is defined as:

$\left({\dfrac a p}\right) := \begin{cases} +1 & : a^{\frac{(p - 1)} 2} \bmod p = 1 \\ 0 & : a^{\frac{(p - 1)} 2} \bmod p = 0 \\ -1 & : a^{\frac{(p - 1)} 2} \bmod p = p - 1 \end{cases}$

### Definition 2

The Legendre symbol $\left({\dfrac a p}\right)$ is defined as:

$\left({\dfrac a p}\right) := a^{\frac{(p - 1)} 2} \bmod p$

For a given $p$, the Legendre symbol is usually treated as a function $f_p: \Z \to \left\{{-1, 0, 1}\right\}$.

## Also known as

The Legendre symbol for fixed prime $p$ is also known as the quadratic character modulo $p$.

## Source of Name

This entry was named for Adrien-Marie Legendre.

## Historical Note

The Legendre symbol was introduced by Adrien-Marie Legendre in Paris in $1798$, during his partly successful attempt to prove the Law of Quadratic Reciprocity.

The function was later expanded into the Jacobi symbol, the Kronecker symbol, the Hilbert symbol and the Artin symbol.