## What do theta functions have to do with quadratic reciprocity?

### Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)

The theta function is the analytic function $\theta:U\to\mathbb{C}$ defined on the (open) right half-plane $U\subset\mathbb{C}$ by $\theta(\tau)=\sum_{n\in\mathbb{Z}}e^{-\pi n^2 \tau}$. It has the following important transformation property.

Theta reciprocity: $\theta(\tau)=\frac{1}{\sqrt{\tau}}\theta\left(\frac{1}{\tau}\right)$.

This theorem, while fundamentally analytic—the proof is just Poisson summation coupled with the fact that a Gaussian is its own Fourier transform—has serious arithmetic significance.

• It is the key ingredient in the proof of the functional equation of the Riemann zeta function.

• It expresses the modularity of the theta function (of course, $\theta$ is not literally a modular form, since it is not even defined on all of the upper half-plane, but a simple change of variables can fix that).

Theta reciprocity also provides an analytic proof (actually, the only proof, as far as I know) of the Landsberg-Schaar relation

$$\frac{1}{\sqrt{p}}\sum_{n=0}^{p-1}\exp\left(\frac{2\pi i n^2 q}{p}\right)=\frac{e^{\pi i/4}}{\sqrt{2q}}\sum_{n=0}^{2q-1}\exp\left(-\frac{\pi i n^2 p}{2q}\right)$$

where $p$ and $q$ are arbitrary positive integers. To prove it, apply theta reciprocity to $\tau=2iq/p+\epsilon$, $\epsilon>0$, and then let $\epsilon\to 0$.

This reduces to the formula for the quadratic Gauss sum when $q=1$:

$$\sum_{n=0}^{p-1} e^{2 \pi i n^2 / p} = \begin{cases} \sqrt{p} & \textrm{if } \; p\equiv 1\mod 4 \\ i\sqrt{p} & \textrm{if } \; p\equiv 3\mod 4 \end{cases}$$

(where $p$ is an odd prime). From this, it's not hard to deduce Gauss's "golden theorem".

Quadratic reciprocity: $\left(\frac{p}{q}\right)\left(\frac{q}{p}\right)=(-1)^{(p-1)(q-1)/4}$ for odd primes $p$ and $q$.

For reference, this is worked out in detail in the paper "Applications of heat kernels on abelian groups: $\zeta(2n)$, quadratic reciprocity, Bessel integrals" by Anders Karlsson.

I feel like there is some deep mathematics going on behind the scenes here, but I don't know what.

Why should we expect theta reciprocity to be related to quadratic reciprocity? Is there a high-concept explanation of this phenomenon? If there is, can it be generalized to other reciprocity laws (like Artin reciprocity)?

Hopefully some wise number theorist can shed some light on this!

-

Reminds me of how the modular transformation law for the Dedekind $eta$ function gives rise to Dedekind sums which have their own reciprocity law from which quadratic reciprocity can be derived.  – Dan Piponi Jan 28 at 1:36
Interesting! I didn't know about Dedekind sums. I'll have to read up on this some time soon. Yet another piece of the grand puzzle... – Aleksandar Bahat Jan 28 at 21:12

## 2 Answers

Going in the direction of more generality:

With $\theta(\tau)=\sum_n\exp(\pi i n^2 \tau)$, theta reciprocity describes how the function behaves under the linear fractional transformation `$[\begin{smallmatrix} 0&1 \\ -1&0\end{smallmatrix}]$`. From this one can show it's an automorphic form (of half integral weight, on a congruence subgroup). Automorphic forms and more generally automorphic representations are linked by the Langlands program to a very general approach to a non-abelian class field theory. Your "Why should we expect ..." question is dead-on. This is very deep and surprising stuff.

In the direction of more specificity, the connection to the heat kernel is fascinating. (In this context, Serge Lang was a great promoter of 'the ubiquitous heat kernel.') The theta function proof is also discussed in Dym and McKean's 1972 book "Fourier Series and Integrals" and in Richard Bellman's 1961 book "A Brief Introduction to Theta Functions." Bellman points out that theta reciprocity is a remarkable consequence of the fact that when the theta function is extended to two variables, both sides of the reciprocity law are solutions to the heat equation. One is, for $t\to 0$ what physicists call a 'similarity solution' while the other is, for $t\to \infty$ the separation of variables solution. By the uniqueness theorem for solutions to PDEs, the two sides must be equal!

A special case of quadratic reciprocity is that an odd prime $p$ is a sum of two squares if and only if $p\equiv 1\bmod 4$. This can be be done via the theta function and is in fact given in Jacobi's original 1829 book "Fundamenta nova theoriae functionum ellipticarum."

-

Re your first para: here is something I've never understood. $\theta$ has half-integral weight, so is an automorphic form not on $GL(2)$ or $GL(1)$ but on some metaplectic group. My understanding is that it is not clear what the link is between the representation theory of the metaplectic group, and Galois representations (because the metaplectic group is not an algebraic group so the general yoga doesn't apply), so although your first para sounds appealing from some "general overview" point of view, I am always very confused about the actual details of what is going on--can you supply them?  – wccanard Jan 28 at 22:01
I suspected there was something Langlands-y about this. That's probably the best "big picture" explanation. Unfortunately, I don't know enough about Langlands to get very far with this.  I like what you're getting at in the last paragraph; Jacobi's proof is "natural" (in the sense that generated functions are natural), and so I guess it's not a big leap to try to generalize that. – Aleksandar Bahat Jan 31 at 15:50
Correction: that should read "generating functions" rather than "generated functions". – Aleksandar Bahat Feb 7 at 16:57

### You can accept an answer to one of your own questions by clicking the check mark next to it. This awards 15 reputation points to the person who answered and 2 reputation points to you.

Hecke generalizing the argument that you mention to prove quadratic reciprocity relative to any given number field $K$ (see, e.g. his Lectures on the Theory of Algebraic Numbers).

In The Fourier-Analytic Proof of Quadratic Reciprocity Michael C. Berg describes the subsequent development of this line of research. Quoting from the book's summary:

The relative quadratic case was first settled by Hecke in 1923, then recast by Weil in 1964 into the language of unitary group representations. The analytic proof of the general n-th order case is still an open problem today, going back to the end of Hecke's famous treatise of 1923.

-

I'll add Hecke's quote on p.201 (in my English translation): "precise knowledge of the behavior of an analytic function in the neighborhood of its singular points is a source of number-theoretic theorems." – Matt Young Jan 28 at 1:31
I've heard of Hecke's generalization before, but I still feel my "Why should we expect..." question is unresolved. Although the usefulness of analytic functions in number theory is no longer surprising to me, I'd like to understand specifically why somebody would see quadratic reciprocity and think, "Hmm, $\theta(z)=z^{-1/2}\theta(1/z)$ is relevant." Why this piece of analysis in particular? – Aleksandar Bahat Jan 31 at 14:18
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 27, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.919128954410553, "perplexity_flag": "head"}