Quadratic Residues
8.1 Quadratic Residues
Section titled “8.1 Quadratic Residues”Definition. For prime and , is a quadratic residue (QR) mod if is solvable, and a non-residue otherwise.
For odd , exactly half of the nonzero residue classes are QRs: the map on is two-to-one ( and ), so its image has elements. Example mod 7: squares are ; QRs are .
8.2 Euler’s Criterion
Section titled “8.2 Euler’s Criterion”Proof sketch. With a primitive root, ; then iff , i.e. even iff is a QR. If is a non-residue ( odd), squares to 1 but is not 1, hence is (only two square roots of 1 mod ).
8.3 The Legendre Symbol
Section titled “8.3 The Legendre Symbol”Euler’s criterion becomes ; a fast evaluation method.
Properties.
- Multiplicativity: .
- : is a QR exactly for .
- : 2 is a QR exactly for .
- Quadratic reciprocity (Gauss): for odd primes , ; the deep theorem that lets you evaluate any Legendre symbol by repeated reduction.
Worked example. Is 5 a QR mod 23? . Reciprocity: (sign ), and : (squares mod 5 are 1, 4). So 5 is a non-residue mod 23. Check by Euler: .
8.4 Counting Solutions of
Section titled “8.4 Counting Solutions of x2≡ax^2 \equiv ax2≡a”For odd and :
- QR: exactly two solutions, and (found by Tonelli’s algorithm or trial).
- non-residue: zero solutions.
The equation behaves differently: solutions lift uniquely from mod when is odd. For the 2-adic analysis is more delicate; a favourite distinction-level question.
8.5 Worked Problems
Section titled “8.5 Worked Problems”Problem 1. Determine and, if 7 is a QR, solve .
Euler: : , , . So 7 is a non-residue: no solutions.
Problem 2. Show is solvable iff or . Euler: iff .
8.6 Common Pitfalls
Section titled “8.6 Common Pitfalls”- Euler’s criterion works only for odd prime .
- gives two solutions, not one: remember .
- Reciprocity sign bookkeeping: the exponent is ; an odd product flips the symbol, an even one does not.
- Composite moduli need the Jacobi symbol , which is multiplicative but does not decide solvability when is composite: does not imply is solvable.
See Also
Section titled “See Also”8.x A Counting Check
Section titled “8.x A Counting Check”Mod 11, the QRs are ; exactly classes. Verify by squaring and note the symmetry and share a square.
Euler’s criterion doubles as a computation recipe: exponentiate and read the sign. For , : , so 5 is a non-residue and has no solution. Pair this with reciprocity for a two-mark derivation.
Euler’s criterion doubles as a computation recipe: exponentiate and read the sign. For , : , so 5 is a non-residue and has no solution. Pair this with reciprocity for a two-mark derivation. Euler’s criterion also solves : when for , squaring recovers ; the two solutions are negatives of each other.
8.x A QR Table Worth Memorising
Section titled “8.x A QR Table Worth Memorising”Mod 11 the QRs are and mod 13 they are ; five and six classes respectively, each exactly half of the nonzero residues as Euler’s criterion predicts.