Law of reciprocity" redirects here. For the philosophical concept known as the "ethic of reciprocity", see Golden rule
In number theorem, the law of quadratic reciprocity is a theorem about modular arithmetic that gives conditions for the solvability of quadratic equetions modulo prime numbers. There are a number of equivalent statement of the theorem. One version of the law states that
for p and q odd prime numbers, and denoting the legendre symbols.