Square Roots

Let pPp ∈ P be a prime number and FpF_p its associated prime field. Then a number xFpx ∈ F_p is called a square root of another number yFpy ∈ F_p, if xx is a solution to the following equation:

x2=y.x^2 = y.

In this case, yy is called a quadratic residue. On the other hand, if yy is given and the quadratic equation has no solution xx , we call yy a quadratic non-residue.

For any yFpy ∈ F_p, we denote the set of all square roots of yy in the prime field FpF_p as follows:

y={xFpx2=y}.\sqrt y = \{x \in F_p | x^2 = y\}.

If yy is a quadratic non-residue, then y=\sqrt y = \empty (an empty set), and if y=0y = 0, then y={0}\sqrt y = \{0\}. Moreover if y0y \neq 0 is a quadratic residue, then it has precisely two roots y={x,px}\sqrt y = \{x, p − x\} for some xFpx ∈ F_p. We adopt the convention to call the smaller one (when interpreted as an integer) the positive square root and the larger one the negative square root.

If pP3p ∈ P_{≥3} is an odd prime number with associated prime field FpF_p, then there are precisely (p+1)/2(p + 1)/2 many quadratic residues and (p1)/2(p − 1)/2 quadratic non-residues.

Legendre symbol

In order to describe whether an element of a prime field is a square number or not, the so-called Legendre symbol can sometimes be found in the literature.

Let pPp ∈ P be a prime number and yFpy ∈ F_p an element from the associated prime field. Then the Legendre symbol of yy is defined as follows:

(yp)={1 if y has square roots1 if y has no square roots0 if y=0\Big(\frac{y}{p}\Big) = \begin{cases} 1 \text{ if } y \text{ has square roots} \\ -1 \text{ if } y \text{ has no square roots} \\ 0 \text{ if } y = 0 \end{cases}

The Legendre symbol provides a criterion to decide whether or not an element from a prime field has a quadratic root or not. This, however, is not just of theoretical use: the so-called Euler criterion provides a compact way to actually compute the Legendre symbol. To see that, let pP3p ∈ P_{≥3} be an odd prime number and yFpy ∈ F_p. Then the Legendre symbol can be computed as follows:

(yp)=yp12\Big(\frac{y}{p}\Big) = y^{\frac{p-1}{2}}

Last updated