On this page
Fermat's last theorem is easy to state and took about 350 years to prove. The person who proved it, Andrew Wiles, first read about it as a ten-year-old in a public library. His story is famous, but the useful part for a student is not the drama. It is how the proof is built: a chain of "if this, then that" steps, each proved by a different person. This post explains that chain in school-level language, works through the case Fermat's equation does allow, and ends with what you can borrow from how Wiles worked.
What does Fermat's last theorem say?
The Abel Prize citation for Wiles states it simply: the equation x^n + y^n = z^n has no solutions in positive integers when n is greater than 2. Pierre de Fermat wrote the claim in the 17th century. The citation notes that Fermat himself proved the case n = 4, Leonhard Euler proved n = 3, and Sophie Germain proved the first general result covering infinitely many prime exponents. Our post on Pierre de Fermat covers the man behind the margin note.
A worked example: why n = 2 is different
For n = 2 the equation is Pythagoras, and it has infinitely many whole-number solutions. A standard way to produce them: pick whole numbers m > k > 0 and set
x = m² − k²
y = 2mk
z = m² + k²
Check that it works: (m² − k²)² + (2mk)² = m⁴ − 2m²k² + k⁴ + 4m²k² = m⁴ + 2m²k² + k⁴ = (m² + k²)².
m = 2, k = 1 gives 3, 4, 5, and 9 + 16 = 25.
m = 3, k = 2 gives 5, 12, 13, and 25 + 144 = 169.
m = 4, k = 1 gives 15, 8, 17, and 225 + 64 = 289.
For cubes no such recipe exists, and no amount of checking examples can prove that. A computer can test billions of triples and find nothing, but a proof must cover every number. That is why the problem needed new mathematics.
How does the proof actually work?
The full proof uses ideas far beyond school, but its logic is something you can follow. The Abel Prize citation sets it out in four steps.
The modularity conjecture. In the 1950s and 1960s Goro Shimura, Yutaka Taniyama and André Weil proposed that every elliptic curve over the rational numbers is modular: it can be matched with a highly symmetric object called a modular form.
Frey's curve. In 1984 Gerhard Frey showed how to build a semistable elliptic curve from any supposed solution to Fermat's equation, and suspected this curve could not be modular.
Ribet's theorem. In 1986 Kenneth Ribet proved Frey was right: such a curve would not be modular.
Wiles's theorem. Wiles proved that every semistable elliptic curve is modular.
Now put the steps together. If Fermat's equation had a solution, Frey's curve would exist and, by Ribet, would not be modular. But by Wiles, it must be modular. Both cannot be true, so no solution exists. This is proof by contradiction, the same method you use to show that √2 is irrational.
How long did it take, and what went wrong?
The Abel Prize biography of Wiles gives the story. He studied at Merton College, Oxford, and took his PhD at Cambridge in 1980 under John Coates, working on elliptic curves. He became a professor at Princeton in 1982. When Ribet's 1986 result connected Fermat to elliptic curves and modular forms, the two areas Wiles knew most deeply, he decided to return to his childhood problem. The biography quotes him: "The challenge proved irresistible."
He worked alone and in secret for about seven years, then presented the proof at the end of a lecture series in Cambridge. Later that year a referee found an error. Wiles asked his former student Richard Taylor to help, and after a year's work found a way to fix it. The corrected proof appeared in 1995 as Modular elliptic curves and Fermat's Last Theorem in the Annals of Mathematics, alongside a companion paper by Taylor and Wiles.
He received the Abel Prize in 2016, and the citation says his methods opened a new era in number theory. Later mathematicians used them to prove the full modularity conjecture in 2001.
What can a student take from Wiles's way of working?
Build on what you know well. Wiles could attack Fermat because he already knew elliptic curves and modular forms deeply. Strong basics in one chapter often open up a hard problem in another.
Break a big problem into links. Frey, Ribet and Wiles each proved one link. In a long JEE problem, write the chain of steps before computing.
Treat an error as information. Wiles's first proof had a gap. He went back, found what was missing and repaired it. When you get a question wrong, find the exact step that failed rather than starting again blindly.
Stay with one problem. The biography describes years of focused work. Practise staying with a single hard problem for 30 minutes before checking the solution.
When you are stuck on which step comes next, the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than printing an answer.
Try this today: use the recipe above to find a Pythagorean triple with z between 30 and 40, then check it by squaring.



