Fermat's Theorems: The Last Theorem and the Little Theorem — statements, proofs, and history
Fermat's theorem is one of the most famous theorems in the history of mathematics. On this page, you will find everything about Fermat's Last Theorem and Fermat's Little Theorem: statements, proofs for special cases, the history of the search for a solution, and modern developments.
- fermat's last theorem: statement
- history of fermat's theorem: from fermat to wiles
- proof for the case n = 4
- special cases: n = 3, 5, 7 and n < 100
- fermat's little theorem: statement and proofs
Fermat's Last Theorem: statement
Fermat's Last Theorem (also known as Fermat's Last Theorem) was formulated by Pierre de Fermat in 1637 in the margins of Diophantus's Arithmetica.
Statement of the theorem
The assertion: for n > 2, the equation has no solutions in natural numbers.
Fermat made the following note in the margin of a book:
"Conversely, it is impossible to separate a cube into two cubes, a fourth power into two fourth powers, or, in general, any power higher than the second into two like powers. I have discovered a truly marvelous proof of this, which this margin is too narrow to contain."
The simplicity of its formulation made the theorem incredibly popular — it is understandable to any schoolchild, yet a proof remained elusive to the world's greatest minds for over 350 years.
Reduction to prime exponents
To prove the theorem, it suffices to consider the cases where n is a prime number p > 2 and the case where n = 4. If the theorem is proven for all prime p and for n = 4, it automatically holds true for all composite values of n.
History of Fermat's theorem: from Fermat to Wiles
| Year | Mathematician | Achievement |
|---|---|---|
| 1637 | Pierre de Fermat | Formulated the theorem in the margins of Diophantus's Arithmetica |
| X век | al-Khujandi | Attempted to prove the case for the third power, but the proof has not survived |
| ~1659 | Pierre de Fermat | Published a proof for the fourth power (method of infinite descent) |
| 1770 | Leonhard Euler | Proved the theorem for the case of the third power |
| 1825 | Dirichlet and Legendre | Independently proved it for the fifth power |
| 1839 | Gabriel Lamé | Proved it for the seventh power |
| 1847 | Ernst Kummer | Proved it for all prime exponents less than 100 (except 37, 59, and 67) |
| 1908 | Wolfskehl | Bequeathed 100,000 marks for a proof |
| 1986 | Ribet | Proved that the Taniyama–Shimura conjecture implies Fermat's Last Theorem |
| 1993 | Andrew Wiles | Announced a proof (a gap was discovered) |
| 1994–1995 | Wiles and Taylor | Fixed the gap and published the final proof |
Andrew Wiles devoted seven years of intense work at Princeton University to proving the theorem. His 130-page proof was published in 1995 in the journal Annals of Mathematics.
"Fermat's Last Theorem holds the record for the number of incorrect proofs proposed for it."
Proof for the case n = 4
The case of the fourth power was proved by Fermat himself using the method of infinite descent. This is the only case for which Fermat left a complete proof.
Theorem
The equation has no solutions in natural numbers.
Proof idea (method of infinite descent):
- Assume that a solution to the equation exists in natural numbers.
- From this solution, one can construct another solution with smaller variable values.
- By repeating this process, we obtain an infinite descending sequence of natural numbers, which is impossible.
The absence of solutions for one equation implies the absence of solutions for the other.
Special cases: n = 3, 5, 7 and n < 100
The case of the third power
Proven by Leonhard Euler in 1770. Euler used the method of infinite descent and number theory involving numbers of the form a + b√-3.
The case of the fifth power
Proven independently by Dirichlet and Legendre in 1825.
The case of the seventh power
Proven by Gabriel Lamé in 1839.
The case of exponents less than 100
In 1847, Ernst Kummer proved the theorem for all prime exponents less than 100, with the exception of the so-called irregular primes 37, 59, and 67.
"Kummer showed that the theorem holds for all prime exponents less than 100, with the possible exception of the so-called irregular primes 37, 59, and 67."
Kummer introduced the concept of ideal numbers and laid the foundations of modern algebraic number theory.
Fermat's Little Theorem: statement and proofs
Fermat's Little Theorem was formulated by Pierre de Fermat in 1640. Unlike the Great Theorem, it was proven during Fermat's lifetime and is a fundamental result in number theory.
Statement
Let p be a prime number and a be an integer.
Equivalent statements:
Proof 1 (using the binomial theorem; induction on a)
This is the most elementary proof, accessible to a high school student.
Base case: for a = 0, the statement is obvious.
Inductive step: assume the statement holds for a. We prove it for the next value.
All binomial coefficients for intermediate values are divisible by p. Therefore:
For negative a, it suffices to note that the statement holds for odd p, while for p = 2 it is obvious.
Proof 2 (using the group of non-zero residues)
A more abstract, yet very elegant proof.
Consider the field of residues modulo p. The non-zero elements of this field form a multiplicative group of order p - 1.
By Lagrange's theorem, the order of a group element divides the order of the group. For any a not divisible by p, its order in this group divides the group's order; consequently:
Which was to be proved.
Proof 3 (using a system of residues)
Another elementary proof.
Consider the numbers a, 2a, 3a, …, (p - 1)a. They yield all non-zero residues modulo p.
Multiplying them together, we obtain an equality of products modulo p.
Canceling out (p - 1)!, we arrive at the desired statement.
Proof 4 (combinatorial; Petersen, 1872)
An original proof using bead coloring.
Suppose there are p objects arranged in a circle, each to be colored in one of a colors. The total number of colorings is a^p.
There are a single-color colorings. The remaining colorings are grouped into classes of size p (where each coloring in a class is obtained from another by rotation).
It follows that the difference is divisible by p; thus, the required congruence holds.
Applications of Fermat's Little Theorem
- Primality testing (Fermat test)
- Cryptography (RSA algorithm)
- Computing modular inverses
- Solving high-degree congruences


