MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Zagier has a very short proof ( MR1041893) for the fact that every prime number $p$ of the form $4k+1$ is the sum of two squares. The proof defines an involution of the set $S= \lbrace (x,y,z) \in N^3: x^2+4yz=p \rbrace $ which is easily seen to have exactly one fixed point. This shows that the involution that swaps $y$ and$ z$ has a fixed point too, implying the theorem.

This simple proof has always been quite mysterious to me. Looking at a precursor of this proof by Heath-Brown did not make it easier to see what, if anything, is going behind the scene. There are similar proofs for the representation of primes using some other quadratic forms, with much more involved involutions.

Now, my question is: is there any way to see where these involutions come from and to what extent they can be used to prove similar statements?

share|cite|improve this question
As a practicing number theorist who has devoted an inordinately large amount of time to polishing various proofs of the Two Squares Theorem (see my most recent MO question!), I must say that I have always found the Heath-Brown/Zagier proof to be both contrived and confusing. But I am always willing to be proven wrong, and I agree with you that a good test of a proof is what else it can be adapted to prove. Let's see what answers you get... – Pete L. Clark Jul 8 '10 at 20:42
"Proofs from THE BOOK" by Aigner and Ziegler gives two proofs of F2ST; this is one of them. The other one is by a (truly) simple and elementary lemma of A. Thue. Recently I showed that this method extends successfully to find primes of the form $x^2 + Dy^2$ for all idoneal numbers $D$ (including any idoneal $D$ which might yet exist if GRH is false): see I think this approach is a good one at the undergraduate level. For graduate students, I would recommend the approach(es) of Cox's book. I'm not sure who the Heath-Brown/Zagier proof is for... – Pete L. Clark Jul 10 '10 at 6:51
"Proofs from the Book" is a resource that should be in every mathematics' student library regardless of level,Pete. As for the theorum-to be honest,it looks kooky to me too. Then again,my mentor Melvyn Nathanson probably knows worlds more about it then I do and I may run it past him as well. – The Mathemagician Jul 10 '10 at 19:11
Pete, one of my friends who is a number theorist presented Zagier's proof in his job talk. If you read Zagier's paper, beyond the one sentence, you know that it's an instance of application of topology to combinatorics. However, there is also nothing wrong with an aesthetically appealing proof that doesn't have the "right" target audience. – Victor Protsak Jul 11 '10 at 5:46
@VP: To be clear, there is absolutely nothing wrong with the H-B/Z proof. A colleague and collaborator of mine presented Zagier's proof to the undergraduate math club at UGA a few years ago. So, sure, lots of people like this proof (including H-B and Z, whose opinions certainly count for something). I have a different aesthetic reaction to it, as I believe I'm entitled to. Further, the proof has a one-shot aspect to it which makes it seem more appropriate for a talk than for coverage in a course. – Pete L. Clark Jul 16 '10 at 16:18
up vote 43 down vote accepted

This paper by Christian Elsholtz seems to be exactly what you're looking for. It motivates the Zagier/Liouville/Heath-Brown proof and uses the method to prove some other similar statements. Here is a German version, with slightly different content.

Essentially, Elsholtz takes the idea of using a group action and examining orbits as given (and why not -- it's relatively common) and writes down the axioms such a group action would have to fulfill to be useful in a proof of the two-squares theorem. He then algorithmically determines that there is a unique group action satisfying his axioms -- that is, the one in the Zagier proof. The important thing is that having written down these (fairly natural) axioms, there's no cleverness required; finding the involution in Zagier's proof boils down to solving a system of equations.

share|cite|improve this answer
+1: This is an interesting paper. At first glance this involutory approach still seems (to me, of course) to be a quite complicated way of finding primes represented by certain binary quadratic forms, but maybe I'll change my mind when/if I understand it better. – Pete L. Clark Jul 8 '10 at 21:42
Edited a bit to give a summary of the idea of the paper. – Daniel Litt Jul 8 '10 at 21:49
Thank you Daniel! – Keivan Karai Jul 9 '10 at 8:45
Elsholtz cites a paper of Shiu, , who makes some interesting comments about continued fractions. Shiu is a bit too terse for me, but maybe this will help someone else. – David Speyer Jul 9 '10 at 12:17
Thanks,Daniel.The result makes a lot more sense now. It's also a striking and very beautiful application of basic linear algebra,a subject which shows it's practical side more every day. – The Mathemagician Jul 10 '10 at 19:13

As the answers above linked to an old paper of mine (in German, and a somewhat different English preprint), some readers might like to know that an updated version is to appear very soon and is now linked on my webpage:

In addition to the motivation of the Heath-Brown/Zagier proof it contains for example

a) a discussion of a lattice point proof (section 1.6)

