Chapter 9 Quadratic Residues
Consider the quadratic congruence
where \(p\) is an odd prime, and \(a \not\equiv 0\pmod{p},\) so \(\gcd(a, p) = 1.\) Since \(p\) is an odd prime, \(\gcd(4a, p) = 1,\) so we can multiply each side by \(4a\) to get
Now
so that our congruence can be written
So we are interested in congruences of the form
If \(y\) is a solution, then \(p-y\) is also a solution, so the congruence has two solutions or no solutions.
Definition 9.0.1.
Let \(p\) be an odd prime, and \(\gcd(a, p) = 1.\) If the quadratic congruence \(x^2\equiv a\pmod{p}\) has a solution, then \(a\) is called a quadratic residue of \(p.\) If not, then \(a\) is called a quadratic nonresidue of \(p.\)
Example 9.0.2.
Consider \(p = 7.\) Then
so that \(1,2,4\) are quadratic residues of \(7,\) and \(3,5,6\) are quadratic nonresidues of \(7.\)
Theorem 9.0.3. Euler's Criterion.
Let \(p\) be an odd prime and \(\gcd(a, p) =1.\) Then \(a\) is a quadratic residue of \(p\) if and only if \(a^{\frac{(p-1)}{2}} \equiv 1 \pmod{p}.\)
Proof.
Suppose that \(a\) is a quadratic residue of \(p,\) so that \(x^2 \equiv a\pmod{p}\) has a solution, say \(y.\) Since \(\gcd(a, p) = 1,\) we have \(\gcd(y, p) = 1,\) and so using Fermat's Little Theorem we have
Conversely suppose that \(a^{(p-1)/2} \equiv 1\pmod{p}\) and let \(r\) be a primitive root of \(p.\) Then \(a \equiv r^k\pmod{p}\) for some \(k\) with \(1\leq k\leq p-1.\) So
But the order of \(r\) must divide \(k(p-1)/2;\) that is, \(p-1\vert k(p- 1)/2,\) so that \(k\) must be even, say \(k = 2n\) for some \(n.\) Thus
so that \(r^n\) is a solution to \(x^2 \equiv a\pmod{p}\) and \(a\) is a quadratic residue of \(p.\)
Corollary 9.0.4.
Let \(p\) be an odd prime and \(\gcd(a, p) = 1.\) Then \(a\) is a quadratic residue or nonresidue of \(p\) according to whether
Proof.
Let \(\gcd(a, p) = 1.\) Then by Fermat's Little Theorem we have that
so that either
If the first congruence holds, then \(a\) is a quadratic residue of \(p.\) If the first does not hold, then the second must, and \(a\) is a quadratic nonresidue of \(p.\)
Example 9.0.5.
Consider \(p = 13.\) Now
and
so that \(2\) is a quadratic nonresidue of \(13\) and \(3\) is a quadratic residue of \(13.\)