Skip to content

Euler's Four-Square Identity

A bilinear four-component composition law whose output represents the product of two sums of four squares as another sum of four squares.

Version
v3 · 2026-09-19 · History
Domain-specific #
1795
Domain group
Formal Sciences
Origin domain
Mathematics
Subdomains
Algebra and Number Theory, Composition of Quadratic Forms → Mathematics
Aliases
Euler Four Square Identity

Core Idea

Euler's Four-Square Identity is an explicit bilinear rule showing that the product of two values represented as sums of four squares is again represented as a sum of four squares. Let

\[ Q(x_0,x_1,x_2,x_3)=x_0^2+x_1^2+x_2^2+x_3^2. \]

For two quadruples \(a=(a_0,a_1,a_2,a_3)\) and \(b=(b_0,b_1,b_2,b_3)\), define

\[ \begin{aligned} c_0&=a_0b_0-a_1b_1-a_2b_2-a_3b_3,\\ c_1&=a_0b_1+a_1b_0+a_2b_3-a_3b_2,\\ c_2&=a_0b_2-a_1b_3+a_2b_0+a_3b_1,\\ c_3&=a_0b_3+a_1b_2-a_2b_1+a_3b_0. \end{aligned} \]

Then

\[ Q(a)Q(b)=Q(c). \]

How would you explain it like I'm…

Four Squares Times Four Squares

Square numbers are like 1, 4, and 9, which you can build as blocks arranged in a square. Some numbers can be made by adding four square numbers together. If two numbers can each be made that way, then multiplying them gives a number that can be made that way too. There is a recipe that tells you exactly which four squares to use for the answer.

The Four-Square Product Recipe

A square number is a number times itself, like 9 = 3 × 3. Some numbers can be written as the sum of four squares, like 30 = 1 + 4 + 9 + 16. Euler's four-square identity is a fixed recipe. Give it the four numbers for one value and the four numbers for another, and it builds four new numbers whose squares add up to the product of the two values. So multiplying never takes you out of the 'four-squares' club. By itself, though, it doesn't prove that every number is in the club.

Four-Square Product Formula

Let Q(x₀, x₁, x₂, x₃) = x₀² + x₁² + x₂² + x₃². Euler's four-square identity gives explicit formulas for four numbers c₀ … c₃, each built from products of the a's and b's, so that Q(a)·Q(b) = Q(c). For example, c₀ = a₀b₀ − a₁b₁ − a₂b₂ − a₃b₃. So it doesn't just say the product is a sum of four squares; it constructs the four numbers. Because it's a polynomial identity, you can check it by expanding both sides, and it works for integers and beyond. In number theory it shows that numbers expressible as four squares are closed under multiplication. That is a key step in proving every positive integer is a sum of four squares, but it is not the whole proof. Later, quaternions, a four-part number system, explained why it works: the formula is the size of a product equaling the product of the sizes.

 

With Q(x) = x₀² + x₁² + x₂² + x₃², Euler's four-square identity gives explicit bilinear forms. These are c₀ = a₀b₀ − a₁b₁ − a₂b₂ − a₃b₃, c₁ = a₀b₁ + a₁b₀ + a₂b₃ − a₃b₂, c₂ = a₀b₂ − a₁b₃ + a₂b₀ + a₃b₁, and c₃ = a₀b₃ + a₁b₂ − a₂b₁ + a₃b₀, and they satisfy Q(a)Q(b) = Q(c). Bilinearity makes it a constructive composition law: two witnesses of four-square representability map to a witness for the product. It is a polynomial identity in ℤ[a, b], verified by expansion, so it holds in every commutative ring. Over ℝ it is the coordinate form of quaternion norm multiplicativity. With α = a₀ + a₁i + a₂j + a₃k and β defined likewise, the Hamilton product αβ has coordinates c₀ … c₃, and N(αβ) = N(α)N(β), where N(α) = αᾱ = Q(a). In number theory it shows that the values of Q are closed under multiplication. That supplies the multiplicative step of four-square arguments, though it does not alone prove that every positive integer is represented. Euler stated it in a letter to Goldbach dated May 4, 1748, but the name is not the recognition test; the explicit bilinear law is.

Scope of Application

The home domains are algebra, elementary number theory, quadratic forms, and quaternion theory. Over \(\mathbb Z\), the identity composes integral representations. Over \(\mathbb Q\), \(\mathbb R\), or another commutative ring, it remains a polynomial equality. Over \(\mathbb R\), it expresses the Euclidean squared norm on \(\mathbb H\cong\mathbb R^4\) as a multiplicative quadratic form.

In elementary number theory, let

\[ S_4=\{x_0^2+x_1^2+x_2^2+x_3^2:x_i\in\mathbb Z\}. \]

Clarity

A quick diagnostic asks:

  1. Are there two four-component inputs evaluated by the sum-of-four-squares form?
  2. Are four output components given bilinearly in the two inputs?
  3. Does the output's four-square value equal the product of the input values as a universal identity?
  4. Is the claim about composition of representations rather than universal representability of integers?

Manages Complexity

A bare closure proof would show only that some four-square representation of \(mn\) exists whenever representations of \(m\) and \(n\) exist. Euler's identity compresses that search into four fixed formulas. No new Diophantine search is required: insert the two witnesses and evaluate the bilinear map.

That compression scales to products of many represented integers. Repeated composition transports witnesses along a factorization, while quaternion associativity explains why different parenthesizations of the standard Hamilton product agree.

Abstract Reasoning

The identity licenses a closure inference: for any commutative ring \(R\), the value set \(Q(R^4)\) is closed under multiplication. It also licenses witness propagation: given actual coordinate witnesses \(a\) and \(b\), the bilinear output \(B(a,b)\) is a computable witness for the product.

Knowledge Transfer

Within mathematics, the exact transferable pattern is quadratic-form witnesses + bilinear composition → multiplicative norm → closure of represented values. It transfers from complex numbers and two squares to quaternions and four squares, and—with nonassociative qualifications—to octonions and eight squares.

The identity also transfers between coordinate algebra and structural algebra. A polynomial-expansion proof works over arbitrary commutative rings; a quaternion proof reveals why the signs and pairings fit together. In arithmetic, the same structure propagates integral representations. In quadratic-form theory, it is an example of composition.

Relationships to Other Abstractions

Local relationship map for Euler's Four-Square IdentityParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Euler's Four-SquareIdentityDOMAINPrime abstraction: Closure — is a kind ofClosurePRIME

Current abstraction Euler's Four-Square Identity Domain-specific

Parents (1) — outgoing typed relations

  • Euler's Four-Square Identity is a kind of Closure Prime

    Closure is the broader abstraction this entry instantiates.

Hierarchy path (1) — routes to 1 parentless root

  • Euler's Four-Square Identity → is a kind of Closure

Neighborhood in Abstraction Space

Euler's Four-Square Identity sits in a sparse region of the domain-specific corpus (84th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Unclustered & Miscellaneous (2769 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25