Definition:Quadratic Residue

Definition
Let $p$ be an odd prime.

Let $a \in \Z$ be an integer such that $a \not \equiv 0 \pmod p$.

Then $a$ is a quadratic residue of $p$ $x^2 \equiv a \pmod p$ has a solution.

That is, :
 * $\exists x \in \Z: x^2 \equiv a \pmod p$

Also see

 * Definition:Legendre Symbol.


 * Number of Quadratic Residues of Prime


 * Congruent Integers are of same Quadratic Character

Note
The case where $a = 0$ has been excluded from the definition, despite the fact that $0 = 0^2$ and so is definitely a square.

The case where $p = 2$ is also excluded, where the only non-zero residue $1$ is also a square.

The main reason for this is so that some useful results can be expressed in a convenient form.

For example, this means that from Number of Quadratic Residues of Prime the number of quadratic residues of $p$ is always equal to $\dfrac {p-1} 2$, which is the same as the number of quadratic non-residues.