b) much more historical information and links to other work

c) an alternative motivation of the Heath-Brown-Zagier proof, due to Dijkstra (section 2.3)

share|cite|improve this answer
Nice paper. Thanks! – Andrés E. Caicedo Jul 16 '10 at 14:42

It's been a while since I read Elsholtz's article, but after doing so I felt none the wiser. Below I have translated Heath-Brown's proof into the language of binary quadratic forms; Zagier's proof looks more interesting from this point of view (the connections to Gauss reduction are much closer), but when working out the details I got stuck in the middle.

One essential ingredient for the proofs by Heath-Brown and Zagier was pointed out already by Frick in 1918, who showed that if $p = a^2 + 4b^2$ is an odd prime number, then the indefinite binary quadratic form $Q = (-b,a,b)$ with discriminant $p$ is Gauss reduced and is contained in the principal cycle.

For proving that such a form exists without assuming that $p$ is a sum of two squares, we consider all forms $(A,B,C)$ with discriminant $p$ such that $A < 0$ and $C > 0$. From $p = B^2 - 4AC$ it then follows that the set $$ S = \{(A,B,C): B^2 - 4AC = p, A < 0, C > 0\} $$ is finite. The obvious map $$ \mu: S \to S, \quad (A,B,C) \to (-C,B,-A) $$ is an involution; if $S$ had odd cardinality, it would follow that $\mu$ has a fixed point, say $(A,B,-A)$, from which we would get $p = B^2 + 4A^2$. Unfortunately, $S$ has even cardinality since the involution $$ \nu: S \to S, \quad (A,B,C) \to (A,-B,C) $$ has no fixed points: this is because $B = 0$ implies $p = 4AC$, which is impossible for prime numbers $p$.

We now would like to find a subset $U \subset S$ of $S$ with odd cardinality on which $\mu$ is still defined. The most natural idea would be considering the forms with $B > 0$. For showing that this set of forms has odd cardinality, we have to define an involution $(A,B,C) \to (A',B',C')$ on this subset that has exactly one fixed point. To find such an involution, we start with $(A,B,C) \to (A,-B,C)$ and then apply reduction by changing the middle coefficient modulo $2A$ and then adjusting the last coefficient so that the discriminant is $p$. This gives $$ (A,-B,C) \to (A',B',C') = (A,-2A-B,A+B+C). $$ Now we are facing the problem that it is not clear at all that $B' = -2A-B > 0$, or that $C' = A+B+C > 0$. But if we set $$ U = \{(A,B,C) \in S: A+B+C > 0 \}, $$ then the map $$ \gamma: (A,B,C) \to (A,-2A-B,A+B+C) $$ actually is an involution on $U$. Moreover, $(A,B,C)$ is a fixed point if and only if $-2A-B = B$ and $A+B+C = C$, which is equivalent to $A = -B$. Since $p = B^2 - 4AC = B^2 + 4BC = B(B+4C)$ is prime, we must have $|A| = |B| = 1$. Since $A < 0$, this implies that the fixed point is $(-1,1,\frac{p-1}4)$; this form is equivalent to the principal form $(1,1,\frac{p-1}4)$.

The involution $\gamma$ on $U$ shows that $U$ has odd cardinality; the map $$ (A,B,C) \to (-C,-B,-A) $$ is an involution on $S$ sending $U$ to $S \setminus U$, which impliesthat $|S| = 2 |U|$. The involution $\nu$ on $S$ sends elements with $B > 0$ to elements with $B < 0$, hence $$ T = \{(A,B,C) \in S: B > 0\} $$ has the same number of elements as $U$, and in particular, it has odd cardinality. Finally, $\mu$ is an involution on $T$, and now the Two-Squares Theorem follows.


  1. H. Frick, Über den Zusammenhang der Perioden quadratischer Formen positiver Determinante mit der Zerlegung einer Zahl in die Summe zweier Quadrate, Diss. ETH Zürich, 1918
share|cite|improve this answer
Involutions are also at the heart of the old method of Hermite-Serret for representing primes as sums of squares (palindromic property of the continued fraction, etc). Given the well-known connection between continued fractions and reduction theory one naturally wonders this method is essentially the Hermite-Serret method stripped of its constructive aspects and whittled down to the bare minimum need for an existence proof. – Bill Dubuque Jul 10 '10 at 19:53

It is interesting that not only Zagier took this proof from Heath-Brown. Heath-Brown (according to his own words) took this proof from Uspensky.

This trick has different applications, see articles of Bykovskii On the arithmetic nature of some identities of the elliptic functions theory and The arithmetic nature of the triple and quintuple product identities .

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.