Korean, Edit

Lagrange’s Four-Square Theorem

Recommended post: 【Number Theory】 Table of Contents


1. Theorem

2. Euler’s four-square identity

3. Proof

4. Applications



1. Theorem

Every nonnegative integer $n$ can be expressed as the sum of four integer squares:

\[n = x_1^2 + x_2^2 + x_3^2 + x_4^2\]

Here, each $x_i$ may be zero. (ref) For example, $23 = 3^2 + 3^2 + 2^2 + 1^2$.



2. Euler’s four-square identity

⑴ Two-Square Identity: Associated with the Complex Numbers $\mathbb{C}$

\[(a^2+b^2)(c^2+d^2)=(ac-bd)^2+(ad+bc)^2\]

⑵ Four-Square Identity: Associated with the Quaternions $\mathbb{H}$

If both $m$ and $n$ can be expressed as the sum of four integer squares, then $mn$ can also be expressed as the sum of four integer squares. Let $m = a_1^2 + a_2^2 + a_3^2 + a_4^2$ and $n = b_1^2 + b_2^2 + b_3^2 + b_4^2$. Then,

\[\begin{aligned} mn &= (a_1b_1-a_2b_2-a_3b_3-a_4b_4)^2 \\ &\quad +(a_1b_2+a_2b_1+a_3b_4-a_4b_3)^2 \\ &\quad +(a_1b_3-a_2b_4+a_3b_1+a_4b_2)^2 \\ &\quad +(a_1b_4+a_2b_3-a_3b_2+a_4b_1)^2 \end{aligned}\]

Thus, $mn$ can be expressed as the sum of four integer squares.

⑶ Degen’s Eight-Square Identity: Associated with the Octonions $\mathbb{O}$

① Lagrange’s four-square theorem was proved in 1770, whereas Degen’s eight-square identity was discovered around 1818.

② For arbitrary real numbers $a_i,b_i$, there exist bilinear forms $c_i$ such that

\[(a_0^2+\cdots+a_7^2)(b_0^2+\cdots+b_7^2)=c_0^2+\cdots+c_7^2.\]

③ In Anthropic’s Disproof of the Exponential Time Hypothesis, the following identity is used, based on the multiplication structure of octonions: with $x,y,u,v\in{0,1}^3,$ and $\sigma$, a specific sign function taking values in $\lbrace +1,-1\rbrace$,

\[\begin{aligned} 2[x=v][y=u] &=[x\oplus y\oplus u\oplus v=0]\\ &\quad\cdot\bigl(\sigma(x,y)\sigma(v,u)+\sigma(x,u)\sigma(v,y)\bigr). \end{aligned}\]

⑷ Common Property: All three identities exhibit the property that the norm of the product of two elements equals the product of their respective norms:

\[N(xy)=N(x)N(y).\]

⑸ Hurwitz’s theorem rules out the existence of a 16-dimensional real bilinear sum-of-squares identity analogous to the eight-square identity.



3. Proof

It is obvious that the theorem holds for $n=1,2$. For an odd prime $p$, consider the following two sets:

\[A = \left\{0^2,1^2,\cdots,\left(\frac{p-1}{2}\right)^2\right\}\]

and

\[B = \left\{-1-0^2,-1-1^2,\cdots,-1-\left(\frac{p-1}{2}\right)^2\right\}.\]

Since $\left|A\right|=\left|B\right|=\frac{p+1}{2}$, the two sets contain a total of $p+1$ elements. Therefore, we can find two elements $a^2\in A$ and $-1-b^2\in B$ that have the same remainder modulo $p$, such that

\[a^2 \equiv -1-b^2 \pmod p\]

Thus, we can find an integer $k$ satisfying $1\leq k<p$ such that

\[pk = a^2+b^2+1^2+0^2 (★)\]

Now, suppose that $1<k<p$ and $pk$ is the sum of four squares. We will show that there exists a smaller positive integer $k’<k$ such that $pk’$ is also the sum of four squares. (★★) Suppose $k$ is even. Among $x_1,x_2,x_3,x_4$, both the number of even integers and the number of odd integers must be even. Therefore, we can pair integers of the same parity. (e.g., $(x_1,x_2)$ and $(x_3,x_4)$) Then,

