Quadratic reciprocity
Statement
If are distinct odd prime numbers, then:
where and are the respective Legendre symbols: a Legendre symbol takes the value if the top value is a quadratic residue modulo the bottom value, and if the top value is a quadratic nonresidue modulo the bottom value.
The statement can also be captured using the following cases for the residue classes of and modulo :
Congruence class of mod | Congruence class of mod | Both quadratic residues mod each other? | Both quadratic nonresidues mod each other? | quadratic nonresidue mod , quadratic residue mod ? | quadratic residue mod , quadratic nonresidue mod ? |
---|---|---|---|---|---|
1 | 1 | Possible (example: 5, 29) | Possible (example: 5, 13) | Impossible | Impossible |
1 | -1 | Possible (example: 5, 19) | Possible (example: 5, 7) | Impossible | Impossible |
-1 | 1 | Possible (example: 19, 5) | Possible (example: 7, 5) | Impossible | Impossible |
-1 | -1 | Impossible | Impossible | Possible (example: 3,7) | Possible (example: 7, 3) |