Exercise 2217Algebra › Rings and fieldsM1Added 3 Nov 2026
Sums of two squares via $\mathbb{Z}[i]$
#sums of squares#Gaussian integers#factorization
Statement
Using , show that a prime is a sum of two squares.
Hint
is a quadratic residue mod when (Wilson's theorem or Euler's criterion). So for some , i.e. in .
Show solutionHide solution
Solution
is a square mod . For , by Euler's criterion , so there is with . Thus .
is not irreducible in . If were prime in , then or , which is impossible (the imaginary part is , not divisible by ).
Factorization. So with non-units. Taking norms: , and since are non-units, . So .
Conclusion. If , then . Every prime is a sum of two squares.