Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Lagranges Four Square Theorem Explained with Proof and Applications

Reviewed by:
ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon

What Is Lagranges Four Square Theorem Statement Proof Examples and Applications

According to Lagrange's four-square theorem, also referred to as Lagrange's theorem, every positive integer can be expressed as the sum of squares of four non-negative numbers. Thus, the squares constitute an order of four additive bases. Fermat used infinite descent to demonstrate the theorem, but the proof was disregarded. The theorem could not be validated by Euler. Lagrange provided the initially published proof. Lagrange's Four-Square Theorem will be covered in this session.


History of the Joseph-Louis Lagrange

Joseph-Louis Lagrange, sometimes known as Giuseppe Luigi Lagrange or Lagrangian, was a mathematician and astronomer from Italy who eventually acquired French citizenship. Analysis, number theory, and both classical and celestial mechanics all benefited from his substantial contributions. In 1770, he released the original proof of the four-square theorem.


Joseph-Louis Lagrange


Joseph-Louis Lagrange


Lagrange's Theorem Statement

According to Lagrange's four-square theorem, commonly known as Bachet's conjecture, every natural number can be written as the sum of four integer squares. In other words, the squares create a four-order additive basis.


Lagrange's Theorem Formula

According to the Lagrange theorem,

\[p = a_0^2 + a_1^2 + a_2^2 + a_3^2\]

where the four numbers \[{a_0},{a_1},{a_2},{a_3}\] are integers.


Lagrange Theorem Proof

The Classical Proof:

Every odd prime integer p can be used to prove the theorem. This naturally results from Euler's identity of a four-square (and from the fact that the theorem is true for the numbers 1 and 2).


Every a between 0 and \[\dfrac{{\;\left( {p\; - 1} \right)}}{2}\] has a different set of residues for a2 modulo p (inclusive). Take some a and define c as a2 mod p to show this. The polynomial \[{x^2} - c\;\] over the field \[\dfrac{Z}{{pZ}}\] has a root called a. Likewise, p - a (which is different from a). There are no other polynomials with this property, especially not among 0 to \[\dfrac{{\;\left( {p\; - 1} \right)}}{2}\], according to the Lagrange theorem (numerical theory), which states that each polynomial of degree n in a field K has at most n different roots.


The\[ - \;{b^2}\; - 1\] are distinct for b taking integral values between 0 and \[\dfrac{{\;\left( {p\; - 1} \right)}}{2}\] (inclusive). According to the pigeonhole principle, a and b exist in this range for which $a^{2}$ and $b^{2}$ are congruent modulo p, or for which

\[{a^2} + {b^2} + {1^2} + {0^2} = np\]


Let m be the smallest positive integer that has the property that mp is the sum of the four squares \[{x_1}^2\; + \;{x_2}^2\; + \;{x_3}^2\; + \;{x_4}^2\] (we just proved that there is at least one m, namely n, that has this property; hence, m is smaller than p). We prove the existence of a positive integer r less than m, for which RP is also the sum of four squares if our proof that m equals 1 is false (this is in the spirit of the infinite descent method of Fermat).


In order to achieve this, we take into account the \[{y_i}\] for each \[{x_i}\] that belongs to the same residue class modulo m and falls between \[\dfrac{{\left( { - m\; + \;1} \right)}}{2}\] and \[\dfrac{m}{2}\] (possibly included). It follows that for some strictly positive integer r less than m, \[{y_1}^2\; + \;{y_2}^2\; + \;{y_3}^2\; + \;{y_4}^2\; = \;mr\]


Euler's four-square identity is then used once more to demonstrate that \[mpmr\; = \;{z_1}^2\; + \;{z_2}^{2\;} + \;{z_3}^2\; + \;{z_4}^2.\]. But since each \[{x_i}\] coincides with its corresponding \[{y_i}\], it follows that all\[{z_i}\] are divisible by m. Indeed,