\[\begin{aligned} \frac{pk}{2} &=\frac{x_1^2+x_2^2+x_3^2+x_4^2}{2}\\ &=\left(\frac{x_1+x_2}{2}\right)^2 +\left(\frac{x_1-x_2}{2}\right)^2\\ &\quad+\left(\frac{x_3+x_4}{2}\right)^2 +\left(\frac{x_3-x_4}{2}\right)^2 \end{aligned}\]

Hence, we have reduced $k$ to $k/2$. Now suppose $k$ is odd. For each $x_i$, we can define an integer $y_i$ satisfying $-\frac{k}{2}<y_i<\frac{k}{2}$ and

\[\begin{aligned} y_1 &\equiv x_1 \pmod k\\ y_2 &\equiv -x_2 \pmod k\\ y_3 &\equiv -x_3 \pmod k\\ y_4 &\equiv x_4 \pmod k \end{aligned}\]

The advantage of this definition is that

\[y_1^2+y_2^2+y_3^2+y_4^2<k^2 (★★★)\]

Furthermore, since

\[\begin{aligned} y_1^2+y_2^2+y_3^2+y_4^2 &\equiv x_1^2+x_2^2+x_3^2+x_4^2\\ &=pk\\ &\equiv 0\pmod k \end{aligned}\]

we obtain

\[y_1^2+y_2^2+y_3^2+y_4^2=kr\]

From (★★★), we obtain $0<r<k$. We now have

\[pk=x_1^2+x_2^2+x_3^2+x_4^2\]

and

\[kr=y_1^2+y_2^2+y_3^2+y_4^2.\]

By the Euler’s four-square identity, we obtain

\[(pk)(kr)=pk^2r=z_1^2+z_2^2+z_3^2+z_4^2.\]

Furthermore, from the proof of the Euler’s four-square identity,

\[\begin{aligned} z_1 &=x_1y_1-x_2y_2-x_3y_3-x_4y_4\\ &\equiv x_1^2+x_2^2+x_3^2+x_4^2\\ &\equiv 0\pmod k \end{aligned}\]

and

\[\begin{aligned} z_2 &=x_1y_2+x_2y_1+x_3y_4-x_4y_3\\ &\equiv -x_1x_2+x_2x_1-x_3x_4+x_4x_3\\ &=0\pmod k \end{aligned}\]

and

\[\begin{aligned} z_3 &=x_1y_3-x_2y_4+x_3y_1+x_4y_2\\ &\equiv -x_1x_3+x_2x_4+x_3x_1-x_4x_2\\ &=0\pmod k \end{aligned}\]

and

\[\begin{aligned} z_4 &=x_1y_4+x_2y_3-x_3y_2+x_4y_1\\ &\equiv -x_1x_4-x_2x_3+x_3x_2+x_4x_1\\ &=0\pmod k. \end{aligned}\]

Therefore,

\[\begin{aligned} pk^2r &= z_1^2+z_2^2+z_3^2+z_4^2\\ \iff pr &= \left(\frac{z_1}{k}\right)^2 +\left(\frac{z_2}{k}\right)^2 +\left(\frac{z_3}{k}\right)^2 +\left(\frac{z_4}{k}\right)^2 \end{aligned}\]

Hence, we have reduced $k$ to $r$. Thus, (★★) has been proved. By applying (★★) through infinite descent, we conclude that $p$ can also be expressed as the sum of four squares. Every integer $n\geq 2$ can be expressed as a product of primes:

\[n=p_1p_2\cdots p_r\]

Since each prime $p_i$ can be expressed as the sum of four squares, the Euler’s four-square identity implies that $n$ can also be expressed as the sum of four squares.



4. Applications

It has not yet been proved whether every nonnegative integer $n$ can be expressed as the sum of four integer cubes.



Written: 2026.06.24 00:48

results matching ""

    No results matching ""