There are no positive integers a, b, c satisfying aⁿ + bⁿ = cⁿ for any integer n greater than 2. Stated by Pierre de Fermat in the margin of a book in 1637, who claimed to have a proof "too large to fit in the margin." The theorem resisted proof for 358 years until Andrew Wiles, building on decades of number theory, completed a proof in 1994 — one of the most celebrated mathematical achievements of the 20th century.
You know that 3² + 4² = 5² (that's the Pythagorean theorem — 9 + 16 = 25). There are infinitely many whole-number solutions to a² + b² = c². But what about cubes? Is there any way to find whole numbers a, b, c such that a³ + b³ = c³? What about a⁴ + b⁴ = c⁴, or any higher power?
The statement sounds simple — almost like a puzzle you could solve with enough patience. But proving that no solution exists, for every possible power greater than 2, for every possible combination of numbers, turned out to require some of the deepest mathematics ever developed. Many brilliant mathematicians — Euler, Gauss, Kummer, Sophie Germain — made partial progress over the centuries, but a complete proof remained out of reach.
In 1994, British mathematician Andrew Wiles completed a proof — after working on it in secret for seven years. His proof didn't attack the problem directly. Instead, he proved a deep connection between two very different areas of mathematics (elliptic curves and modular forms), and showed that this connection implied Fermat's Last Theorem must be true. The proof is over 100 pages long and uses mathematics that didn't even exist in Fermat's time — so Fermat almost certainly did not have a correct proof, whatever he believed.
For n = 2, there are infinitely many solutions — the Pythagorean triples (3,4,5), (5,12,13), etc. Fermat's theorem says this pattern breaks completely for every higher power.
Note: it's enough to prove the theorem for n = 4 and for all odd prime exponents, since any other exponent is a multiple of 4 or of an odd prime, and a solution for the multiple would give a solution for the factor.
Wiles's strategy relied on a conjecture from the 1950s–60s proposed by Yutaka Taniyama and Goro Shimura (with contributions from André Weil), which stated that every elliptic curve over the rational numbers is "modular" — connected to a specific type of highly symmetric function called a modular form. This seemed unrelated to Fermat's equation.
Gerhard Frey made the crucial link: if a solution to Fermat's equation existed for some n > 2, you could construct a strange elliptic curve (the "Frey curve") from it — one so strange it could not possibly be modular. Ken Ribet (1986) proved this rigorously. So: if the Taniyama–Shimura conjecture were true, then Fermat's Last Theorem would automatically follow — because a Fermat solution would produce a non-modular elliptic curve, contradicting the conjecture.
This transformed the problem: prove Taniyama–Shimura (at least for the relevant class of curves), and Fermat's Last Theorem falls out as a consequence.
Andrew Wiles, working largely in secrecy at Princeton from 1986 to 1993, set out to prove the Taniyama–Shimura conjecture for semistable elliptic curves — the specific class needed for the Frey curve argument. His approach used deformation theory of Galois representations, building on work of Barry Mazur, and required connecting the theory of modular forms to Galois representations via a technique involving "Hecke algebras."
Wiles announced his proof in a series of three lectures at Cambridge in June 1993, creating a sensation reported in international news media. However, during the peer review process, a gap was discovered in the argument — specifically in the construction of an Euler system needed to bound a certain Selmer group. Wiles spent nearly a year, working with his former student Richard Taylor, attempting to fix the gap.
In September 1994, Wiles and Taylor found a way around the gap using a different technique (relating Iwasawa theory to a construction avoiding the flawed Euler system), completing the proof. Two papers were published in the Annals of Mathematics in 1995: Wiles's main paper "Modular elliptic curves and Fermat's Last Theorem," and a joint paper with Taylor, "Ring-theoretic properties of certain Hecke algebras," providing the necessary supporting result.
Wiles proved the semistable case, sufficient for Fermat's Last Theorem. The full conjecture (all elliptic curves over ℚ are modular) was completed in 2001 by Christophe Breuil, Brian Conrad, Fred Diamond, and Richard Taylor, building directly on Wiles's methods. This full result is now called the Modularity Theorem.
Wiles received numerous honours for the proof, including a special silver plaque from the International Mathematical Union in 1998 (he was just over the traditional age-40 cutoff for the Fields Medal), and the Abel Prize in 2016 — one of mathematics' highest honours, often described as equivalent to a Nobel Prize for mathematics.