This year I was able to do some tutorial teaching at uni. I was assigned a class of students doing the (extremely popular) course on Elementary Number Theory.

About halfway through the course the students learn about quadratic residues and quadratic reciprocity. However, when the students turned up to tutorials the beauty of these topics were not transfered. It is my opinion that not enough stress is put on the beauty of maths these days, there seems to be more emphasis on “doing it without care”.

Anyway, I thought i’d share my fascination with the Quadratic Reciprocity law.

We all know how to solve linear congruences, this is a simple task. There are either no solutions or solution (the case being decided by a comprimality check). When a solution exists, it is found by basically evaluating the inverse of something in a given group and then multiplying through by it in the congruence.

If we step up the degree of the congruence by and start solving quadratic congruences the situation becomes much more complicated. All sorts of weird behaviour can happen. The fact that we have a quadratic does not mean that we have to have or roots anymore (examples of situations where there are more solutions are easy to come by).

This kind of behaviour is easily explained by using Hensel lifting and the Chinese Remainder Theorem. For this reason we look at cases where the modulus is prime (solving these lets us solve all other congruences where the modulus is composite).

Since is a field, it does follow here that quadratic congruences mod will have or roots (so we are back in our comfort zone).

So let us take an arbitrary quadratic congruence , where is an odd prime number (the prime isnt really important here). Now we look at the usual way we solve quadratics. It is obvious that the quadratic formula is going to provide nothing here since this involves the square root function (which we have not defined mod ).

If the quadratic factorises into two linear factors with integer coefficients then by the dividing properties of prime numbers ( implies or ) we would then reduce to solving two linear congruences mod , i.e. and . Thus, here it is simple to find the solutions.

But what if it is difficult to spot a factorisation? Well in this case there is only one thing left to try, completing the square. Now most people complete the square in the usual fashion, i.e. divide the coefficient by etc. A way to do this without having to divide is to first multiply through by , where is the coefficient of the term. This way of completing the square will transfer over to quadratic congruences easily since we never had to divide.

So, multiplying through the quadratic congruence that we had above by gives , which can be written as .

From this, it is clear that we only need to solve equations of the form since if we can solve these then the above would just lead to a set of linear congruences. The question arises, which give solutions? We call an such that does have a solution a **quadratic residue, **and one that doesn’t is called a **quadratic non-residue**.

It turns out that there are nice patterns in the quadratic residues mod . Also results on these things turn out to be extremely helpful when solving other Diophantine equations. For a basic example, if solving the Diophantine equation , you might take a long time using what you know “pre-quadratic residues”, but using that fact that the quadratic residues mod are and we see that the value of can only be or mod . The huge number on the right is congruent to mod , so there are no solutions!

We define the **Legendre symbol** to tell us when an integer is a “square number” mod (for odd prime and coprime to ). Given the and the above, we define this symbol to be if does have a solution (i.e. is a quadratic residue mod ) and if not (i.e. is a quadratic non-residue mod ).

We made the restriction on since otherwise the congruence is the trivial one , which only admits one solution . The point is that in all other cases we either get solutions or no solutions (it is easily seen that if for some integer then so that the “square roots” mod are symmetrical).

For the algebraically minded, the Legendre symbol is just a group homomorphism . It is what is known as a **character** of the group .

The Legendre symbols has many nice properties, most of which are easy to prove. We have that for all integers (coprime to ).

Also we have that for all integers (coprime to ). This is the rule that makes the group homomorphism work, essentially saying that the product of two quadratic residues mod is another one, the product of two quadratic non-residues mod is a quadratic residue, and otherwise you get a quadratic non-residue.

Finally we have that we can “reduce the denominator” mod . If then .

Using these results, we can turn any Legendre symbol into a product of ones of the form (where is a prime different from ).

I will not go into details here but the first of these two can be worked out using other methods of finding quadratic residues (Euler’s criterion and Gauss’ lemma). There are simple congruence conditions on that determine the values of these (we have that if and only if and if and only if ). But what about the last one? This is where the beauty of **Quadratic Reciprocity** comes in.

Quadratic Reciprocity gives us a way to turn the Legendre symbol into something about the Legendre symbol . It is **NOT** an obvious thing that solutions to and are connected in any way, especially not in as simple a way as Quadratic Reciprocity proclaims.

This amazing theorem tells us that if one or both of are congruent to then we have that . If both are congruent to then we simply add a minus sign, so that .

Why is this such a big help? Well one of is smaller than the other one, so working out the Legendre symbol could be a hard task by brute force. If we use Quadratic Reciprocity, we may simply flip the Legendre symbol and then reduce the now bigger numerator by the prime on the denominator. Then we may factorise the new numerator further and carry on using Quadratic Reciprocity until we reach a stage where the numbers are small enough to be able to calculate the answer.

Let’s see an example. Say we wanted to evaluate the Legendre symbol , i.e. we want to know if has a solution. We may factorise 70 as , then using the properties of the Legendre symbol we see that since . Now so we may “flip” the first Legendre symbol (this is by Quadratic Reciprocity). As for the second we have that both mod and mod , so we may “flip” but have to add a minus sign infront.

So . In other words has no solution!

Quadratic Reciprocity has many proofs in many different complexities. The proof that is usually met first is one done by couting lattice points above and below a nicely chosen line. I have seen proofs using Algebraic Number Theory (which I may be able to provide in the future).

Also, it is nice to note what happens next. Is there a similar construction for “cubic residues”? Yes there is, there is a similar notion of Legendre symbol but now it takes values in the cube roots of unity (following suit with the group homomorphism/character stuff I mentioned earlier). Gauss studied these higher reciprocity laws (beyond cubic residues) and found that working with roots of unity gave the most appealing results.

These studies concluded with the more modern and complicated **Artin Reciprocity law**, which is a result of** class field theory **(a special branch of Algebraic Number Theory). It turns out that reciprocity laws really come from the number fields you are working in (with Quadratic Reciprocity we work with the base number field , with Cubic Reciprocity we work with the cyclotomic number field where $\zeta_3$ is a primitive cube root of unity). Other non-cyclotomic number fields may give rise to extra reciprocity laws that arent counted in the Higher Reciprocity laws.

One of Hilbert’s famous problems asked for the most general Reciprocity law, one that works for all extensions of number fields. Artin’s law was a partial answer to this, it only worked in **Abelian extensions **(extensions with Abelian Galois group). There are still studies being made into the situation beyond these types of extension.

October 14, 2012 at 9:48 pm |

A better question is how does Apostol manage to take something so beautiful and render it so ugly and incoherent?

October 15, 2012 at 4:25 pm |

I have not read Apostol’s exposition on quadratic reciprocity so cannot comment.