Mathwords logoMathwords

Fermat's Last Theorem — Definition, Formula & Examples

Fermat's Last Theorem states that there are no three positive integers aa, bb, and cc that satisfy the equation an+bn=cna^n + b^n = c^n when nn is an integer greater than 2. It was conjectured by Pierre de Fermat in 1637 and finally proved by Andrew Wiles in 1995.

For any integer n>2n > 2, the Diophantine equation an+bn=cna^n + b^n = c^n has no solutions in positive integers aa, bb, cc. Equivalently, the only integer solutions to xn+yn=znx^n + y^n = z^n for n3n \geq 3 are trivial ones where at least one variable equals zero.

Key Formula

an+bn=cnhas no solutions in positive integers for n>2a^n + b^n = c^n \quad \text{has no solutions in positive integers for } n > 2
Where:
  • a,b,ca, b, c = Positive integers
  • nn = An integer greater than 2

How It Works

When n=2n = 2, the equation a2+b2=c2a^2 + b^2 = c^2 has infinitely many positive integer solutions called Pythagorean triples, such as (3,4,5)(3, 4, 5) and (5,12,13)(5, 12, 13). Fermat's Last Theorem says that as soon as you raise the exponent above 2, solutions completely vanish. Fermat wrote in the margin of a book that he had a "truly marvelous proof" that the margin was too small to contain. Mathematicians searched for a proof for over 350 years. Andrew Wiles finally proved the theorem using deep connections between elliptic curves and modular forms, areas far beyond what Fermat could have known.

Worked Example

Problem: Verify that the Pythagorean triple (3, 4, 5) works for n = 2, then check whether it works for n = 3.
Check n = 2: Compute each side of the equation with the exponent 2.
32+42=9+16=25=523^2 + 4^2 = 9 + 16 = 25 = 5^2 \quad \checkmark
Check n = 3: Now try the same integers with the exponent 3.
33+43=27+64=913^3 + 4^3 = 27 + 64 = 91
Compare: Is 91 a perfect cube? Since 43=644^3 = 64 and 53=1255^3 = 125, the value 91 falls between two consecutive cubes, so no integer cc satisfies the equation.
91c3 for any positive integer c91 \neq c^3 \text{ for any positive integer } c
Answer: The triple (3, 4, 5) satisfies the equation for n=2n = 2 but not for n=3n = 3. Fermat's Last Theorem guarantees no positive integer triple will ever work for n=3n = 3 (or any n>2n > 2).

Why It Matters

Fermat's Last Theorem drove centuries of progress in number theory. The techniques Wiles used to prove it—connecting elliptic curves with modular forms—opened entirely new fields of mathematical research. If you study number theory or abstract algebra in college, you will encounter the ideas that grew from this single problem.

Common Mistakes

Mistake: Thinking the theorem says a^n + b^n = c^n has no integer solutions at all for n > 2.
Correction: Trivial solutions with zero (like 0^3 + 5^3 = 5^3) do exist. The theorem specifically excludes them by requiring a, b, and c to all be positive integers.