Reciprocity
Quadratic Reciprocity
In this lesson, reciprocity refers to the concept of generalizing quadratic reciprocity. Quadratic reciprocity is the study of perfect square residues. It asks when these perfect squares exist and what they are. The law of quadratic reciprocity gives conditions for some residue mod to have a square root, or a number mod such that mod . Hence -th reciprocity is the property of having a -th root. In other words, some number such that mod .
Example: and always have -th roots mod for any because and mod .
But do -th roots exist for all remainders and all moduli? The answer is no! The following visualization demonstrates the numbers in the range of the function mod for a given exponent and modulus . If a number is in the range of the function, that means it has a -th root mod , and the roots are the points that map to .
Example: , , and are the only numbers with square roots mod . Using the visual, are there any solutions to mod ? What are they and how do you know?
Modulus: |
Legendre Symbols
As it turns out, there exists a formula to determine whether or not a number is a quadratic residue modulo some number . This formula starts by finding the prime decomposition of and determining whether or not a number is a quadratic residue modulo for some prime dividing .
To do this, we use the language of Legendre symbols: for all integers and odd primes ,
In other words, for nonzero , means that is a quadratic residue mod . Similarly, means that is not a quadratic residue mod . In this case, we call either a quadratic non-residue or a non-quadratic residue.
As with the previous example, . Since and are quadratic residues mod , . Since and are quadratic non-residues mod , .
Euler's Criterion
We can derive Euler's criterion to determine whether is a quadratic residue modulo :
Using this formula, we can determine if is a quadratic residue mod in two steps: first, compute mod , and then check whether it equals or .
The following visual only allows for you to enter a prime modulus . The mapping is from a remainder to mod . If the arrow is on , the remainder is a quadratic residue mod . If the arrow is on , the number is a quadratic non-residue mod .
Modulus: | 5 | ||
Number to map: |
Quadratic Reciprocity Law
Finally, we arrive at the quadratic reciprocity law: for any distinct odd primes and ,
This result allows us to switch the order of Legendre symbols and introduces a parity condition based on the primes themselves. If one of the primes is congruent to modulo , we have . If both of the primes are congruent to modulo , we have . This dictates whether or not the number is a quadratic residue.
Example: we already saw that . How can we determine ?
1. Since mod , we automatically know
2. If we do it brute-force, notice mod and reduce to
3. Check and to see that is a quadratic non-residue mod . So,
Using the quadratic reciprocity law and the supplementary laws for the Legendre symbol, we can determine whether is a quadratic residue modulo any odd prime . Try it yourself. You can even change the exponent to check cubic reciprocity, quartic reciprocity, and more.
Modulus: | |||
Exponential mapping: |