\[\left\{ \begin{array}{l}{z_1} = {x_1}{y_1} + {x_2}{y_2} + {x_3}{y_3} + {x_4}{y_4} \equiv x_1^2 + x_2^2 + x_3^2 + x_4^2 = mp = 0(\bmod m)\\{z_2} = {x_1}{y_2} - {x_2}{y_1} + {x_3}{y_4} - {x_4}{y_3} \equiv {x_1}{x_2} - {x_2}{x_1} + {x_3}{x_4} - {x_4}{x_3} = 0(\bmod m)\\{z_3} = {x_1}{y_3} - {x_2}{y_4} - {x_3}{y_1} + {x_4}{y_2} \equiv {x_1}{x_3} - {x_2}{x_4} - {x_3}{x_1} + {x_4}{x_2} = 0(\bmod m)\\{z_4} = {x_1}{y_4} + {x_2}{y_3} - {x_3}{y_2} - {x_4}{y_1} \equiv {x_1}{x_4} + {x_2}{x_3} - {x_3}{x_2} - {x_4}{x_1} = 0(\bmod m)\end{array} \right\}\]


For \[{w_i}\; = \;\dfrac{{{z_i}}}{m}\], it follows that \[{w_i}\; = \;\dfrac{{z_i}}{m},\;{w_1}^2\; + \;{w_2}^2\; + \;{w_3}^2\; + \;{w_4}^2\; = \;rp\], which is in conflict with m's minimality.


Both the situation \[{y_1}\; = \;{y_2}\; = \;{y_3}\; = \;{y_4}\; = \dfrac{{\;m}}{2}\] (which would give r = m and no descent) and the case\[\;{y_1}\; = \;{y_2}\; = \;{y_3}\; = \;{y_4}\; = \;0\] (which would give r = 0 rather than strictly positive) must be ruled out in the aforementioned descent. In both instances, it is possible to verify that \[mp\; = \;{x_1}^2\; + \;{x_2}^2\; + \;{x_3}^2\; + \;{x_4}^2\] would be a multiple of \[{m^2}\], which would be in opposition to the assertion that p is a prime number bigger than m.


Applications of Lagrange's Four-Square Theorem

Lagrange's Four-Square Theorem gives a formula for the number of ways that a given natural number n can be represented as the sum of four squares. The theorem can be applied to every natural number. Like even for big numbers like one lakh or one crore.


Lagrange's Four-Square Theorem Examples

1. Express the number 23 as a sum of four squares using Lagrange's four-square theorem.

Ans: By Lagrange's four-square theorem,

\[p = a_0^2 + a_1^2 + a_2^2 + a_3^2\]

That means \[p\; = 23\]

And if we consider

$a_{0} = 1 \\ a_{1} = 2 \\ a_{2} = 3 \\ a_{3} = 3$

Then,

\[\begin{array}{l}23\; = \;1 + 4 + 9 + 9\\23 = \;23\end{array}\]

This is true.

So, 23 can be expressed as

\[23\; = \;{1^2}\; + {2^2} + {3^2} + {3^2}\].


2. How will you write 2012 as a sum of four squares using Lagrange's four-square theorem?

Ans: By Lagrange's four-square theorem,

\[p = a_0^2 + a_1^2 + a_2^2 + a_3^2\]

That means \[p\; = 2012\]

And if we consider,

$a_{0} = 44 \\ a_{1} = 6 \\ a_{2} = 6 \\ a_{3} = 2$

Then,

\[\begin{array}{l}2012\; = \;1936 + 36 + 36 + 4\\2012\; = \;2012\end{array}\]

This is true.

So, 2012 can be expressed as

\[2012\; = \;{44^2} + {6^2} + {6^2} + {2^2}\].


3. Show that 7839 can be written as the sum of four squares.

Ans: Using Lagrange's four-square theorem, we can say that 7839 can be written as sums of four squares.

\[p = a_0^2 + a_1^2 + a_2^2 + a_3^2\]

Using Lagrange's four-square theorem,

That means \[p\; = 7839\]

Consider

$a_{0} = 77 \\ a_{1} = 31 \\ a_{2} = 30 \\ a_{4} = 7$

Then,

\[\begin{array}{l}7839\; = 5929 + 961 + 900 + 49\\7839\; = \;7839\end{array}\]

This is true.

So, 7839 can be expressed as

\[7839 = \;{77^2} + {31^2} + {30^2} + {7^2}\,\].


Important Points to Remember

  • Any positive integer can be represented as the sum of the squares of four positive numbers.

  • The Lagrange's Four-Square theorem is applicable to every single natural number.


Important Formula from the Theorem

