MathLabs

Arithmetic and number theory

Fermat's Last Theorem

No positive integers a, b, c satisfy aⁿ+bⁿ=cⁿ for n>2, proved by Andrew Wiles in 1994.

IntuitionFrom infinitely many Pythagorean triples to a 350-year wall

The equation x2+y2=z2x^2 + y^2 = z^2 has infinitely many positive-integer solutions — 3,4,53,4,5, 5,12,135,12,13, 8,15,178,15,17, and so on forever. So it is startling that the moment the exponent rises by just one, from 22 to 33, every one of those solutions vanishes: nobody has ever found positive integers x,y,zx,y,z with x3+y3=z3x^3+y^3=z^3, and centuries of searching never turned up a single counterexample for any exponent n>2n > 2.

The unit circle $x^2 + y^2 = 1$, whose rational points $\left(\dfrac{1-t^2}{1+t^2},\ \dfrac{2t}{1+t^2}\right)$ under $t = \tan(\theta/2)$ generate exactly the Pythagorean triples solving the n=2 case; the n=2 sibling of the much harder n>2 question about integer points on the Fermat curve.
Rational points on the unit circle, parametrized by t = tan(θ/2), correspond to Pythagorean triples.

SchoolThe special case n = 2: Pythagorean triples

Definition: Pythagorean triple

A Pythagorean triple is a set of positive integers x,y,zx,y,z satisfying x2+y2=z2x^2 + y^2 = z^2; it is primitive if gcd⁡(x,y,z)=1\gcd(x,y,z)=1.

x2+y2=z2x^2 + y^2 = z^2

Euclid already knew how to generate every primitive triple: choose coprime integers m>n>0m > n > 0 of opposite parity, and set

x=m2−n2,y=2mn,z=m2+n2x = m^2 - n^2,\quad y = 2mn,\quad z = m^2 + n^2

Since there are infinitely many valid choices of m,nm,n, there are infinitely many Pythagorean triples — a complete answer for n=2n=2. Fermat's Last Theorem claims that for every larger exponent, no such construction, or any other source of solutions, can exist at all.

UndergraduateTwo theorems: the elementary case and the full theorem

There are no positive integers x,y,zx,y,z with x4+y4=z2x^4 + y^4 = z^2; consequently none with x4+y4=z4x^4 + y^4 = z^4 either.

Why is it true?

This is the one case Fermat himself wrote a proof for, found among his papers after his death. The method — infinite descent — builds, from any hypothetical solution, a strictly smaller one, impossible for positive integers; it is the ancestor of well-founded induction used throughout modern mathematics and computer science.

Proof

Suppose a solution in positive integers to x4+y4=z2x^4+y^4=z^2 exists; choose one with zz minimal. If d=gcd⁡(x,y)>1d=\gcd(x,y)>1, then d2∣zd^2\mid z and (x/d)4+(y/d)4=(z/d2)2(x/d)^4+(y/d)^4=(z/d^2)^2 is smaller — contradiction. So gcd⁡(x,y)=1\gcd(x,y)=1, (x2,y2,z)(x^2,y^2,z) is a primitive Pythagorean triple; say xx is odd. By Euclid's parametrization, coprime m>n>0m>n>0 of opposite parity give x2=m2−n2x^2=m^2-n^2, y2=2mny^2=2mn, z=m2+n2z=m^2+n^2.

From x2+n2=m2x^2+n^2=m^2, the triple (x,n,m)(x,n,m) is itself primitive, so coprime a>b>0a>b>0 give x=a2−b2x=a^2-b^2, n=2abn=2ab, m=a2+b2m=a^2+b^2. Then y2=4maby^2=4mab, so (y/2)2=mab(y/2)^2=mab with m,a,bm,a,b pairwise coprime and product a perfect square, forcing each to be a square: m=z12m=z_1^2, a=x12a=x_1^2, b=y12b=y_1^2.

Substituting into m=a2+b2m=a^2+b^2 gives z12=x14+y14z_1^2=x_1^4+y_1^4 — a new solution of the same equation, with z1≤z12=m<m2+n2=zz_1\le z_1^2=m<m^2+n^2=z: strictly smaller, contradicting minimality. No solution exists. For x4+y4=z4x^4+y^4=z^4, setting Z=z2Z=z^2 would give a solution of x4+y4=Z2x^4+y^4=Z^2, just ruled out.

For every integer n>2n > 2, there are no positive integers x,y,zx,y,z satisfying xn+yn=znx^n + y^n = z^n.

Why is it true?

A simple algebraic trick reduces the infinitely many exponents to two families — exponent 4 and odd prime exponents — but even so, three centuries of the sharpest elementary techniques conquered only a handful of primes at a time; the theorem was finally settled only by importing entirely new machinery from elliptic curves.

Proof

