Fifteen cannot be a sum of two squares, yet 15=3²+2²+1²+1². Lagrange’s four-square theorem says every positive integer has a representation by four integer squares, allowing zero entries. To prove a statement about all integers, first establish closure under multiplication, then represent each prime. The difficult step is a descent that turns a representation of a multiple of a prime into a representation of the prime itself.
Predict
Predict why a product identity helps. For vectors a=(a1, a2, a3, a4) and b=(b1, b2, b3, b4), define c1=a1b1+a2b2+a3b3+a4b4; c2=−a1b2+a2b1−a3b4+a4b3; c3=−a1b3+a2b4+a3b1−a4b2; c4=−a1b4−a2b3+a3b2+a4b1. Expanding shows Σc_i²=(Σa_i²)(Σb_i²). Each a_i²b_j² appears once; mixed terms cancel in opposite-sign pairs. Check one such pair before trusting the identity. It is the norm identity for a quaternion times a conjugate, but no quaternion theory is required here.
Experiment
For an odd prime p, the set of square residues including zero has(p+1)/2 elements. The set of residues−1−y² has the same size, so the two sets intersect. Thus x²+y²+1=0 modulo p. Choose centered representatives with absolute value at most(p−1)/2. Their positive sum x²+y²+1 is below p², giving mp represented by four squares with 1≤m< p.
Prime
x
y
x²+y²+1
Multiplier
7
3
2
14
2
11
1
3
11
1
The fourth square is zero. For seven, the descent will remove the multiplier two.
Understand
Choose the least positive m< p for which mp=Σa_i². If m is even, the number of odd entries is even, so pair entries of equal parity. Replace each pair(u, v) by((u+v)/2,(u−v)/2). These are integers and the total norm becomes mp/2, contradicting minimality. Hence a minimal m greater than one is odd. Reduce each a_i to a balanced residue b_i modulo m, with absolute value at most(m−1)/2. Their norm is divisible by m, say Σb_i²=mr, and r≤(m−1)²/m< m. If r=0, every b_i is zero, so m divides every a_i and m² divides mp. Then m divides p, impossible for 1< m< p. Therefore 0< r< m.
Apply
Apply the product identity to a and b. Because b_i=a_i modulo m, the first coefficient c1 is congruent to Σa_i²=mp=0 modulo m, while the other three coefficients cancel in pairs modulo m. Divide all c_i by m. Their squared norm is (mp)(mr)/m²=pr, giving a smaller positive multiplier and contradicting minimality. Consequently m=1 and every odd prime is a sum of four squares. The prime two is 1²+1²+0²+0². Prime factorization and the multiplication identity finish the theorem for every positive integer; one is represented separately.
Continue
The parity step is essential: without it, balanced residues for even m give only r≤m, which is not strict descent. For the example 14=3²+2²+1²+0², pair 3 with 1 and 2 with 0; half-sums and half-differences give 2, 1, 1, 1, whose squares sum to seven. This proof establishes existence and a constructive route, but does not count representations or optimize a search implementation. Three-square classification is a different theorem with additional obstructions and is not claimed here.
Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.
Compute 3²+2²+1²+1².
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
How many distinct square residues including zero occur modulo an odd prime 11?
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
For an odd prime p prove x²+y²+1 is a positive multiple mp with m<p for suitable integers x, y.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Explain how an even multiplier m can be halved.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
For odd minimal m>1, explain why balanced residues give a smaller positive multiplier r.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Explain how representations of all primes imply representations of all positive integers.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Reflect and continue
Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.