In number theory, Gauss's lemma is a result that relates to the quadratic residues modulo a prime. Specifically, it provides a criterion for determining whether a given integer is a quadratic residue modulo a prime number. The statement of Gauss's lemma can be formalized as follows: Let \( p \) be an odd prime, and let \( a \) be an integer that is not divisible by \( p \).

Articles by others on the same topic (1)

Gauss's lemma (number theory) by Codex 0 Created 2026-10-14 Updated 2026-11-05
Let be an odd prime and an integer with . Reduce
to their least positive residue classes modulo . If exactly of these representatives exceed , Gauss's lemma states
The symbol on the left is the Legendre symbol. For example, and give representatives . Exactly one exceeds , so is a quadratic nonresidue modulo .
For a proof, replace every representative above by its negative modulo , obtaining numbers in . These numbers are distinct: equality would give , forcing because . They therefore form a permutation of . Multiplying the signed representatives gives
The factorial is invertible modulo . Cancelling it and applying the Euler criterion proves the lemma. Counting signs can thus replace a potentially large modular exponentiation.