Every integer n>2n>2 is divisible by an odd prime p≥3p\ge3 (write n=pkn=pk) or is a power of 2 with n≥4n\ge4, hence divisible by 4 (n=4kn=4k). A solution of xn+yn=znx^n+y^n=z^n would give, with X=xk,Y=yk,Z=zkX=x^k,Y=y^k,Z=z^k, a solution of Xp+Yp=ZpX^p+Y^p=Z^p or X4+Y4=Z4X^4+Y^4=Z^4. So FLT for all n>2n>2 follows from the cases n=4n=4 (proved above) and every odd prime p≥3p\ge3.

Euler (1770) extended Fermat's descent to prove p=3p=3 elementarily. Over the following century, Germain, Legendre and Kummer proved larger and larger classes of primes — Kummer's 1850s work settled every "regular" prime — but no single descent handled every prime, and large primes resisted every attempt for another 140 years.

The case p≥5p \ge 5 was settled in 1994-95 by Andrew Wiles with Richard Taylor, using ideas outside elementary number theory. Given a hypothetical ap+bp=cpa^p+b^p=c^p, Gerhard Frey (1984) associated the elliptic curve y2=x(x−ap)(x+bp)y^2 = x(x-a^p)(x+b^p); Kenneth Ribet (1990) proved this curve, if it existed, could not be modular. Wiles then proved every semistable elliptic curve over the rationals is modular, so the Frey curve cannot exist, and no such a,b,ca,b,c exist. This full argument — Galois representations, deformation rings, modular forms — is reconstructed step by step in the companion proof "Wiles's modularity proof via the Taylor-Wiles method (1994)" filed under the great problem Fermat's Last Theorem in this library; it needs machinery introduced only later in the curriculum, so it is not repeated here.

UndergraduateReal-World Applications and Worked Examples

The theorem itself has no engineering formula, but its two halves reach into practice from opposite directions. The n=2 case — Euclid's parametrization — is the oldest applied Diophantine equation in existence, used by builders to lay out right angles. The machinery built to prove the general theorem — elliptic curves — is today the backbone of elliptic-curve cryptography (ECC) securing web traffic and cryptocurrency signatures; and the descent method above is the direct ancestor of the well-founded induction used to prove algorithms terminate.

Example: Framing a right angle without a protractor

A construction crew wants an exact right angle for a foundation using only a tape measure. Using x=m2−n2,y=2mn,z=m2+n2x = m^2 - n^2,\quad y = 2mn,\quad z = m^2 + n^2 with m=6m=6, n=1n=1, generate a triple and confirm it gives a right angle.

Solution

With m=6,n=1m=6,n=1: x=35x=35, y=12y=12, z=37z=37. Check: 352+122=1225+144=1369=37235^2+12^2=1225+144=1369=37^2, so by the converse of the Pythagorean theorem the triangle with sides 35,12,3735,12,37 has an exact right angle between the sides 3535 and 1212.

This is exactly why carpenters and surveyors have used small members of this family — 3,4,53,4,5; 5,12,135,12,13; 35,12,3735,12,37 — for millennia: a knotted rope or tape measure marked at those lengths gives a perfectly square corner without any angle-measuring tool.

Example: A computational sanity check before 1994

Before Wiles's proof, mathematicians searched for counterexamples. Check whether x5+y5x^5+y^5 is ever a perfect fifth power for small x≤y≤3x\le y\le 3.

Solution

Compute 15=11^5=1, 25=322^5=32, 35=2433^5=243. Then 15+25=331^5+2^5=33, 15+35=2441^5+3^5=244, 25+35=2752^5+3^5=275; none equals 1,32,2431,32,243 or the next fifth power 45=10244^5=1024, so no counterexample appears here.

Historically this search was pushed to enormous x,y,nx,y,n by computer without ever finding a counterexample — evidence for the conjecture, never proof of it, since the search space grows in two directions (larger exponents and bases) and a finite computation can never rule out some untested combination; that is exactly why a genuine proof, covering every n>2n>2 at once, was necessary.

For which exponents does xn+yn=znx^n + y^n = z^n have infinitely many positive-integer solutions?

Using x=m2−n2,y=2mn,z=m2+n2x = m^2 - n^2,\quad y = 2mn,\quad z = m^2 + n^2 with m=5, n=2m=5,\ n=2, what is z?

Who completed the proof of Fermat's Last Theorem, and when?

The elliptic curves central to Wiles's proof strategy are, today, most widely used in industry for:

References

  1. Andrew Wiles (1995). Modular elliptic curves and Fermat's Last Theorem · DOI:10.2307/2118559
  2. Kenneth A. Ribet (1990). On modular representations of Gal(Q-bar/Q) arising from modular forms · DOI:10.1007/BF01234424
  3. Gary Cornell, Joseph H. Silverman, Glenn Stevens (eds.) (1997). Modular Forms and Fermat's Last Theorem · DOI:10.1007/978-1-4612-1974-3