Fermat's Last Theorem is published by General Action, the company that makes Emdash. When we recommend Emdash, we are recommending our own product. About this site
The statement and small cases
Fermat’s Last Theorem states that if n is an integer greater than 2, the equation xn + yn = zn has no solutions in positive integers x, y and z. Long before the full proof, mathematicians settled it for particular exponents: 4 by Fermat, 3 by Euler, 5 and 7 in the early 19th century, and then, in one stroke, all “regular” primes by Kummer.
The precise statement
Section titled “The precise statement”There are a few equivalent ways to say it.
- Positive integers. For n ≥ 3 there are no positive integers x, y, z with xn + yn = zn.
- All integers. For n ≥ 3, any integers satisfying xn + yn = zn have xyz = 0. This is the form used by Darmon, Diamond and Taylor in their account of the proof. Solutions such as 0n + 1n = 1n exist and are called trivial.
- Rational points. The curve Xn + Yn = 1 has no points with both coordinates rational and non-zero. Divide the original equation by zn to see why.
It is harmless to assume x, y and z share no common factor. If a prime divides two of them it divides the third, and it can be divided out of all three. Such a solution is called primitive.
Why exponent 4 and odd primes suffice
Section titled “Why exponent 4 and odd primes suffice”Suppose n = pk and xn + yn = zn. Then
(xk)p + (yk)p = (zk)p,
so xk, yk, zk is a solution for the exponent p. Turned around: if exponent p has no solutions, no multiple of p has any.
Every integer n ≥ 3 is divisible either by an odd prime or by 4. (If no odd prime divides n, then n is a power of 2, and being at least 3 it is a multiple of 4.) So the theorem for all n follows from two things: the case n = 4, and the case n = p for every odd prime p.
Fermat’s proof for n = 4
Section titled “Fermat’s proof for n = 4”The exponent 4 is the only case for which Fermat left a proof. He proved more than he needed:
Claim. There are no positive integers x, y, z with x4 + y4 = z2.
Since z4 = (z2)2, any solution of x4 + y4 = z4 would give one of this equation, so the claim settles n = 4.
The method is infinite descent: from any solution, build a smaller one. Positive integers cannot decrease for ever, so there was no solution to begin with.
One fact about n = 2 is needed. If a2 + b2 = c2 with a, b, c positive and sharing no common factor, then one of a and b is even. Say it is b. Then there are coprime positive integers m and k, one even and one odd, with
a = m2 − k2, b = 2mk, c = m2 + k2.
Here is the descent, in outline.
- Start from the smallest solution. Take a solution of x4 + y4 = z2 with z as small as possible. Then x and y have no common prime factor p, or else (x/p, y/p, z/p2) would be a smaller solution.
- Read it as a Pythagorean triple. (x2)2 + (y2)2 = z2. Taking y to be the even one, the fact above gives coprime m and k with x2 = m2 − k2, y2 = 2mk and z = m2 + k2.
- Find a second triple inside the first. The first equation says x2 + k2 = m2. Since x is odd, k is the even one, and the fact applies again: there are coprime r and s with k = 2rs and m = r2 + s2.
- Spot three squares. Substituting, y2 = 2mk = 4rs(r2 + s2), so (y/2)2 = rs(r2 + s2). The three factors r, s and r2 + s2 are pairwise coprime, and their product is a square. So each one is a square: r = u2, s = v2, r2 + s2 = w2.
- Descend. That last equation reads u4 + v4 = w2: a new solution of the original equation. And w is at most w2 = m, which is less than m2 + k2 = z. This contradicts the choice of z as the smallest.
Fermat phrased his own version as a statement about triangles: the area of a right triangle with whole-number sides is never a perfect square. The MacTutor archive’s history gives the proof in that form, and the case n = 4 follows from it.
Euler and n = 3
Section titled “Euler and n = 3”On August 4, 1753, Leonhard Euler wrote to Christian Goldbach that he had a proof for cubes. The version he published in his Algebra of 1770 has a gap. Euler worked with numbers of the form a + b√−3 and assumed they behave like ordinary integers when factorised, which needs justification he did not give. MacTutor notes that the gap can be filled from results Euler proved elsewhere, so the credit is generally left with him.
The exponent 3 already shows why the problem is hard: the proof for 4 does not adapt, and new kinds of number have to be brought in.
Sophie Germain’s theorem
Section titled “Sophie Germain’s theorem”Around 1820 Sophie Germain proved the first result that covered many exponents at once. She had set out her plan in a letter to Gauss dated May 12, 1819.
Theorem (Germain). Let p be an odd prime such that 2p + 1 is also prime. If xp + yp = zp, then p divides at least one of x, y, z.
For example p = 5 qualifies, because 11 is prime. So does p = 11, because 23 is prime. Primes with this property are now called Sophie Germain primes.
The theorem split the problem in two, a division that lasted until the end:
- the first case, where p divides none of x, y, z;
- the second case, where p divides exactly one of them.
Germain’s theorem disposes of the first case for her primes. With extensions of her idea to primes such as 4p + 1 and 8p + 1, the first case was settled for every prime exponent below 100.
The exponents 5, 7 and 14
Section titled “The exponents 5, 7 and 14”| Exponent | Who | When |
|---|---|---|
| 4 | Pierre de Fermat | 17th century |
| 3 | Leonhard Euler | Announced 1753, published 1770 |
| 5 | Peter Gustav Lejeune Dirichlet and Adrien-Marie Legendre | 1825 |
| 14 | Dirichlet | 1832 |
| 7 | Gabriel Lamé | 1839 |
For n = 5, Dirichlet presented part of the second case to the Paris Academy in July 1825, and Legendre supplied the rest that September. Lamé’s proof for 7 was more intricate still. Darmon, Diamond and Taylor remark that it “suggested that to go further, new theoretical insights would be needed”.
Kummer and the regular primes
Section titled “Kummer and the regular primes”The natural general approach is to factorise. Let ζ be a complex p-th root of unity other than 1. Then
xp + yp = (x + y)(x + ζy)(x + ζ2y) ⋯ (x + ζp−1y).
If the right-hand side equals zp, and the factors have essentially nothing in common, it is tempting to conclude that each factor is itself a p-th power. With ordinary integers that step is valid, because integers factor into primes in exactly one way.
On March 1, 1847, Gabriel Lamé told the Paris Academy he had proved the theorem along these lines. Joseph Liouville objected at once that unique factorisation had been assumed for the new numbers. On May 24, Liouville read out a letter from Ernst Kummer, who had shown three years earlier that unique factorisation fails for these numbers in general. It holds only for primes p below 23.
Kummer had also found the repair. His “ideal numbers” restore a form of unique factorisation, and the amount by which it fails is measured by an integer called the class number. He defined a prime p to be regular if p does not divide the class number of the numbers built from ζ, and proved:
Theorem (Kummer, 1847). Fermat’s Last Theorem holds for every regular prime exponent.
He also gave a test that needs no knowledge of class numbers: p is regular exactly when it does not divide the numerator of any of the Bernoulli numbers B2, B4, …, Bp−3. The prime 37 fails, because it divides the numerator of B32. Below 100 the only irregular primes are 37, 59 and 67.
Kummer’s theorem therefore covers every prime exponent below 100 except those three. In 1915 Jensen proved that infinitely many primes are irregular, so regular primes could never finish the job. In 1857 the Paris Academy awarded Kummer its Grand Prize, which had been offered for a solution of Fermat’s problem, although he had not entered.
Kummer’s theorem for regular primes has since been verified by computer. A team of six formalized it in Lean, in a paper published in 2025.
Where the small cases lead
Section titled “Where the small cases lead”By 1993, methods descended from Kummer’s, run on computers, had confirmed the theorem for every exponent up to 4,000,000. None of this pointed to a proof for all exponents. That came from a different part of mathematics, described in How Wiles proved it. For the people and dates, see the history of Fermat’s Last Theorem.
Frequently asked questions
What is the precise statement of Fermat's Last Theorem?
If n is an integer greater than 2, there are no positive integers x, y and z with xⁿ + yⁿ = zⁿ. An equivalent form allows any integers and says that every integer solution has x, y or z equal to zero.
Why is it enough to prove the theorem for 4 and for odd primes?
Every integer greater than 2 is divisible by 4 or by an odd prime. If n = pk, a solution for exponent n is also a solution for exponent p, because xⁿ is the p-th power of x to the k. So a proof for exponent 4 and for every odd prime covers all exponents.
What is infinite descent?
Infinite descent is a proof method Fermat introduced. You assume a solution in positive integers exists and show how to build a strictly smaller one from it. Repeating the step would give an endless decreasing chain of positive integers, which is impossible, so no solution exists.
Which cases did Fermat prove himself?
Only the exponent 4. It is the one case of the theorem for which he wrote down a proof. His argument shows that the area of a right triangle with whole-number sides cannot be a square, and the case n = 4 follows from it.
What is a regular prime?
An odd prime p is regular if it does not divide the class number of the field generated by the p-th roots of unity. Kummer showed this is the same as p not dividing the numerator of any of the Bernoulli numbers B₂, B₄, up to B with index p − 3. The irregular primes below 100 are 37, 59 and 67.