A classic result in number theory!
The shortest proof I'm aware of is due to Don Zagier (1990), and it's a masterpiece of concise elegance. It's only one sentence long! Here's the proof:
Theorem: Every prime p≡1(mod4) is expressible as the sum of two squares.
Proof:
The involution on the finite set S={(x,y,z)∈N3:x2+4yz=p} defined by
(x + 2z, z, y - x - z) & \text{if } x < y - z, \\
(2y - x, y, x - y + z) & \text{if } y - z < x < 2y, \\
(x - 2y, x - y + z, y) & \text{if } x > 2y
\end{cases}$$
has exactly one fixed point, so $|S|$ is odd, and the involution $(x, y, z) \mapsto (x, z, y)$ also has a fixed point.
**That's it!**
Now, let me unpack this telegraphic proof for you:
**Step 1: Define the set S**
Consider the set $S$ of triples $(x, y, z)$ of positive integers satisfying $x^2 + 4yz = p$. Our goal is to show that there's a triple with $z = 1$, for then $x^2 + 4y = p$, or $x^2 + (2y)^2 = p$, expressing $p$ as a sum of two squares.
**Step 2: The clever involution**
Zagier defines an involution (a bijection that's its own inverse) $\phi: S \to S$. For each triple $(x, y, z)$, $\phi(x, y, z)$ is defined by one of three formulas, depending on the value of $x$ relative to $y$ and $z$. You can verify that each formula maps $S$ to $S$ and is its own inverse.
**Step 3: The fixed points**
An involution partitions its domain into pairs $\{a, \phi(a)\}$ and fixed points $\phi(a) = a$. **Key insight:** $\phi$ has **exactly one** fixed point. To see why, assume $\phi(x, y, z) = (x, y, z)$. Checking each case:
1. $x < y - z$ leads to $x = x + 2z$, so $z = 0$, impossible since $z \in \mathbb{N}$.
2. $y - z < x < 2y$ leads to $x = 2y - x$, so $x = y$. Then $x^2 + 4xz = p$ becomes $x(x + 4z) = p$, and since $p$ is prime, $x = 1$, $x + 4z = p$. Thus, $(1, 1, \frac{p-1}{4})$ is the **unique** fixed point of $\phi$.
3. $x > 2y$ leads to $x = x - 2y$, so $y = 0$, again impossible.
**Step 4: |S| is odd**
Since $\phi$ has exactly one fixed point, and all other elements of $S$ are paired, $|S|$ must be odd.
**Step 5: The second involution**
Consider the simpler involution $\psi: S \to S$ defined by $\psi(x, y, z) = (x, z, y)$. Its fixed points satisfy $y = z$, so $x^2 + 4y^2 = p$. Since $|S|$ is odd, $\psi$ **must** have a fixed point (otherwise, all elements would be paired, making $|S|$ even). This fixed point yields the desired representation of $p$ as a sum of two squares: $p = x^2 + (2y)^2$.
**Why this proof is remarkable:**
1. **Brevity**: Only one sentence, yet it packs deep insight.
2. **Elementary**: No advanced theorems (like Minkowski's geometry of numbers or Gaussian integers) are needed.
3. **Combinatorial magic**: The involutions do all the heavy lifting, forcing the existence of the desired representation.
Zagier's proof is a shining example of Erdős's notion of a proof being "from THE BOOK" (as in, the divine book of perfect proofs). If you want more unpacking or background, I'd be happy to provide!
P.S. For history buffs: Fermat stated this result in 1640 (without proof), Euler proved it in 1754 (with considerable effort), and Lagrange (1775) and Gauss (1825) gave more elegant proofs. Zagier's 1990 proof is the most concise we've found so far.