Four Square Theorem: Descent Proof

Let \displaystyle Q(x_0,x_1,x_2,x_3):=x_0^2+x_1^2+x_2^2+x_3^2. Lagrange’s four-square theorem says that every positive integer N can be written as N=Q(x_0,x_1,x_2,x_3) for some integers x_0,x_1,x_2,x_3 . Equivalently, every positive integer is the squared length of an integer vector in \mathbb Z^4 .

At first this looks like a direct equation-solving problem: given N , find four integers whose squares add to it. The classical descent proof instead takes an indirect route. For a prime q , it first finds some representable multiple nq . It then shows that whenever n>1 , that representation can be converted into one of a strictly smaller multiple mq , with 0<m<n . Since a positive integer cannot decrease forever, the smallest possible multiplier must be 1 . The proof has three ingredients: Euler’s four-square identity, a short modular construction producing one multiple of q , and a descent based on choosing centered residues modulo the least multiplier. A smallest positive multiplier n>1 would produce an even smaller one. That is the entire contradiction.

The four-square composition law

The quadratic form Q has an exceptional multiplicative property. For

\displaystyle X=(x_0,x_1,x_2,x_3),\quad Y=(y_0,y_1,y_2,y_3),

define

\displaystyle \begin{aligned} C_0(X,Y)&=x_0y_0+x_1y_1+x_2y_2+x_3y_3,\\ C_1(X,Y)&=x_0y_1-x_1y_0+x_2y_3-x_3y_2,\\ C_2(X,Y)&=x_0y_2-x_1y_3-x_2y_0+x_3y_1,\\ C_3(X,Y)&=x_0y_3+x_1y_2-x_2y_1-x_3y_0. \end{aligned}

Euler’s four-square identity is

\displaystyle Q(X)Q(Y)=C_0(X,Y)^2+C_1(X,Y)^2+C_2(X,Y)^2+C_3(X,Y)^2.

A direct expansion verifies the formula: the pure terms occur once and the mixed terms cancel. Its importance is not merely that products of sums of four squares remain sums of four squares. The signs have also been arranged to interact with congruences. If X\equiv Y\pmod n coordinatewise, then C_1,C_2,C_3\equiv0\pmod n by cancellation, while C_0(X,Y)\equiv Q(X)\pmod n . This is exactly the divisibility mechanism that will carry the prime factor through the descent.

The identity immediately reduces the theorem to primes: once every prime is a sum of four squares, their powers and products are as well. The prime 2 is immediate, \displaystyle 2=1^2+1^2+0^2+0^2. Fix from now on an odd prime q .

Congruence

We do not yet know how to represent q itself. We first seek integers r,s with

\displaystyle 1+r^2+s^2\equiv0\pmod q.

Then 1+r^2+s^2=qH for some positive integer H , giving a representation of the multiple qH . The congruence is guaranteed by a simple counting argument. Put h=(q-1)/2 , and consider the two sets of residues

\displaystyle \mathcal R=\{0^2,1^2,\ldots,h^2\},\quad \mathcal S=\{-1-0^2,-1-1^2,\ldots,-1-h^2\}.

The elements in each set are distinct modulo q . Indeed, if a^2\equiv b^2\pmod q with 0\le a,b\le h , then q\mid(a-b)(a+b) ; unless a=b , neither factor can be divisible by q , because both have absolute value less than q . Thus both sets have (q+1)/2 elements, hence together have q+1 elements in a set of only q residues. They must meet. Consequently there are r,s with

\displaystyle 0\le r,s\le\frac{q-1}{2},\quad r^2+s^2\equiv-1\pmod q.

Thus \displaystyle qH=1+r^2+s^2=r^2+s^2+1^2+0^2. Moreover, \displaystyle qH=1+r^2+s^2\le1+2\left(\frac{q-1}{2}\right)^2<q^2, so 1\le H<q . We have found at least one positive multiplier less than q .

Descent

Before the descent, note that an even multiplier can always be halved. Suppose

\displaystyle nq=a_0^2+a_1^2+a_2^2+a_3^2

with n even. An even number of the a_i are odd, so after rearranging them, we may pair a_0,a_1 with the same parity and likewise a_2,a_3 . Whenever u,v have the same parity,

\displaystyle \frac{u^2+v^2}{2}=\left(\frac{u+v}{2}\right)^2+\left(\frac{u-v}{2}\right)^2.

Applying this identity to the two pairs shows that nq/2 is again a sum of four squares.

