 ##  [Fermat's Two-Squares Theorem](/fermats-two-squares-theorem) 

  ##  [Fermat's Two-Squares Theorem](https://puremath.quantumdictionary.io/fermats-two-squares-theorem-0) 

  

 [![Pure Mathematics Dictionary](/sites/default/files/styles/large/public/2026-01/Pure%20Mathematics.png.webp?itok=5pZnFQ59)](/topic-specific-dictionaries/mathematics-logic/pure-mathematics)

- Mathematics &amp; Logic -

**Pure Mathematics Dictionary**

 







 

 

 

 



 

 

 

 

Definition

The characterization that a prime p can be expressed as a sum of two integer squares precisely when p = 2 or p ≡ 1 (mod 4); extended to integers: an integer n is a sum of two squares iff every prime congruent to 3 (mod 4) appears with even exponent in n's prime factorization.