The Margin
Pierre de Fermat was not a professional mathematician. He was a judge in Toulouse who did mathematics the way some people do crossword puzzles -- compulsively, in the margins of the day. He read his copy of Diophantus' Arithmetica the way a jazz musician reads a lead sheet: as an invitation to improvise.
Beside a problem about splitting squares into two squares, Fermat wrote the most famous margin note in history. The equation xn + yn = zn has infinitely many solutions when n is 2 -- the Pythagorean triples that every schoolchild learns. 3, 4, 5. Then 5, 12, 13. An endless family.
But raise the exponent by one, Fermat claimed, and every solution vanishes. Not for cubes alone. Not for fourth powers alone. For every power greater than two, forever, across all of infinity. No three whole numbers will ever satisfy the equation.
He said he had a marvelous proof. He never wrote it down.
His son published the note after Fermat's death. Mathematicians read it and thought: how hard can it be? The statement is so simple a child can understand it. The proof should follow.
It did not follow. Not for a very long time.
Three Centuries of Failure
The simplest-sounding problems in mathematics are often the hardest. Fermat's claim sat there, five lines of Latin, mocking every generation that tried. The greatest minds in Europe threw themselves at it. Each one failed. But the mathematics they invented while failing changed the world.
Euler
Leonhard Euler -- the most prolific mathematician who ever lived, a man who kept publishing after going blind, dictating papers from memory -- proved the case for cubes. His method was ingenious. It also contained a subtle gap he never noticed. The result was correct anyway, which is either a miracle or a testament to his intuition.
Kummer
Ernst Kummer discovered why the obvious approach kept failing: a basic property of numbers -- unique factorization -- breaks down in the strange algebraic worlds you need to work in. So he invented an entirely new kind of number to repair the damage. He called them ideal numbers. They didn't solve Fermat's problem. They gave birth to algebraic number theory.
Wolfskehl
Paul Wolfskehl, a German industrialist, was reportedly on the verge of suicide when he became absorbed in a gap in Kummer's work. The mathematics distracted him long enough that he survived the night. In gratitude, he left 100,000 marks to whoever could prove Fermat's theorem. In the years that followed, the University of Göttingen received 621 incorrect proofs.
Computation
Computers verified the theorem for every exponent up to four million. But infinity minus four million is still infinity. Brute force could confirm that Fermat was right in every case it checked. It could never prove he was right in all cases. A different kind of thinking was needed.
Sophie Germain
She taught herself mathematics from books in her father's library during the French Revolution, wrapping herself in blankets when her parents confiscated her candles and let the fire go out, hoping to force her to sleep. She kept reading by moonlight.
Because the École Polytechnique did not admit women, she obtained lecture notes and submitted observations under the name Monsieur LeBlanc, work so exceptional that Joseph-Louis Lagrange, then the most eminent mathematician in France, demanded to meet the brilliant student. When he discovered LeBlanc was a woman, he did not withdraw -- he became her mentor, the first mathematician of stature to take her seriously.
She corresponded with the greatest mathematicians of her age. She proved the first truly general result about Fermat's theorem: that for an infinite class of prime exponents -- now called Sophie Germain primes -- no solution exists in which none of the three numbers is divisible by the exponent.
When Carl Friedrich Gauss -- who had only ever known her as M. LeBlanc -- learned she was a woman, he wrote to her:
She died of breast cancer at 55. On her death certificate, the occupation listed was not mathematician. It was rentière -- a woman of independent means. The profession she had practiced her entire adult life did not, officially, belong to her.
Two Islands
Two continents of mathematics, separated by an ocean of abstraction. On one continent live the elliptic curves -- a family of looping shapes, like the silhouette of a saddle or the cross-section of a doughnut, each one defined by a simple equation. They are geometric, visual, tangible. You can draw them.
On the other continent live the modular forms -- patterns that repeat with an almost impossible symmetry, like a wallpaper design that looks identical no matter how you stretch or fold the wall. They are algebraic, abstract, creatures of pure structure. You cannot draw them. You can only feel their symmetry.
In 1955, at the International Symposium on Algebraic Number Theory in Tokyo and Nikko, a young mathematician named Yutaka Taniyama stood up and posed a question that silenced the room. He asked whether the Hasse-Weil zeta functions of elliptic curves might be identical to the Mellin transforms of modular forms. In plain language: could every elliptic curve secretly be a modular form? Could these two unrelated continents actually be the same place, seen from different angles -- two languages describing one truth?
Taniyama saw a bridge.
His friend Goro Shimura refined the intuition into a precise conjecture. Most mathematicians thought it was beautiful but impossible. It connected two worlds that had no business being connected.
In November 1958, three years after the symposium, Taniyama killed himself. He was 31. He left a note that was not about mathematics. It was about the ordinary sadness of a life that had become unbearable. He was engaged to be married. His fiancée, Misako Suzuki, killed herself two weeks later.
Shimura carried the conjecture alone for decades. He rarely spoke about his friend's death. When he did, late in life, he said only: "He was not a very careful person as a mathematician. He made a lot of mistakes. But he made mistakes in a good direction."
The Taniyama-Shimura conjecture sat in the literature like a strange prophecy. If true, it would mean that two vast territories of mathematics were mirror images of each other. Every elliptic curve had a hidden fingerprint -- a pattern of symmetry -- that made it secretly a modular form. Two languages. One truth.
Nobody knew how to prove it. And nobody knew it had anything to do with Fermat.
The Lightning
In 1984, a German mathematician named Gerhard Frey had an insight so strange it took years for the community to absorb it. He asked: what if Fermat is wrong? What if there exist three numbers that satisfy the equation?
If so, Frey showed, you could use those numbers to build an elliptic curve -- but a monstrous one. A curve so warped, so pathological, that it could not possibly have the hidden symmetry that modular forms require. It would be an elliptic curve with no fingerprint. An orphan. A thing that, according to Taniyama and Shimura, cannot exist.
In 1986, Kenneth Ribet at Berkeley proved that Frey's monstrous curve really was non-modular. The chain of logic snapped shut:
If every elliptic curve is modular, then Fermat's Last Theorem is true.
The most famous unsolved problem in mathematics had been quietly consumed by a conjecture about symmetry. To prove Fermat, you no longer needed to think about Fermat at all. You needed to build a bridge between two islands.
Seven Years in the Attic
The Boy in the Library
Andrew Wiles first read about Fermat's Last Theorem when he was ten years old, in his local library in Cambridge, England. It was the simplicity that seized him -- a problem so easy to state that a child could understand it, yet unsolved for three centuries. He decided, with the unreasonable certainty of childhood, that he would be the one to solve it.
He was 33 when he heard about Ribet's proof. Suddenly the dream of his childhood was alive again. The problem was equivalent to proving a special case of Taniyama-Shimura -- proving that a certain class of elliptic curves are modular. And that was the kind of mathematics Andrew Wiles knew how to do.
He told no one. Not his colleagues, not his department chair. Only his wife Nada, on their honeymoon in 1988.
The Attic
For seven years, Wiles worked alone in the attic study of his house in Princeton. He would pursue one approach for months, hit a wall, abandon it, start over. He invented new techniques in Iwasawa theory. He developed a novel approach using Galois representations -- fingerprints of symmetry that encode how equations behave when you shuffle their solutions. He built vast theoretical structures, tore them down, rebuilt.
He told his colleagues he was working on other things. At dinner parties, he deflected. His wife watched him vanish upstairs each evening. His children grew from infancy to school age while their father worked on a problem from 1637.
Cambridge
Wiles gave three lectures at the Isaac Newton Institute in Cambridge. The title was deliberately vague: "Modular Forms, Elliptic Curves, and Galois Representations." By the second lecture, word had spread. By the third, the room was packed. Mathematicians who couldn't find seats stood in the hallway. Someone smuggled in a camera.
At the end of the third lecture, Wiles wrote the conclusion of the proof on the blackboard. Then he turned to the audience.
The room erupted. Cameras flashed. It made the front page of the New York Times.
The Gap
During peer review, a gap appeared. Not a cosmetic flaw -- a fundamental problem in the Kolyvagin-Flach method at the heart of the proof's Euler system construction. The flaw was not in the architecture. It was in the mortar between two stones.
Wiles retreated to try to fix it. Weeks became months. Rumors of failure spread through the mathematical community. Newspapers that had celebrated the proof now speculated on its collapse.
Richard Taylor, a former student of Wiles, flew to Princeton to help. They worked together through the winter and spring of 1994. Nothing worked.
It was the worst year of Wiles' professional life. He later said he was ready to give up.
The Morning
On the morning of September 19, Wiles sat down to look at the gap one final time -- to understand, clearly, why his approach had failed, so he could explain the failure to the community and move on. He stared at the obstruction in his Kolyvagin-Flach construction. And then he saw it.
The very thing that made Kolyvagin-Flach fail was precisely the condition needed to make his earlier, abandoned Iwasawa theory approach succeed. The insight was not a new technique. It was a recognition: the wall was the door. The reason one path was blocked was the proof that another path was clear.
The corrected proof was published in May 1995, in two papers totaling 129 pages: one by Wiles alone, one with Taylor. Three hundred and fifty-eight years after Fermat scribbled in his margin.
What does it mean to prove something? Not in the formal sense -- in the human sense.
A proof is not a destination. It is the record of a journey that many people took, most of them unsuccessfully, over a span of time longer than any single life. Euler failed and invented new mathematics. Germain was denied the profession and practiced it anyway. Kummer failed and invented more new mathematics. Taniyama asked the right question and did not live to see it answered. Shimura waited decades. Wiles spent seven years in an attic, then one year in despair, then one morning saw the answer.
The proof is 129 pages. But the real proof is the chain -- the human chain of obsession and failure and stubbornness that stretches from a margin in Toulouse to an attic in Princeton. Every mathematician who tried and failed left something behind. The mountain was built from their failures.
Fermat almost certainly did not have a proof. The mathematics required to prove his conjecture would not exist for another three centuries -- it had to be invented, piece by piece, by the people who failed. The margin note was not a solution. It was an invitation. And the proof, when it finally came, did not look anything like what Fermat could have imagined. It came through elliptic curves and modular forms, through fingerprints of symmetry and bridges between worlds that no one in 1637 could have dreamed existed.
The question is not whether Fermat knew something we don't. The question is what we learned by spending 358 years trying to find out.
The story did not end in 1995. Beginning in 2024, a team of roughly forty mathematicians at Imperial College London, led by Kevin Buzzard, began formalizing Fermat's Last Theorem in Lean 4 — a proof assistant where every logical step is checked by machine. Their goal: translate Wiles' 129 pages into code that a computer can verify, line by line, with no possibility of a hidden gap. The project, built on the Mathlib library of formalized mathematics, is the largest collaborative formalization of a major theorem ever attempted.
It is also an act of faith in the same chain: that mathematics is not owned by any one mind, that a proof can be understood well enough to be taught to a machine, that the bridge Taniyama imagined and Wiles built can be made permanent.
And there is a postscript. Wiles proved the equation has no solutions in the integers — in one dimension, where multiplication commutes. Remove commutativity, and the theorem breaks. For every odd power, in every dimension above three. The implicit assumption was the answer all along.