Now choose the least positive integer n for which nq is a sum of four squares. The construction above gives 1\le n<q , and the halving observation shows that n is odd. We will prove that n=1 .

Assume n>1 , and choose integers a_0,a_1,a_2,a_3 such that

\displaystyle nq=a_0^2+a_1^2+a_2^2+a_3^2.

Write A=(a_0,a_1,a_2,a_3) . For each i , let b_i be the unique centered representative of a_i\pmod n , so that b_i\equiv a_i\pmod n and -n/2<b_i<n/2 . This is possible and unique because n is odd. Put B=(b_0,b_1,b_2,b_3) . The vector B lies in the same residue class as A , but each coordinate has been made as small as possible in absolute value. In particular,

\displaystyle Q(B)\equiv Q(A)\equiv nq\equiv0\pmod n, \qquad Q(B)=nm

for some m\ge0 . But |b_i|<n/2 for all i , so

\displaystyle Q(B)=b_0^2+b_1^2+b_2^2+b_3^2<n^2, \quad 0\le m<n.

The case m=0 is impossible. It would imply b_i=0 for every i , hence n\mid a_i for all i . Writing a_i=nc_i in the equation for nq would give q=n(c_0^2+c_1^2+c_2^2+c_3^2) , contradicting 1<n<q and primality of q . Thus \displaystyle 0<m<n.

The short vector B represents nm , not the desired smaller multiple of q . The four-square identity is precisely what transfers the factor q from A to B .

Apply Euler’s identity to A and B . Set

\displaystyle \begin{aligned} d_0&=a_0b_0+a_1b_1+a_2b_2+a_3b_3,\\ d_1&=a_0b_1-a_1b_0+a_2b_3-a_3b_2,\\ d_2&=a_0b_2-a_1b_3-a_2b_0+a_3b_1,\\ d_3&=a_0b_3+a_1b_2-a_2b_1-a_3b_0. \end{aligned}

Then \displaystyle d_0^2+d_1^2+d_2^2+d_3^2=Q(A)Q(B)=(nq)(nm)=n^2mq.

Every d_i is divisible by n . Since b_i\equiv a_i\pmod n ,

\displaystyle d_0\equiv a_0^2+a_1^2+a_2^2+a_3^2=nq\equiv0\pmod n,

and the other three expressions become alternating sums that cancel modulo n . Thus d_i=ne_i for some integers e_0,e_1,e_2,e_3 . Dividing the preceding norm identity by n^2 gives

\displaystyle mq=e_0^2+e_1^2+e_2^2+e_3^2.

But 0<m<n , contradicting the choice of n as the least positive multiplier for which nq is a sum of four squares. Hence n=1 , and so

\displaystyle q=e_0^2+e_1^2+e_2^2+e_3^2.

Every prime is therefore a sum of four squares. Euler’s identity then extends the result to every positive integer.

The descent combines three ideas. The original vector A\in\mathbb Z^4 has squared length nq . Reducing it modulo n and choosing centered residues produces a vector B in the same coset of n\mathbb Z^4 with Q(B)<n^2 . Because its squared length is still divisible by n , it has the form nm with m<n . This gives smallness, but it loses the factor q . Euler’s identity restores that factor: the congruence A\equiv B\pmod n forces all four composition coordinates to be divisible by n , and after dividing by n their squared norm is exactly mq . Thus centered residues give smallness, congruence gives divisibility, and the four-square identity transports the prime factor through the descent.

This is closely analogous to the classical descent proof of the two-square theorem: there too, one begins with a representable multiple of a prime, reduces coordinates modulo the multiplier to obtain a smaller one, and uses the two-square composition identity to carry the prime factor through the descent.

Example: For q=29 , \displaystyle 1+2^2+13^2=174=6\cdot29, so 6\cdot29=13^2+2^2+1^2+0^2 . Halving the even multiplier gives

\displaystyle 3\cdot29=87=7^2+6^2+1^2+1^2.

Take A=(7,6,1,1) . Its centered residue vector modulo 3 is B=(1,0,1,1) , with Q(B)=3=3\cdot1 . Applying Euler’s identity gives

\displaystyle (d_0,d_1,d_2,d_3)=(9,-6,0,12).

After division by 3 ,

\displaystyle 29=3^2+(-2)^2+0^2+4^2.

Here the descent reaches multiplier 1 immediately. In general the same strictly decreasing multiplier argument guarantees that it must eventually do so.

Leave a comment