Quadratic reciprocity
In number theory, the law of quadratic reciprocity is a theorem about modular arithmetic that gives conditions for the solvability of quadratic equations modulo prime numbers. Due to its subtlety, it has many formulations, but the most standard statement is: This law, together with its supplements, allows the easy calculation of any Legendre symbol, making it possible to determine whether there is an integer solution for any quadratic equation of the form x 2 ≡ a ( mod p ) {\displaystyle x^{2}\equiv a{\pmod {p}}} for an odd prime p {\displaystyle p} ; that is, to determine the "perfect squares" modulo p {\displaystyle p} .