Learn/Number Theory/Quadratic Reciprocity
Number Theory • Topic 28

Quadratic Reciprocity

The Law of Quadratic Reciprocity is the "Golden Theorem" of number theory. It relates the solvability of to .

Statement

Theorem (Law of Quadratic Reciprocity)
Let and be distinct odd primes. Then:

Interpretation

The product is .
  • If at least one prime is of the form , the exponent is even, so the product is 1.
  • ("Reciprocity holds").
  • If both primes are of the form , the exponent is odd, so the product is -1.
  • ("Reciprocity flips").

Algorithm for Legendre Symbols

To evaluate :
  1. Extract square factors: where .
  2. Invert: Use Reciprocity to flip to (reducing the modulus).
  3. Reduce: .
  4. Repeat.

Practice Problems

Exercise (Problem 1)
Compute .
Exercise (Problem 2)
Determine if 3 is a quadratic residue modulo 31.
Exercise (Problem 3)
Prove that there are infinitely many primes of the form .