- Start
- Modular arithmetic
2 be two distinct (positive odd) prime numbers. Then (Supplement 1) x = -1 (mod p) is solvable if and only if p = 1 (mod 4).(Supplement 2) x = 2 (mod p) is solvable if and only if p = ±1 (mod 8).(Quadratic reciprocity)Let q = ±q where the sign is plus if q = 1 (mod 4) and minus if q = -1 (mod 4). (I.e. |q | = q and q = 1 (mod 4).) Then x = p (mod q) is solvable if and only if x = q (mod p) is solvable.Although the law can be used to tell whether any quadratic equation modulo a prime number has a solution, it does not provide any help at all for actually finding the solution. (The article on quadratic residues discusses algorithms for this.) The theorem was conjectured by Euler and Legendre and first proven by Gauss. He refers to it as the "fundamental theorem" in the Disquisitiones Arithmeticae and his papers, privately he referred to it as the "golden theorem." He published six proofs, and two more were found in his posthumous papers. There are now over 200 published proofs. The first section of this article does not use the Legendre symbol and gives the formulations of quadratic reciprocity found by Legendre and Gauss. The Legendre-Jacobi symbol is introduced in the second section. A quadratic residue (mod n) is any number congruent to a square (mod n). A quadratic nonresidue (mod n) is any number which is not congruent to a square (mod n). The adjective "quadratic" can be dropped if the context makes it clear that it is implied. When working modulo primes (as in this article), it is usual to treat zero as a special case. By doing so, the following statements become true: Modulo a prime, there are an equal number of quadratic residues and nonresidues. Modulo" />