Quadratic reciprocity
Adapted from Wikipedia · Discoverer experience
In number theory, the law of quadratic reciprocity is a fascinating theorem that helps us solve quadratic equations when working with prime numbers. It tells us how to determine whether a number can be a perfect square modulo another number. This idea might sound complicated, but it’s like a special rule that makes solving these kinds of problems much easier.
The law was first clearly stated by mathematicians Leonhard Euler and Adrien-Marie Legendre, and later proven by Carl Friedrich Gauss, who called it the "fundamental theorem" and even the "golden theorem" in private notes. Gauss was so excited about this theorem that he found six different ways to prove it, and even after he passed away, two more proofs were discovered in his papers!
Quadratic reciprocity is not just a curious math trick; it has had a huge impact on many areas of modern mathematics. It helped shape the development of modern algebra, algebraic geometry, and even led to big ideas like class field theory and the Langlands program. Today, there are over 240 known proofs of this theorem, showing just how important and interesting it is to mathematicians around the world.
Motivating examples
Quadratic reciprocity helps us understand patterns in numbers that are perfect squares modulo certain primes. Let’s look at some examples.
Consider the expression ( n^2 - 5 ). When we look at the prime factors of this expression for different values of ( n ), we notice something interesting: certain primes, like those ending in 1 or 9, appear, while others, like those ending in 3 or 7, do not. This pattern helps us understand when a number like 5 can be written as a square modulo a prime ( p ).
Quadratic residues are numbers that can be written as a square modulo a prime. For example, modulo 5, the numbers 1 and 4 are quadratic residues because they are squares of 1 and 2, respectively. The study of these residues shows patterns that are useful in number theory. For instance, the product of two quadratic residues is also a residue, while the product of a residue and a non-residue is a non-residue. These patterns help mathematicians solve complex problems involving primes and squares.
| n | f ( n ) {\displaystyle f(n)} | f ( n ) {\displaystyle f(n)} | n | |||||
|---|---|---|---|---|---|---|---|---|
| 1 | −4 | −22 | 16 | 251 | 251 | 31 | 956 | 22⋅239 |
| 2 | −1 | −1 | 17 | 284 | 22⋅71 | 32 | 1019 | 1019 |
| 3 | 4 | 22 | 18 | 319 | 11⋅29 | 33 | 1084 | 22⋅271 |
| 4 | 11 | 11 | 19 | 356 | 22⋅89 | 34 | 1151 | 1151 |
| 5 | 20 | 22⋅5 | 20 | 395 | 5⋅79 | 35 | 1220 | 22⋅5⋅61 |
| 6 | 31 | 31 | 21 | 436 | 22⋅109 | 36 | 1291 | 1291 |
| 7 | 44 | 22⋅11 | 22 | 479 | 479 | 37 | 1364 | 22⋅11⋅31 |
| 8 | 59 | 59 | 23 | 524 | 22⋅131 | 38 | 1439 | 1439 |
| 9 | 76 | 22⋅19 | 24 | 571 | 571 | 39 | 1516 | 22⋅379 |
| 10 | 95 | 5⋅19 | 25 | 620 | 22⋅5⋅31 | 40 | 1595 | 5⋅11⋅29 |
| 11 | 116 | 22⋅29 | 26 | 671 | 11⋅61 | 41 | 1676 | 22⋅419 |
| 12 | 139 | 139 | 27 | 724 | 22⋅181 | 42 | 1759 | 1759 |
| 13 | 164 | 22⋅41 | 28 | 779 | 19⋅41 | 43 | 1844 | 22⋅461 |
| 14 | 191 | 191 | 29 | 836 | 22⋅11⋅19 | 44 | 1931 | 1931 |
| 15 | 220 | 22⋅5⋅11 | 30 | 895 | 5⋅179 | 45 | 2020 | 22⋅5⋅101 |
| n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| n2 | 1 | 4 | 9 | 16 | 25 | 36 | 49 | 64 | 81 | 100 | 121 | 144 | 169 | 196 | 225 | 256 | 289 | 324 | 361 | 400 | 441 | 484 | 529 | 576 | 625 |
| mod 3 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 |
| mod 5 | 1 | 4 | 4 | 1 | 0 | 1 | 4 | 4 | 1 | 0 | 1 | 4 | 4 | 1 | 0 | 1 | 4 | 4 | 1 | 0 | 1 | 4 | 4 | 1 | 0 |
| mod 7 | 1 | 4 | 2 | 2 | 4 | 1 | 0 | 1 | 4 | 2 | 2 | 4 | 1 | 0 | 1 | 4 | 2 | 2 | 4 | 1 | 0 | 1 | 4 | 2 | 2 |
| mod 11 | 1 | 4 | 9 | 5 | 3 | 3 | 5 | 9 | 4 | 1 | 0 | 1 | 4 | 9 | 5 | 3 | 3 | 5 | 9 | 4 | 1 | 0 | 1 | 4 | 9 |
| mod 13 | 1 | 4 | 9 | 3 | 12 | 10 | 10 | 12 | 3 | 9 | 4 | 1 | 0 | 1 | 4 | 9 | 3 | 12 | 10 | 10 | 12 | 3 | 9 | 4 | 1 |
| mod 17 | 1 | 4 | 9 | 16 | 8 | 2 | 15 | 13 | 13 | 15 | 2 | 8 | 16 | 9 | 4 | 1 | 0 | 1 | 4 | 9 | 16 | 8 | 2 | 15 | 13 |
| mod 19 | 1 | 4 | 9 | 16 | 6 | 17 | 11 | 7 | 5 | 5 | 7 | 11 | 17 | 6 | 16 | 9 | 4 | 1 | 0 | 1 | 4 | 9 | 16 | 6 | 17 |
| mod 23 | 1 | 4 | 9 | 16 | 2 | 13 | 3 | 18 | 12 | 8 | 6 | 6 | 8 | 12 | 18 | 3 | 13 | 2 | 16 | 9 | 4 | 1 | 0 | 1 | 4 |
| mod 29 | 1 | 4 | 9 | 16 | 25 | 7 | 20 | 6 | 23 | 13 | 5 | 28 | 24 | 22 | 22 | 24 | 28 | 5 | 13 | 23 | 6 | 20 | 7 | 25 | 16 |
| mod 31 | 1 | 4 | 9 | 16 | 25 | 5 | 18 | 2 | 19 | 7 | 28 | 20 | 14 | 10 | 8 | 8 | 10 | 14 | 20 | 28 | 7 | 19 | 2 | 18 | 5 |
| mod 37 | 1 | 4 | 9 | 16 | 25 | 36 | 12 | 27 | 7 | 26 | 10 | 33 | 21 | 11 | 3 | 34 | 30 | 28 | 28 | 30 | 34 | 3 | 11 | 21 | 33 |
| mod 41 | 1 | 4 | 9 | 16 | 25 | 36 | 8 | 23 | 40 | 18 | 39 | 21 | 5 | 32 | 20 | 10 | 2 | 37 | 33 | 31 | 31 | 33 | 37 | 2 | 10 |
| mod 43 | 1 | 4 | 9 | 16 | 25 | 36 | 6 | 21 | 38 | 14 | 35 | 15 | 40 | 24 | 10 | 41 | 31 | 23 | 17 | 13 | 11 | 11 | 13 | 17 | 23 |
| mod 47 | 1 | 4 | 9 | 16 | 25 | 36 | 2 | 17 | 34 | 6 | 27 | 3 | 28 | 8 | 37 | 21 | 7 | 42 | 32 | 24 | 18 | 14 | 12 | 12 | 14 |
| q | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | 5 | 7 | 11 | 13 | 17 | 19 | 23 | 29 | 31 | 37 | 41 | 43 | 47 | 53 | 59 | 61 | 67 | 71 | 73 | 79 | 83 | 89 | 97 | ||
| p | 3 | N | R | N | R | N | R | N | N | R | R | N | R | N | N | N | R | R | N | R | R | N | N | R | |
| 5 | N | N | R | N | N | R | N | R | R | N | R | N | N | N | R | R | N | R | N | R | N | R | N | ||
| 7 | N | N | R | N | N | N | R | R | N | R | N | R | N | R | N | N | R | R | N | R | N | N | N | ||
| 11 | R | R | N | N | N | N | R | N | R | R | N | N | R | R | R | N | R | R | N | N | N | R | R | ||
| 13 | R | N | N | N | R | N | R | R | N | N | N | R | N | R | N | R | N | N | N | R | N | N | N | ||
| 17 | N | N | N | N | R | R | N | N | N | N | N | R | R | R | R | N | R | N | N | N | R | R | N | ||
| 19 | N | R | R | R | N | R | R | N | N | N | N | R | R | N | N | R | N | N | R | N | R | N | N | ||
| 23 | R | N | N | N | R | N | N | R | R | N | R | N | R | N | R | N | N | R | R | N | N | N | N | ||
| 29 | N | R | R | N | R | N | N | R | N | N | N | N | N | R | R | N | R | R | N | N | R | N | N | ||
| 31 | N | R | R | N | N | N | R | N | N | N | R | N | R | N | R | N | R | R | N | N | N | N | R | ||
| 37 | R | N | R | R | N | N | N | N | N | N | R | N | R | R | N | N | R | R | R | N | R | N | N | ||
| 41 | N | R | N | N | N | N | N | R | N | R | R | R | N | N | R | R | N | N | R | N | R | N | N | ||
| 43 | N | N | N | R | R | R | N | R | N | R | N | R | R | R | R | N | R | N | N | R | R | N | R | ||
| 47 | R | N | R | N | N | R | N | N | N | N | R | N | N | R | R | R | N | R | N | R | R | R | R | ||
| 53 | N | N | R | R | R | R | N | N | R | N | R | N | R | R | R | N | N | N | N | N | N | R | R | ||
| 59 | R | R | R | N | N | R | R | N | R | N | N | R | N | N | R | N | N | R | N | R | N | N | N | ||
| 61 | R | R | N | N | R | N | R | N | N | N | N | R | N | R | N | N | N | N | R | N | R | N | R | ||
| 67 | N | N | N | N | N | R | R | R | R | N | R | N | N | R | N | R | N | R | R | N | R | R | N | ||
| 71 | R | R | N | N | N | N | R | N | R | N | R | N | R | N | N | N | N | N | R | R | R | R | N | ||
| 73 | R | N | N | N | N | N | R | R | N | N | R | R | N | N | N | N | R | R | R | R | N | R | R | ||
| 79 | N | R | N | R | R | N | R | R | N | R | N | N | N | N | N | N | N | R | N | R | R | R | R | ||
| 83 | R | N | R | R | N | R | N | R | R | R | R | R | N | N | N | R | R | N | N | N | N | N | N | ||
| 89 | N | R | N | R | N | R | N | N | N | N | N | N | N | R | R | N | N | R | R | R | R | N | R | ||
| 97 | R | N | N | R | N | N | N | N | N | R | N | N | R | R | R | N | R | N | N | R | R | N | R | ||
| q | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 83 | 79 | 71 | 67 | 59 | 47 | 43 | 31 | 23 | 19 | 11 | 7 | 3 | 5 | 13 | 17 | 29 | 37 | 41 | 53 | 61 | 73 | 89 | 97 | ||
| p | 83 | N | N | N | R | N | N | R | R | N | R | R | R | N | N | R | R | R | R | N | R | N | N | N | |
| 79 | R | N | R | N | N | N | R | R | R | R | N | N | R | R | N | N | N | N | N | N | R | R | R | ||
| 71 | R | R | N | N | N | R | N | N | R | N | N | R | R | N | N | R | R | N | N | N | R | R | N | ||
| 67 | R | N | R | R | R | N | N | R | R | N | N | N | N | N | R | R | R | N | N | N | R | R | N | ||
| 59 | N | R | R | N | N | N | N | N | R | N | R | R | R | N | R | R | N | R | R | N | N | N | N | ||
| 47 | R | R | R | N | R | N | N | N | N | N | R | R | N | N | R | N | R | N | R | R | N | R | R | ||
| 43 | R | R | N | R | R | R | R | R | N | R | N | N | N | R | R | N | N | R | R | N | N | N | R | ||
| 31 | N | N | R | R | R | R | N | N | R | N | R | N | R | N | N | N | N | R | N | N | N | N | R | ||
| 23 | N | N | R | N | R | R | N | R | N | N | N | R | N | R | N | R | N | R | N | N | R | N | N | ||
| 19 | R | N | N | N | N | R | R | N | R | R | R | N | R | N | R | N | N | N | N | R | R | N | N | ||
| 11 | N | N | R | R | R | R | N | R | R | N | N | R | R | N | N | N | R | N | R | N | N | R | R | ||
| 7 | N | R | R | R | N | N | R | N | R | N | R | N | N | N | N | R | R | N | R | N | N | N | N | ||
| 3 | N | R | N | R | N | N | R | R | N | R | N | R | N | R | N | N | R | N | N | R | R | N | R | ||
| 5 | N | R | R | N | R | N | N | R | N | R | R | N | N | N | N | R | N | R | N | R | N | R | N | ||
| 13 | N | R | N | N | N | N | R | N | R | N | N | N | R | N | R | R | N | N | R | R | N | N | N | ||
| 17 | R | N | N | R | R | R | R | N | N | R | N | N | N | N | R | N | N | N | R | N | N | R | N | ||
| 29 | R | N | R | R | R | N | N | N | R | N | N | R | N | R | R | N | N | N | R | N | N | N | N | ||
| 37 | R | N | R | R | N | R | N | N | N | N | R | R | R | N | N | N | N | R | R | N | R | N | N | ||
| 41 | R | N | N | N | R | N | R | R | R | N | N | N | N | R | N | N | N | R | N | R | R | N | N | ||
| 53 | N | N | N | N | R | R | R | N | N | N | R | R | N | N | R | R | R | R | N | N | N | R | R | ||
| 61 | R | N | N | N | N | R | N | N | N | R | N | N | R | R | R | N | N | N | R | N | R | N | R | ||
| 73 | N | R | R | R | N | N | N | N | R | R | N | N | R | N | N | N | N | R | R | N | R | R | R | ||
| 89 | N | R | R | R | N | R | N | N | N | N | R | N | N | R | N | R | N | N | N | R | N | R | R | ||
| 97 | N | R | N | N | N | R | R | R | N | N | R | N | R | N | N | N | N | N | N | R | R | R | R | ||
Supplements to quadratic reciprocity
The supplements to quadratic reciprocity help solve specific cases of the main theorem more easily. They give simple rules for when certain numbers can be perfect squares modulo a prime number.
One important supplement deals with -1. It shows that -1 is a perfect square modulo a prime p if and only if p is congruent to 1 modulo 4. Another supplement deals with 2, showing that 2 is a perfect square modulo a prime p if and only if p is congruent to ±1 modulo 8. These supplements make it easier to work with quadratic equations in modular arithmetic without needing the full theorem.
Statement of the theorem
Quadratic reciprocity is a big idea in math that helps us figure out when certain equations have solutions. It tells us about solving equations like (x^2 \equiv a \pmod{p}), where we want to know if there’s a whole number (x) that makes the equation true when we work with remainders after dividing by a prime number (p).
The theorem gives us special rules. For example, if we have two special numbers (p) and (q), and both follow certain patterns when divided by 4, we can swap them in the equation and still know if a solution exists. This helps mathematicians understand these kinds of problems better, even though it doesn’t tell us how to find the actual solutions.
Proof
Main article: Proofs of quadratic reciprocity
Quadratic reciprocity is a big idea in math that helps us understand patterns with numbers. One important part of this is figuring out whether certain equations have solutions. For example, we might want to know if there's a number that, when squared, gives another specific number when we think about these numbers only up to a certain point (called a modulus).
There are many ways to prove quadratic reciprocity, and new proofs are still being found. These proofs help us understand deep connections between numbers and solve problems that seem hard at first glance.
History and alternative statements
The law of quadratic reciprocity is a big idea in number theory. It helps us figure out when certain equations have solutions with whole numbers. This law was understood in different ways by many mathematicians over time.
Fermat, an early mathematician, looked at expressing prime numbers using simple equations. Euler and Lagrange worked on similar ideas but didn’t fully state the law of quadratic reciprocity. Later, Legendre introduced a special symbol to make these ideas easier to work with. Gauss, another famous mathematician, gave us the modern form of the law.
Today, we use these ideas to solve problems about whether a number can be written as a square of another number, but only in special cases involving prime numbers. This law remains important in deeper areas of mathematics.
Main article: Legendre symbol
| Theorem | When | it follows that |
|---|---|---|
| I | b a − 1 2 ≡ 1 ( mod a ) {\displaystyle b^{\frac {a-1}{2}}\equiv 1{\pmod {a}}} | a b − 1 2 ≡ 1 ( mod b ) {\displaystyle a^{\frac {b-1}{2}}\equiv 1{\pmod {b}}} |
| II | a b − 1 2 ≡ − 1 ( mod b ) {\displaystyle a^{\frac {b-1}{2}}\equiv -1{\pmod {b}}} | b a − 1 2 ≡ − 1 ( mod a ) {\displaystyle b^{\frac {a-1}{2}}\equiv -1{\pmod {a}}} |
| III | a A − 1 2 ≡ 1 ( mod A ) {\displaystyle a^{\frac {A-1}{2}}\equiv 1{\pmod {A}}} | A a − 1 2 ≡ 1 ( mod a ) {\displaystyle A^{\frac {a-1}{2}}\equiv 1{\pmod {a}}} |
| IV | a A − 1 2 ≡ − 1 ( mod A ) {\displaystyle a^{\frac {A-1}{2}}\equiv -1{\pmod {A}}} | A a − 1 2 ≡ − 1 ( mod a ) {\displaystyle A^{\frac {a-1}{2}}\equiv -1{\pmod {a}}} |
| V | a b − 1 2 ≡ 1 ( mod b ) {\displaystyle a^{\frac {b-1}{2}}\equiv 1{\pmod {b}}} | b a − 1 2 ≡ 1 ( mod a ) {\displaystyle b^{\frac {a-1}{2}}\equiv 1{\pmod {a}}} |
| VI | b a − 1 2 ≡ − 1 ( mod a ) {\displaystyle b^{\frac {a-1}{2}}\equiv -1{\pmod {a}}} | a b − 1 2 ≡ − 1 ( mod b ) {\displaystyle a^{\frac {b-1}{2}}\equiv -1{\pmod {b}}} |
| VII | b B − 1 2 ≡ 1 ( mod B ) {\displaystyle b^{\frac {B-1}{2}}\equiv 1{\pmod {B}}} | B b − 1 2 ≡ − 1 ( mod b ) {\displaystyle B^{\frac {b-1}{2}}\equiv -1{\pmod {b}}} |
| VIII | b B − 1 2 ≡ − 1 ( mod B ) {\displaystyle b^{\frac {B-1}{2}}\equiv -1{\pmod {B}}} | B b − 1 2 ≡ 1 ( mod b ) {\displaystyle B^{\frac {b-1}{2}}\equiv 1{\pmod {b}}} |
| Case | If | Then |
|---|---|---|
| 1) | ±a R a′ | ±a′ R a |
| 2) | ±a N a′ | ±a′ N a |
| 3) | +a R b −a N b | ±b R a |
| 4) | +a N b −a R b | ±b N a |
| 5) | ±b R a | +a R b −a N b |
| 6) | ±b N a | +a N b −a R b |
| 7) | +b R b′ −b N b′ | −b′ N b +b′ R b |
| 8) | −b N b′ +b R b′ | +b′ R b −b′ N b |
| Case | If | Then |
|---|---|---|
| 9) | ±a R A | ±A R a |
| 10) | ±b R A | +A R b −A N b |
| 11) | +a R B | ±B R a |
| 12) | −a R B | ±B N a |
| 13) | +b R B | −B N b +N R b |
| 14) | −b R B | +B R b −B N b |
Connection with cyclotomic fields
Early proofs of quadratic reciprocity were hard to understand. Things changed when Gauss showed that certain number patterns, called quadratic fields, are part of bigger patterns known as cyclotomic fields. This helped explain quadratic reciprocity better.
Later, a mathematician named Robert Langlands suggested a big idea called the Langlands program. It aims to extend our understanding even further. Langlands himself said he didn’t find quadratic reciprocity interesting at first, but later saw its importance.
Other rings
There are quadratic reciprocity laws that work in structures other than the regular whole numbers. These help us understand patterns in more complex mathematical systems.
Gaussian integers
Carl Friedrich Gauss discovered a version of quadratic reciprocity for Gaussian integers, which are numbers of the form a + b_i, where i is the square root of -1. This work was part of his studies on quartic reciprocity, though he didn’t fully prove it himself. Later mathematicians built on his ideas to show how these patterns connect to the usual whole numbers.
Eisenstein integers
Eisenstein integers are another special set of numbers, involving a special kind of cube root of unity. Similar reciprocity laws apply here, helping us understand how these numbers behave in modular arithmetic.
Imaginary quadratic fields
More general versions of quadratic reciprocity exist for imaginary quadratic fields — these are number systems built around solutions to equations like _x² + y² = 1. These laws help us understand properties of these more complex number systems.
Polynomials over a finite field
Quadratic reciprocity also applies to polynomials over finite fields — sets with a limited number of elements. This helps us study patterns in polynomial equations within these constrained systems.
Higher powers
Further information: Cubic reciprocity, Quartic reciprocity, Octic reciprocity, and Eisenstein reciprocity
Mathematicians in the 1800s tried to expand the ideas of quadratic reciprocity to work with numbers raised to higher powers than just two. This led them to study more complex number systems.
One of the big unsolved problems in math, posed in 1900, was to find a general rule for these higher powers. Later, a mathematician named Emil Artin found a broad theorem called Artin reciprocity that includes all earlier rules as special cases.
This article is a child-friendly adaptation of the Wikipedia article on Quadratic reciprocity, available under CC BY-SA 4.0.
Images from Wikimedia Commons. Tap any image to view credits and license.
Safekipedia