120 II Divisibility
ThenN(γ)≥0, with equality if and only ifγ=0, andN(γ 1 γ 2 )=N(γ 1 )N(γ 2 ).If
γ∈G,thenN(γ)is an ordinary integer. Furthermore,γis a unit inG,i.e.γdivides 1
inG, if and only ifN(γ)=1.
We wish to show that ifα,β∈Gandα=0, then there existκ,ρ∈Gsuch that
β=κα+ρ, N(ρ) <N(α).
We h av eβα−^1 =r+si,wherer,s∈Q. Choosea,b∈Zso that
|r−a|≤ 1 / 2 , |s−b|≤ 1 / 2.
Ifκ=a+bi,thenκ∈Gand
N(βα−^1 −κ)≤ 1 / 4 + 1 / 4 = 1 / 2 < 1.
Hence ifρ=β−κα,thenρ∈GandN(ρ) <N(α).
It follows that we can apply toGthe whole theory of divisibility in a Euclidean
domain. Now letpbe a prime such thatp≡1 mod 4. We will show thatpis a sum of
two squares by constructingβ∈Gfor whichN(β)=p.
By Corollary 29, there exists an integerasuch thata^2 ≡−1modp.Putα=a+i.
ThenN(α)=αα ̄=a^2 +1 is divisible bypinZand hence also inG. However, nei-
therαnorα ̄is divisible bypinG,sinceαp−^1 andα ̄p−^1 are not inG. Thuspis not
aprimeinGand consequently, sinceGis a Euclidean domain, it has a factorization
p=βγ, where neitherβnorγis a unit. HenceN(β) > 1 ,N(γ) >1. Since
N(β)N(γ)=N(p)=p^2 ,
it follows thatN(β)=N(γ)=p.
Proposition 39 solves the problem of representing a positive integer as a sum of
two squares. What if we allow more than two squares? When congruences were first
introduced in§5, it was observed that a positive integera≡7 mod 8 could not be
represented as a sum of three squares. It was first completely proved by Gauss (1801)
that a positive integer can be represented as a sum of three squares if and only if it is
not of the form 4na,wheren≥0anda≡7 mod 8. The proof of this result is more
difficult, and will be given in Chapter VII.
It was conjectured by Bachet (1621) thateverypositive integer can be represented
as a sum of four squares. Fermat claimed to have a proof, but the first published proof
was given by Lagrange (1770), using earlier ideas of Euler (1751). The proof of the
four-squares theorem we will give is similar to that just given for the two-squares
theorem, with complex numbers replaced by quaternions.
Proposition 40Every positive integer n can be represented as a sum of four squares.
Proof A quaternionγ =a+bi+cj+dkwill be said to be aHurwitz integer
ifa,b,c,d are either all integers or all halves of odd integers. The set of all
Hurwitz integers will be denoted byH. Evidentlyγ ∈H impliesγ ̄ ∈H,where
γ ̄=a−bi−cj−dk. Moreoverα,β∈H impliesα±β∈H. We will show that
α,β∈Halso impliesαβ∈H.