Sometime around 1637, the French lawyer and amateur mathematician Pierre de Fermat was reading a copy of Diophantus’s Arithmetica, a third-century Greek text on number theory. Next to a passage about Pythagorean triples (whole numbers that satisfy a² + b² = c²), Fermat wrote a note in the margin. He claimed that the equation an + bn = cn has no whole number solutions when n is greater than 2. Then he added a sentence that would haunt mathematics for over three centuries: “I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.”
Fermat never published the proof. He may never have had one. But the claim, which became known as Fermat’s Last Theorem, resisted every attempt at proof for 358 years. Generations of the world’s finest mathematicians tried and failed. The theorem became the most famous unsolved problem in mathematics, a symbol of the gap between what we believe to be true and what we can prove.
In 1995, the British mathematician Andrew Wiles finally proved it. The proof took seven years of solitary work and ran to over 100 pages. It used mathematical tools that Fermat could not possibly have imagined. The story of how that proof came to be is one of the great intellectual dramas of the twentieth century.
What the Theorem Says
The Pythagorean theorem tells us that there are infinitely many sets of whole numbers (a, b, c) that satisfy a² + b² = c². The simplest is 3, 4, 5: since 9 + 16 = 25. Others include 5, 12, 13 and 8, 15, 17. These Pythagorean triples have been known since ancient Babylon.
Fermat’s Last Theorem says that if you change the exponent from 2 to any larger whole number, the equation has no solutions in positive whole numbers. There are no whole numbers a, b, c such that a³ + b³ = c³. None such that a⁴ + b⁴ = c⁴. And so on for every exponent greater than 2.
The statement is simple enough for a schoolchild to understand. The proof required some of the deepest mathematics of the twentieth century.
Three Centuries of Failure
After Fermat’s death in 1665, mathematicians found proofs of many of his other claims in his notes and correspondence. But the Last Theorem resisted. Fermat himself had proved the case n = 4 (using a technique called infinite descent). Euler proved the case n = 3 in the eighteenth century. Legendre and Dirichlet independently proved n = 5 in the early nineteenth century. Lamé proved n = 7 in 1839.
But these were individual cases. Each required its own argument, and there was no sign that a general method could handle all exponents at once. The problem seemed to grow more difficult with each new case, not less.
Sophie Germain’s Approach
One of the most significant early advances came from Sophie Germain, a self-taught French mathematician who worked on the theorem in the early nineteenth century. Germain could not attend university (women were barred) and initially corresponded with Gauss under a male pseudonym. She developed a general strategy that could handle entire classes of exponents at once rather than proving each case individually.
Germain proved that for a prime p, if there exists an auxiliary prime q satisfying certain conditions, then any solution to Fermat’s equation must have a, b, or c divisible by p². This was a powerful result that eliminated many potential solutions and influenced all subsequent work on the theorem. Germain’s approach was the first truly general attack on the problem.
Kummer and Ideal Numbers
In the 1840s, the German mathematician Ernst Kummer made the most important advance of the nineteenth century. He discovered that earlier attempts to prove the theorem had relied on a property of ordinary numbers (unique factorization) that does not hold in the number systems needed for the proof. To fix this, Kummer invented ideal numbers, a new algebraic concept that restored unique factorization in these systems.
Using ideal numbers, Kummer proved Fermat’s Last Theorem for all “regular” primes (a specific class of prime numbers). This covered infinitely many cases, a major achievement. But it did not cover all primes, and the irregular primes remained stubbornly resistant.
By the early twentieth century, the theorem had been verified for all exponents up to several hundred by computational methods. But a general proof seemed as distant as ever.
The Taniyama-Shimura Conjecture
The breakthrough that eventually led to the proof came not from number theory directly but from an unexpected connection between two seemingly unrelated areas of mathematics.
In 1955, the Japanese mathematicians Yutaka Taniyama and Goro Shimura proposed a conjecture linking elliptic curves (algebraic curves defined by cubic equations) with modular forms (highly symmetric functions from complex analysis). The conjecture stated that every elliptic curve is “modular,” meaning it can be associated with a specific modular form.
The Taniyama-Shimura conjecture seemed to have nothing to do with Fermat’s Last Theorem. But in 1985, the German mathematician Gerhard Frey proposed that if Fermat’s Last Theorem were false (if a solution existed), the resulting equation would define an elliptic curve so strange that it could not possibly be modular. Kenneth Ribet proved Frey’s insight rigorously in 1986, establishing that the Taniyama-Shimura conjecture implies Fermat’s Last Theorem.
This transformed the problem. To prove Fermat’s Last Theorem, it was now sufficient to prove the Taniyama-Shimura conjecture (or at least the relevant special case). The problem had been translated from number theory into the language of modern algebraic geometry.
Andrew Wiles
Andrew Wiles first encountered Fermat’s Last Theorem at the age of ten, in a library in Cambridge. He later described it as love at first sight: a problem so simple to state that a child could understand it, yet so hard that the greatest mathematicians in history had failed to solve it. He decided then that he would prove it.
When Ribet’s result was announced in 1986, Wiles was a professor at Princeton. He realized that the path to Fermat’s Last Theorem now ran through the Taniyama-Shimura conjecture, and he began working on it in secret. For seven years, he told almost no one what he was doing. He worked alone in his attic study, developing new mathematical techniques and combining ideas from several different fields.
In June 1993, Wiles announced his proof at a series of lectures at the Isaac Newton Institute in Cambridge. The mathematical community was electrified. But during the review process, a subtle error was discovered in one step of the argument. The proof was incomplete.
Wiles spent over a year trying to fix the gap. He later described this period as the most painful of his career. In September 1994, working with his former student Richard Taylor, he found the repair. The corrected proof was published in 1995 in two papers in the Annals of Mathematics.
What the Proof Used
Wiles’s proof is far beyond anything Fermat could have conceived. It draws on algebraic geometry, representation theory, commutative algebra, and the theory of modular forms. The key ideas include:
- Galois representations: associating elliptic curves with representations of the Galois group, the fundamental symmetry group of number theory
- Modular lifting: showing that certain Galois representations must come from modular forms
- The Iwasawa theory: a deep connection between number theory and the structure of infinite algebraic extensions
- Deformation theory: a technique for studying families of mathematical objects by varying their parameters
The proof does not merely verify that the equation has no solutions. It establishes a profound connection between elliptic curves and modular forms that has become one of the central results of modern mathematics. Wiles’s proof of (the relevant case of) the Taniyama-Shimura conjecture is now considered more important than Fermat’s Last Theorem itself.
Did Fermat Have a Proof?
Almost certainly not. The mathematical tools needed for Wiles’s proof did not exist in the seventeenth century, and no simpler proof has been found despite decades of searching. Most historians believe that Fermat either made an error in his claimed proof or was referring to a proof of a special case (perhaps n = 4, which he did prove correctly).
Fermat was a brilliant mathematician, but he was also known for making claims without publishing proofs, and some of his other claims turned out to be wrong. The most charitable interpretation is that he found an argument that he believed was correct but that contained a subtle flaw. The margin note was written privately, not for publication, and Fermat may never have subjected his argument to the scrutiny it would have required.
The Legacy
Fermat’s Last Theorem stimulated three and a half centuries of mathematical development. The attempts to prove it led directly to the creation of algebraic number theory (Kummer’s ideal numbers), the theory of elliptic curves, and the Langlands program (a vast web of conjectures that connects number theory, geometry, and analysis). The mathematics created in pursuit of Fermat’s theorem turned out to be far more valuable than the theorem itself.
Wiles received the Abel Prize in 2016 (the closest equivalent to a Nobel Prize in mathematics) for his proof. He was too old for the Fields Medal, which is awarded only to mathematicians under forty, but he received a special silver plaque from the International Mathematical Union in recognition of his achievement.
The tradition of rigorous mathematical proof that made Fermat’s Last Theorem meaningful, and that made Wiles’s proof possible, begins with the ancient Greeks. The method of proceeding from axioms through logical deduction to theorems was codified in Euclid’s Elements over two thousand years ago, and every mathematical proof since, including Wiles’s 100-page argument, follows the pattern that Euclid established.
The mathematical notebooks in which working mathematicians develop their ideas before publishing them offer a window into how proofs are actually constructed. Kronecker Wallis’s edition of Gauss’s Selected Visual Notebooks presents five of Gauss’s manuscripts, including investigations in number theory that laid the groundwork for the algebraic methods later used in attacks on Fermat’s theorem.
A Problem Worth Waiting For
Fermat’s Last Theorem is sometimes criticized as a curiosity: a statement about specific equations that has no practical application. This criticism misses the point. The theorem mattered not because of what it said but because of what it required. Proving it demanded the creation of entirely new branches of mathematics that have proved essential in fields from cryptography to theoretical physics.
The 358 years between Fermat’s margin note and Wiles’s proof represent one of the longest sustained intellectual efforts in human history. Dozens of mathematicians across ten generations contributed pieces of the puzzle. The solution, when it came, united ideas from across the mathematical landscape in a synthesis that no single mind could have conceived from scratch. Fermat’s Last Theorem is proof that some problems are worth waiting for, because the mathematics you create along the way is worth more than the answer.