[Math] Proving Legendre’s Sum of 3 Squares Theorem via Geometry of Numbers

geometry-of-numbersnt.number-theory

Every positive integer can be written as the sum of 4 squares $n = a_1^2 + a_2^2 + a_3^2 + a_4^2$ however, if we only allow sum of 3 squares some numbers have to be left out:

$n = a^2 + b^2 + c^2$ $\longleftrightarrow$ $n \equiv 4^a (8k+7)$

Excuse me for using the same letter twice to mean different things…


I am trying trying to find a proof of this result from within Cassels' Rational Quadratic Forms, but it's not always the easiest to read. In that book Legendre's Theorem is stated in a very general way:

Let $g(x) = \color{lightgry}{a}_1 \,x_1^2 + a_2\, x_2^2 + a_3\, x_3^2$ with $a_1, a_2, a_3 \in \mathbb{Z}$ and $a_1 a_2 a_3$ is squarefree…

  • blah
  • blah
  • blah

Then where are $b_1, b_2, b_3 \in \mathbb{Z}$ not all of them zero with $a_1 \,b_1^2 + a_2\, b_2^2 + a_3\, b_3^2 = 0$

From what I gather, this Legendre theorem is strong form of the Hasse Principle and it can be proven using the geometry of numbers – which is the style I am endorsing today.

By the middle of Chapter 9 – Section 5 to be exact – we get the claim that proof of this theorem is complete. Because $x_1^2 + x_2^2 + x_3^2$ is the only quadratic form in it's genus. And that in indeed rested on the Hasse principle.


Come to think of it there is a rather serious question here. Mis-using the Hasse principle slightly we could way:

The only obstruction to having representation as sum of three squares $n = a^2 + b^2 + c^2 $ happens in the 2-adic numbers $\mathbb{Q}_2$.

How could a statement like this possible be proven geometrically? Minkowski's geometry of numbers is decidedly a Euclidean result and so the only possible completion that should be useful is $\mathbb{R}$.

In the case of sum of 2-squares the role of the Hasse principle is even more obvious since we can use multiplication identities like:

\begin{eqnarray} (a+bi)(c+id) &=& (ac-bd) + i(ad+bc) \\
(a^2 + b^2)(c^2 + d^2)&=& (ac-bd)^2 + (ad+bc)^2
\end{eqnarray}
and check each time that $n = x_1^2 + x_2^2 \mod p$ and multiply the result. By Minkowski theorem this only works when $p = 4k+1$.


I am going to keep reading, but does anyone know what polyhedron or oval or other geometric shape leads to a proof of the sum of 3 squares theorem?

Best Answer

A proof of the three squares theorem by the geometry of numbers was given by Ankeny in 1957. His paper is available here.

P.S. Also, I think Legendre's proof was incomplete: he assumed Dirichlet's theorem about primes in arithmetic progressions, which was not known at that time. The first correct proof was given by Gauss. I admit I might be wrong here.

Related Question