Math 2.0

Number theory Diophantine equations Theorem

Fermat's theorem on sums of two squares

Builds on Prime number−1 is a square modulo p if and only if p is not 3 modulo 4

Statement

Let pp be an odd prime number. Then there are integers xx and yy with p=x2+y2p = x^2 + y^2 if and only if p≡1(mod4)p \equiv 1 \pmod 4.

Remarks

The prime 2=12+122 = 1^2 + 1^2 is also a sum of two squares. So a prime pp is a sum of two squares if and only if p≢3(mod4)p \not\equiv 3 \pmod 4. For example, 5=1+45 = 1 + 4, 13=4+913 = 4 + 9 and 29=4+2529 = 4 + 25. For p≡1(mod4)p \equiv 1 \pmod 4, the representation is unique up to order and signs. The "only if" part is easy: a square is 00 or 11 modulo 44, so x2+y2≢3(mod4)x^2 + y^2 \not\equiv 3 \pmod 4. One proof of the other part starts from a square root of −1-1 modulo pp and uses Gaussian integers or Minkowski's theorem.

History

Albert Girard stated the result in a book published in 1625. Fermat stated it in a letter to Mersenne of 25 December 1640, so it is also called Fermat's Christmas theorem. Euler gave the first proof, by infinite descent, in 1749.

Reading path

To understand this page from the ground up, read these 10 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Divisibility definition
  2. Congruence modulo n definition
  3. Prime number definition
  4. Quadratic residue definition
  5. Fermat's little theorem statement
  6. Legendre symbol definition
  7. Euler's criterion statement
  8. First supplement to quadratic reciprocity statement
  9. −1 is a square modulo p if and only if p is not 3 modulo 4 statement
  10. Fermat's theorem on sums of two squares statement

Where this leads

2 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Fermat%27s_theorem_on_sums_of_two_squares, History
  2. Web https://en.wikipedia.org/wiki/Fermat%27s_theorem_on_sums_of_two_squares, Euler's proof by infinite descent
About this page
Tag043B3ENSTY
URIm2://043B3ENSTY
Aliasesfermat-christmas-theorem
Kindstatement, theorem
WritingW1 stated
MSC11E25
StatusThis copy of the site has no build data. Run m2 status 043B3ENSTY.
UsesPrime number, −1 is a square modulo p if and only if p is not 3 modulo 4
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W2

  • edge about out: the concepts that the statement is about (0 of 1)
  • edge proves in: at least one proof node (0 of 1)
  • edge instance_of or illustrates in: one example that shows the statement at work (0 of 1)
  • explanation L2 (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Used by