Any natural number p can be expressed as

\[p = a_0^2 + a_1^2 + a_2^2 + a_3^2\]

where the four numbers \[{a_0},{a_1},{a_2},{a_3}\] are integers.


Conclusion

In this article, we went over Lagrange's four-square theorem and its proof in great depth. It is evident from the previous discussion of Lagrange's four-square theorem that Lagrange's four-square theorem provides us with a way to write every natural number in the form of four squares.

Competitive Exams after 12th Science
tp-imag
bottom-arrow
tp-imag
bottom-arrow
tp-imag
bottom-arrow
tp-imag
bottom-arrow
tp-imag
bottom-arrow
tp-imag
bottom-arrow
Best Seller - Grade 10
View More>
Previous
Next

FAQs on Lagranges Four Square Theorem Explained with Proof and Applications

1. What is Lagrange’s Four Square Theorem?

Lagrange’s Four Square Theorem states that every positive integer can be expressed as the sum of four integer squares. In mathematical form, for any positive integer n, there exist integers a, b, c, d such that:

n = a² + b² + c² + d²

This is a fundamental result in number theory, proved by Joseph-Louis Lagrange in 1770, and it guarantees representation using at most four squares.

2. What is an example of Lagrange’s Four Square Theorem?

An example of Lagrange’s Four Square Theorem is 7 = 2² + 1² + 1² + 1². Here:

  • 2² = 4
  • 1² = 1
  • 1² = 1
  • 1² = 1

Adding them gives 4 + 1 + 1 + 1 = 7, showing that the integer 7 can be written as a sum of four squares, as guaranteed by the theorem.

3. Does every number need exactly four squares?

No, Lagrange’s Four Square Theorem says every positive integer needs at most four squares, not exactly four. Some numbers require fewer squares:

  • 1 = 1²
  • 5 = 2² + 1²
  • 6 = 2² + 1² + 1²

However, some numbers (like 7) cannot be written as the sum of three squares and therefore require all four.

4. What is the formula for Lagrange’s Four Square Theorem?

The formula for Lagrange’s Four Square Theorem is n = a² + b² + c² + d², where n is any positive integer and a, b, c, d are integers. This formula does not provide a single explicit method to find the squares, but it guarantees that such integers always exist for every positive integer n.

5. How do you express a number as the sum of four squares?

To express a number as the sum of four squares, you look for integers whose squares add up to the given number. A simple method is:

  • Start with the largest square less than or equal to the number.
  • Subtract it from the number.
  • Repeat the process with the remainder.

For example, for 15:

  • 15 − 3² = 15 − 9 = 6
  • 6 = 2² + 1² + 1²

So, 15 = 3² + 2² + 1² + 1².

6. What is the difference between the three-square theorem and the four-square theorem?

The key difference is that the three-square theorem does not apply to all integers, while the four-square theorem does. Legendre’s Three Square Theorem states that a number can be written as the sum of three squares unless it has the form 4^k(8m + 7). In contrast, Lagrange’s Four Square Theorem guarantees representation for every positive integer without exception.

7. Why is Lagrange’s Four Square Theorem important in number theory?

Lagrange’s Four Square Theorem is important because it proves that four squares are sufficient to represent all positive integers. It:

  • Solves a classical problem about sums of squares.
  • Influenced later results in additive number theory.
  • Connects to quadratic forms and modular arithmetic.

It is a cornerstone result in the study of representations of numbers.

8. Can negative integers be used in Lagrange’s Four Square Theorem?

Yes, the integers a, b, c, d in the formula can be negative, but their squares are always non-negative. Since (−k)² = k², allowing negative integers does not change the possible sums. The theorem focuses on representing positive integers as sums of four squares.

9. Is the representation as four squares unique?

No, the representation of a number as a sum of four squares is not unique. A number can often be written in multiple ways. For example:

  • 10 = 3² + 1² + 0² + 0²
  • 10 = 2² + 2² + 1² + 1²

Different combinations of integers can produce the same total.

10. Who proved Lagrange’s Four Square Theorem and when?

Lagrange’s Four Square Theorem was proved by Joseph-Louis Lagrange in 1770. His proof established that every positive integer is the sum of four squares, resolving a long-standing question in classical number theory and laying groundwork for further research in quadratic forms.