The law of quadratic reciprocity is a beautiful result in elementary number theory which relates the Legendre symbols and . For and odd primes, it states that

One of the better-known proofs of quadratic reciprocity involves the quadratic Gauss sum, an exponential sum defined by

in which . In essence, this proof works by computing in two ways:

**Euler’s criterion:**. Note that this is well-defined because is an integer.**Fermat’s Little Theorem**(for algebraic integers): Working in the cyclotomic field , we find that . Changing variables gives .

It follows that , which implies quadratic reciprocity.

In this note, we give a second proof of quadratic reciprocity using the analytic properties of the Jacobi theta function , which is a modular form of weight . In particular, we produce two formulas for the behavior of as , and derive quadratic reciprocity by comparing them. As in the previous proof, Gauss sums play a prominent role. Otherwise, this proof is distinct; in particular, it avoids Euler’s criterion and any semblance of algebraic number theory.

**— THE JACOBI THETA FUNCTION —**

The Jacobi theta function is defined on the upper half-plane by the series . It is a modular form of weight on the congruence subgroup , transforming via

in which for , for , and denotes Kronecker’s extension of the Legendre symbol. In addition, satisfies the functional equation , which follows from Poisson summation and analytic continuation. (In both functional equations, we use the principal square root on .)

We only need the second functional equation in our proof, but we will use it several times. For starters, it implies that as from above. And more generally, this asymptotic implies that

as , for any choice of . (Hint: Use the squeeze theorem to compare the asymptotics with different choices of .)

**— THE BEGINNING OF A PROOF —**

We now begin our proof in earnest. Let and be odd primes, and consider the limit of as . We have

In the limit as , each inner sum grows as . For the outer sum over , we let denote and observe that

It follows that as . We will use this asymptotic a few times in what follows.

From the functional equation , we see that

As , the right-hand side tends to . Meanwhile, the left-hand side equals . Ignoring the non-dominant term, this tends to

The sum over is a generalized Gauss sum. By the Chinese remainder theorem, we have

The first exponential sum is . The second depends only on and can be computed exactly; we see that it equals when and when . It follows that

in the limit as .

Of course, these two expressions for the limiting behavior must agree. After some simplification, we conclude that

Note that the right-hand side has absolute value because as a consequence of , and the same for . (Note that the cases in the previous line could be written .)

**— THE SIGN OF THE GAUSS SUM —**

Recall that the Gauss sum is one of the complex square roots of . At this point, we could prove quadratic reciprocity if we knew which square-root (depending on ) to choose. The correct choice of sign is of course well-known now, but it took Gauss a few years to determine the sign after first introducing the Gauss sums. Fortunately, we find ourselves in a position to determine the sign of immediately.

The key observation is that none of our formulas so far have required and to be odd primes. In fact, it is enough for and to be odd, coprime, and square-free. Taking prime and in the previous offset equation gives

Of course, as well. Returning to the same offset equation from before, it follows that

The right-hand side only depends on the values of and mod . And, as expected, it equals unless both and , when it equals . This completes our proof of quadratic reciprocity.

**— EXERCISES —**

**Exercise:** Prove the second supplement to quadratic reciprocity by considering as .