The prince of mathematicians (*princeps mathematicorum*), Carl Friedrich Gauss, arguably the greatest mathematician who ever lived, devoted a lot of attention to exploring alternative proofs of the law of quadratic reciprocity. As I mentioned in a previous note, this is actually a very deep result which has had a profound impact on modern mathematics. A rather good Wikipedia page about the quadratic reciprocity law has a section entitled connection with cyclotomy which makes clear its importance to the development of modern class field theory, and a history and alternative statements section catalogues its somewhat convoluted history.

In the present note I want to explore in detail one of the (many) approaches to proving the law of quadratic reciprocity, an approach which uses Gauss sums and Legendre symbols. (In a later note I will explore another proof using *quadratic* Gauss sums which involves contour integration techniques from complex analysis).

The proof consists of three key theorems, as follows:

Theorem I. This proves that when .

Theorem II. This proves that (mod ) is equivalent to the law of quadratic reciprocity, using Theorem I.

Theorem III. This proves an identity for from which the congruence in Theorem II follows, thus completing the overall proof of the quadratic reciprocity law.

In a previous note I stated a version of the law of quadratic reciprocity due to Legendre as follows: if and are distinct odd primes then

For the purposes of the proof in the present note it is necessary to express the quadratic reciprocity law as

These two formulations are completely equivalent. To see this, note that if (mod ) or (mod ), the exponent on in the second formulation reduces to an even integer so we get . On the other hand, if (mod ), the exponent on in the second formulation reduces to an odd integer, so we get .

Also note that the proof makes use of Gauss sums incorporating the Legendre symbol as the Dirichlet character in the summand, i.e., Gauss sums of the form

where , and the Legendre symbol in this context is referred to as the *quadratic character mod p*. Since the modulus is prime, the Dirichlet character here is primitive and we have that is separable with

for every , because either , or if we must have in which case because and (for non-principal characters the rows of the character tables sum to zero).

**Theorem I.** If is an odd prime and then

** Proof:** We have

and therefore

For each pair of values of and there is a unique mod such that

(mod )

since this is a linear congruence with a unique solution. We also have that

Therefore we can write

(where the index in the second summation has been reduced to since will range through all the least positive residues of independently of )

The last sum on is a geometric sum of the form

where

so we have

But it must be the case that (because is a th root of unity), and we also have that if and only if , so we can write

Therefore

(because the only value of for which is , so we can pull this out of the summation and then for this value of the Legendre symbol becomes )

(since )

(because since is a Dirichlet character mod and the rows of Dirichlet character tables sum to zero).

Since , Theorem I tells us that is an integer and it then follows that

is also an integer for every odd . It turns out that the law of quadratic reciprocity is intimately related to the value of the integer mod , which is what the next theorem shows.

**Theorem II.** Let and be distinct odd primes and let be the quadratic character (i.e., the Legendre symbol) mod . Then the quadratic reciprocity law

is equivalent to the congruence

(mod )

** Proof:** From the result proved in Theorem I we have that

where the last equality follows from property (e) of Legendre symbols in my previous note which implies

By property (d) of Legendre symbols we also have

(mod )

so we can write

(mod )

where the last equality follows from the law of quadratic reciprocity.

Therefore if the law of quadratic reciprocity holds, then so does

(mod )

and vice versa.

The last stage of the proof is now to deduce the congruence in Theorem II from an identity for which is established in the next theorem.

**Theorem III.** If and are distinct odd primes and if is the quadratic character (i.e., Legendre symbol) mod , we have

where the summation indices satisfy the restriction

(mod )

** Proof:** It is easy to show that the Gauss sum is a periodic function of with period since

Since therefore

it follows that is also a periodic function of with period . Therefore we have a finite Fourier expansion

where the coefficients are given by

(see my previous note on finding the finite Fourier expansion of an arithmetical function). Simply from the general definition of (using Legendre symbols as Dirichlet characters) we have

so we can write the above Fourier expansion coefficients as

The sum on is a geometric sum of the form

where

so we have

(since because is a th root of unity). Therefore in the expression for the sum on vanishes unless (mod ), in which case the sum is equal to . Therefore we can write

where the summation indices satisfy the restriction

(mod )

Now we return to the original expression for , namely

and use this to obtain a different expression for . The separability of means that

We also have the result for odd that

(since is even). Therefore we find

where the last equality follows from the fact that

Therefore

Taking and the previously obtained expression for we get the claimed result

where the summation indices satisfy the restriction

(mod ).

We are now in a position to deduce the law of quadratic reciprocity from Theorems I, II and III. From the result obtained in Theorem II, it suffices to show that

(mod )

where the summation indices satisfy the restriction

(mod )

i.e., every term in the summand satisfies this restriction. One way in which this restriction is satisfied is when

(mod )

for . In this case we have

Every other possible way of satisfying the restriction involves

(mod )

for some . For *each* of these ways, every cyclic permutation of satisfying the restriction contributes the same summand . Therefore for *each* of these ways of satisfying the restriction, each summand appears times and therefore contributes modulo to the sum. Therefore only the scenario (mod ) for yields a non-zero contribution, so the sum is (mod ). This completes the proof of the law of quadratic reciprocity.

To clarify the last point, consider the following

** Example:** Take and . Then the equations are

(mod )

where the summation indices satisfy the restriction

(mod )

In the case when (mod ) we have

so the first equation is satisfied.

Suppose we consider any other way of satisfying the restriction, say

, , (mod )

so that

(mod )

Then the cyclic permutations

, , (mod )

and

, , (mod )

will also satisfy the restriction, and these contribute a total of

(mod )

to the sum. Therefore only the first way of satisfying the restriction will contribute to the sum, so the sum must equal 1.