Associated Topics || Dr. Math Home || Search Dr. Math

### Proof of Lagrange's Theorem

```
Date: 11/23/2000 at 15:30:00
From: Alex Tse
Subject: Lagrange Theorem (Number Theory)

I am looking for a proof of Lagrange's Theorem, which states that any
positive integer can be expressed as the sum of 4 square numbers. I
did find a proof in "Topics from the Theory of Numbers" by Emil
Gorosswald. However, the mathematical language used in that book is
too advanced for me. Is there a simpler proof? Or is there any
persuasive argument which could make me believe that 4 square numbers
is the maximum?

Thanks very much for your kind attention.
```

```
Date: 11/25/2000 at 19:17:19
From: Doctor Floor
Subject: Re: Lagrange Theorem (Number Theory)

Hi, Alex, thanks for writing.

The proof of this theorem (where 0 is included with the squares) by
Lagrange (1770) can be done as follows:

One can check the following identity [1]:

(a^2+b^2+c^2+d^2)(A^2+B^2+C^2+D^2) =

so that it is sufficient to prove the theorem for prime numbers.

Let p be a prime, which we want to write as sum of four squares. We
can assume that p is odd (since 2=1+1+0+0.) First we will show that
there is an m such that mp can be written as the sum of four squares.

Consider the congruence classes

x^2 + 1 (mod p)  for x = 0, 1, 2, ..., (p-1)/2
-(y^2)  (mod p)  for y = 0, 1, 2, ..., (p-1)/2

Each of these two sets contains (p+1)/2 different elements. Together
they contain p+1 values, so that there must be x and y such that

x^2 + 1 == -y^2 (mod p)

and thus

x^2 + y^2 + 1 == 0 (mod p) = mp

for some m < p.

Let's take the minimal m such that

a^2 + b^2 + c^2 + d^2 = mp

for some a, b, c and d. Now we will show that m = 1 to complete our
proof.

To do that, suppose that m > 1. Choose A, B, C and D such that

-m/2 < A, B, C, D <= m/2
a==A (mod m), b==B (mod m), c==C (mod m) and d==D (mod m)

We have

A^2 + B^2 + C^2 + D^2 == a^2 + b^2 + c^2 + d^2 == mp == 0 (mod m)
A^2 + B^2 + C^2 + D^2 = rm, for some r >= 0

We see that r <= m because

r = (A^2+B^2+C^2+D^2)/m <= 4(m/2)^2 / m = m

When r = 0, that means that A, B, C and D are all equal to 0. Then a,
b, c and d are all multiples of m, so that a^2+b^2+c^2+d^2 is
divisible by m^2, and p is divisible by m. This contradicts 1 < m < p.
So r > 0.

When r = m, that means that A, B, C and D are all equal to m/2. That
would for instance mean that a == m/2 (mod m), and thus a = (m/2) + um
for some u. From this we see that a^2 = (m/2)^2 + um^2 + u^2*m^2 so
that

a^2 == (m/2)^2 == m^2/4 (mod m^2).

We find the same congruences for b^2, c^2 and d^2. That would again
0 < r < m.

Now we get:

mp*mr = (a^2+b^2+c^2+d^2)*(A^2+B^2+C^2+D^2)
= f^2+g^2+h^2+i^2

for some f, g, h and i by identity [1]. By this identity it is easy to
check that f, g, h and i are all congruent to 0 (mod m). But then we
have (dividing by m^2)

rp = (f/m)^2 + (g/m)^2 + (h/m)^2 + (i/m)^2.

This contradicts m being minimal. So our assumption that m > 1 does
not hold. And we have proven m = 1 as desired.

(I read this proof in a Dutch book, _Getaltheorie voor beginners_, by
Frits Beukers.)

If you have more questions, just write back.

Best regards,
- Doctor Floor, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
College Number Theory
High School Number Theory

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search