Fact-checked by Grok 2 weeks ago

Fermat's theorem

Several theorems and principles in mathematics are named after the French mathematician (1607–1665), who made foundational contributions to , , probability, and . "Fermat's theorem" is an ambiguous term that can refer to any of these results, with the most famous being . This article provides an overview of Fermat's key ideas and discusses the following: In number theory: In calculus:
  • Interior Extremum Theorem
In optics:
  • Fermat's Principle
Detailed historical context and proofs are covered in subsequent sections.

Historical Context

Pierre de Fermat's Contributions

Pierre de Fermat was born in 1607 in Beaumont-de-Lomagne, France, and died on January 12, 1665, in Castres. He pursued a career as a lawyer and government official, qualifying in 1631 and serving as a councillor at the Parlement of Toulouse, where he rose through the ranks with promotions in 1638 and 1652, while pursuing mathematics as an amateur passion alongside his professional duties. Despite his primary occupation in law, Fermat's mathematical pursuits were profound and influential, often conducted through private correspondence rather than formal publications. Fermat engaged in significant exchanges with leading intellectuals of his time, including , , and , which shaped early developments in several fields. His 1654 letters with laid the foundations of , addressing problems like the division of stakes in interrupted games. With , he debated methods in and , contributing independently to through techniques for finding tangents and extrema of curves. Correspondence with , starting in 1636, covered topics such as spirals and optimization problems, fostering the dissemination of his ideas within Europe's mathematical community. A hallmark of Fermat's approach was his method of infinite descent, a proof technique by contradiction that assumes a minimal and derives a smaller one, leading to an . He famously annotated books with theorems stated sans proofs, most notably claiming in the margin of Diophantus's to have a proof too large for the space, sparking centuries of mathematical inquiry. Much of his work remained unpublished during his lifetime, shared instead via letters, which delayed but ultimately amplified his impact. Fermat's unpublished notes and correspondences profoundly influenced , with innovations like results on primes and quadratic forms; precursors to through his adeptness in maxima, minima, and tangents; and via principles governing light paths. His ideas, such as those in exemplified by what became known as , inspired subsequent generations and remain foundational in modern mathematics.

Evolution of Fermat's Ideas

Following Fermat's death in 1665, his son Samuel de Fermat compiled and published a new edition of Claude-Gaspard Bachet's 1621 Latin translation of Diophantus's in 1670, incorporating his father's extensive marginal annotations that revealed many of Fermat's unpublished number-theoretic insights. This posthumous volume disseminated Fermat's ideas widely, including his famous marginal note on the "last theorem," which stemmed from his habit of asserting results in correspondence or notes without providing proofs. Gottfried Wilhelm Leibniz engaged with Fermat's in the late 17th century, developing an unpublished proof of using the around 1676–1683, which helped formalize the result for later mathematicians. Leonhard Euler then advanced this further by publishing the first rigorous proof of the theorem in 1736 in his paper "Theorematum quorundam ad numeros primos spectantium demonstratio I," employing group-theoretic ideas avant la lettre to establish the result for prime moduli. Euler also contributed partial progress on , proving it for exponent 3 via infinite descent in a 1753 letter to and including the argument in his 1770 textbook Vollständige Anleitung zur Algebra, though the proof contained a subtle gap later corrected by others. In the 19th century, mentored Ernst Eduard Kummer, encouraging his work on ; in 1847, Dirichlet reviewed Kummer's initial flawed attempt at a general proof of , prompting Kummer to develop the concept of ideal numbers in 1844–1847 to restore unique factorization in rings of cyclotomic integers. Kummer's ideal numbers enabled proofs of the Last Theorem for all exponents, marking a pivotal advancement in Fermat's by bridging Diophantine equations with . The Académie des Sciences announced a competition in 1850 offering 3,000 francs for a general proof of , with serving on the judging committee alongside ; no complete solution emerged, but Liouville's earlier 1847 critique of Gabriel Lamé's flawed proof attempt highlighted issues in complex domains, influencing the field's direction despite the prize remaining unawarded for a full resolution.

Number Theory Theorems

Fermat's Little Theorem

states that if p is a and a is an not divisible by p, then a^{p-1} \equiv 1 \pmod{p}. An equivalent form is a^p \equiv a \pmod{p}, which holds even if p divides a. This congruence captures a fundamental property of primes in , highlighting the multiplicative order of a modulo p dividing p-1. Pierre de Fermat first stated the theorem in a letter dated October 18, 1640, to Bernard Frénicle de Bessy, claiming a proof without providing details. No record of Fermat's proof survives, and the first published proof appeared nearly a century later from Leonhard Euler in 1736, using an inductive argument. Euler later provided additional proofs, including one in 1750 via the binomial theorem applied to (a + b)^p \equiv a^p + b^p \pmod{p} for prime p, and another in 1761 using precursors to group theory by considering cosets of subgroups in the multiplicative group modulo p. These proofs laid groundwork for modern abstract algebra, with the group-theoretic approach aligning with Lagrange's theorem on subgroup orders dividing the group order. The theorem underpins key applications in . It forms the basis of the , where for an odd integer n > 1, selecting bases a coprime to n and checking if a^{n-1} \equiv 1 \pmod{n} can prove compositeness if the fails, as it must hold for primes. Composites passing the test for certain a are called Fermat pseudoprimes to base a, such as 341 to base 2, and absolute pseudoprimes (Carmichael numbers) like 561 pass for all coprime a, though they are rare and the test remains probabilistically effective. Furthermore, Euler generalized the theorem in 1763 to : if \gcd(a, n) = 1, then a^{\phi(n)} \equiv 1 \pmod{n}, where \phi is , reducing to when n = p is prime since \phi(p) = p-1.

Fermat's Last Theorem

Fermat's Last Theorem asserts that there are no positive integers a, b, and c that satisfy the equation a^n + b^n = c^n for any integer n > 2. This Diophantine equation generalizes the Pythagorean theorem, which holds for n=2, but prohibits solutions in positive integers for higher exponents. The theorem originated from a marginal note by Pierre de Fermat in his copy of Diophantus's Arithmetica around 1637, where he claimed to have discovered a "truly remarkable proof" that the margin was too narrow to contain. Fermat's son published the note after his death in 1665, sparking centuries of mathematical inquiry despite no surviving proof from Fermat himself. Early progress focused on specific exponents: Leonhard Euler provided a proof for n=3 in 1753, though it contained a subtle gap later addressed, using infinite descent in the ring of Eisenstein integers. In 1825, Peter Gustav Lejeune Dirichlet and Adrien-Marie Legendre independently completed the proof for n=5, handling various cases through factorization in cyclotomic fields. In the 19th century, advanced the general case by developing the theory of ideal numbers to restore unique factorization in , proving the theorem for all regular primes (those not dividing the class number of the (p-1)-th ) by 1850. This covered infinitely many exponents but left irregular primes unresolved, motivating deeper studies in . The 20th century saw stalled attempts, such as those involving , until Gerhard Frey's 1986 insight linked hypothetical solutions to semistable elliptic curves of an anomalous form, suggesting they would contradict the Taniyama-Shimura conjecture if non-modular. Andrew Wiles announced a proof in 1993 by establishing the modularity theorem for semistable elliptic curves over the rationals, implying Frey's curves must be modular and thus nonexistent, thereby proving the theorem. An error in the Euler system was identified in 1994, which Wiles and Richard Taylor resolved using a 3-5 switch in the Galois representations, leading to the final publication in 1995. The proof spans over 100 pages and integrates elliptic curves, modular forms, and deformation theory, confirming no solutions exist for n > 2. The theorem's pursuit has profoundly influenced mathematics, driving the creation of through Kummer's ideals and inspiring prize competitions like the 1908 Wolfskehl Prize of 100,000 German marks (equivalent to about $50,000 when claimed by Wiles in 1997). Its resolution not only settled a 358-year-old but also catalyzed advancements in the and modern arithmetic geometry.

Fermat's Theorem on Sums of Two Squares

Fermat's theorem on sums of two squares states that an odd prime p can be expressed as p = x^2 + y^2 for some integers x and y p \equiv 1 \pmod{4}. The even prime 2 is also a sum of two squares, specifically $2 = 1^2 + 1^2. This characterization provides a precise condition for when primes admit such a representation, distinguishing them from primes congruent to 3 modulo 4, which cannot be written in this form. Pierre de Fermat first stated the theorem in a letter to on December 25, 1640, claiming a proof via his method of infinite descent but providing no details. The claim remained unproven until Leonhard Euler established it rigorously in 1749, with the proof appearing in print in his 1773 paper "Demonstratio theorematis Fermatiani de numeris primis formae $4n + 1 in summam duorum quadratorum resolubilibus." Euler's approach relies on infinite descent, showing that if a prime p \equiv 1 \pmod{4} divides a sum of two squares, then it must itself be such a sum, leading to a unless the representation is primitive. A sketch of Euler's proof begins by assuming p \equiv 1 \pmod{4} divides some m^2 + n^2 where m and n are integers not both divisible by p. Using properties of sums of squares and , one constructs smaller positive integers a, b such that p divides a^2 + b^2, with a^2 + b^2 < p. Repeating this process yields an infinite descending sequence of positive integers bounded below by 1, which is impossible, implying p itself must be a sum of two squares. The "if" direction follows from the fact that squares modulo 4 are 0 or 1, so their sum cannot be 3 modulo 4. In modern terms, the theorem finds a natural interpretation in the ring of \mathbb{Z} = \{ a + bi \mid a, b \in \mathbb{Z} \}, where the norm N(\alpha) = a^2 + b^2 is multiplicative. Primes p \equiv 3 \pmod{4} remain prime in \mathbb{Z}, while those with p \equiv 1 \pmod{4} factor as p = (a + bi)(a - bi) with norm p, ensuring unique factorization up to units implies such a representation. This perspective, developed later by , underscores the theorem's role in . The theorem extends to all positive integers: a number n can be written as a sum of two squares if and only if every prime congruent to 3 modulo 4 in its prime factorization has even exponent, with the prime 2 and primes congruent to 1 modulo 4 appearing to any power. This follows from the multiplicativity of the norm in and the identity (x^2 + y^2)(u^2 + v^2) = (xu - yv)^2 + (xv + yu)^2, allowing products of such representations. The result has applications to , as the condition p \equiv 1 \pmod{4} is equivalent to -1 being a quadratic residue modulo p, a key case in .

Fermat's Right Triangle Theorem

Fermat's right triangle theorem asserts that no right-angled triangle with rational side lengths can have an area that is a perfect square of a rational number. This non-existence result was proved by Pierre de Fermat using the method of infinite descent and was published posthumously in 1670 as part of his collected works. The theorem implies, in particular, that 1 is not a congruent number, meaning there exists no right triangle with rational sides and area equal to 1. Fermat's proof proceeds by assuming the existence of such a triangle with integer sides (after clearing denominators) and integer square area, then deriving a contradiction via infinite descent. Specifically, the proof leverages the parametrization of primitive Pythagorean triples, which generate the integer sides a = m^2 - n^2, b = 2mn, c = m^2 + n^2 for coprime integers m > n > 0 of opposite parity. The area \frac{1}{2}ab = mn(m^2 - n^2) is assumed to be a k^2. By analyzing the prime factors and applying descent, Fermat shows that this assumption leads to a smaller positive integer solution of the same form, resulting in an infinite descending sequence of positive integers, which is impossible. This descent on Pythagorean triples or related cubic forms establishes the theorem rigorously within the framework of 17th-century . In modern terms, the theorem is intimately connected to the arithmetic of . The existence of a with area 1 is equivalent to the existence of a non-torsion on the y^2 = x^3 - x, defined over . This Mordell has 32 and complex by i; its group of rational points is precisely the torsion subgroup \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z}, consisting of the three points (-1, 0), (0, 0), and (1, 0). By the Mordell-Weil theorem, the full rational points form a , and here the rank is 0, confirming no infinite-order points and thus no such triangle. Fermat's descent anticipates the 2-descent procedure on , providing an elementary precursor to these advanced tools. The infinite descent technique in Fermat's proof shares methodological similarities with the approach used to establish the case n=3 of , where no non-trivial positive integer solutions exist to x^3 + y^3 = z^3.

Calculus Theorems

Interior Extremum Theorem

The Interior Extremum Theorem, also known as Fermat's theorem on stationary points, asserts that if a function f has a local maximum or minimum at an interior point c in its domain and f is differentiable at c, then the derivative f'(c) = 0. This condition implies that any local extremum of a occurs at a critical point where the is horizontal. Pierre de Fermat introduced this result in his circa 1636-1637 manuscript Methodus ad disquirendam maximam et minimam et de tangentibus linearum curvarum, where he developed a method for locating maxima and minima of algebraic functions using the concept of "adequality" (adaequalitas), a precursor to taking limits. Fermat's approach involved substituting a small increment e into the function, setting up an approximate equality f(a + e) \approx f(a), canceling common terms, dividing by e, and neglecting higher-order terms in e to derive a condition equivalent to the zero derivative at the extremum. This work, communicated through letters to Marin Mersenne and other mathematicians, predated the formal invention of calculus by Isaac Newton and Gottfried Wilhelm Leibniz by several decades and drew criticism from René Descartes, positioning Fermat as a key figure in the early development of infinitesimal methods. In its historical context, Fermat's approach emerged as part of broader efforts in the to find tangents to curves and solve optimization problems geometrically, building on algebraic techniques from ancient sources like while innovating with near-equality arguments. The theorem remained in manuscript form until its publication in Fermat's collected works in the , where it was rigorously formalized within the framework of modern , influencing texts on differential analysis. The theorem serves as the foundational principle for first-derivative tests in optimization, enabling the identification of potential local extrema by solving f'(x) = 0, and underpins applications in analytical optimization problems across mathematics and physics.

Optics Principles

Fermat's Principle

Fermat's principle in states that the path taken by a between two given points is the one that can be traversed in the least time, or more generally, the path for which the time is (a minimum, maximum, or ). This principle is equivalent to light following the path of , defined as the integral of the along the path. Pierre de Fermat first formulated this principle in 1657 in a letter to Marin Cureau de La Chambre, proposing that the law of could be derived from a minimum-time assumption, contrasting with Descartes' earlier instantaneous propagation model. Fermat's idea built on Hero of Alexandria's least-distance principle for but extended it to time minimization, assuming finite light speed in different media. This formulation anticipated variational methods, deriving by optimizing the time for paths crossing a refractive . The principle is rigorously derived using the , where the travel time t for a from point A to B in a medium with n is given by t = \frac{1}{c} \int_A^B n \, ds, with c the in and ds the path element. Stationary paths satisfy the Euler-Lagrange equation from minimizing this functional, leading to n_1 \sin \theta_1 = n_2 \sin \theta_2 at interfaces. For continuous media, the rays follow the |\nabla S| = n, where S is the . In wave optics, Fermat's principle emerges as the stationary-phase approximation to Huygens' principle, where ray paths correspond to directions of constructive from secondary wavelets, ensuring the is extremal along the path. This connection unifies ray and wave descriptions, with Fermat's paths tracing the envelope of Huygens' wavelets in the geometric limit. Modern applications include fiber optics, where meridional and rays in graded-index fibers follow stationary-time trajectories to minimize and signal , and general relativity, where null geodesics in curved obey a Fermat-like principle for propagation in gravitational fields.

References

  1. [1]
    Wilson's Theorem and Fermat's Theorem
    I'll prove Wilson's theorem first, then use it to prove Fermat's theorem. are the only numbers which are their own multiplicative inverses mod p. This proves ...
  2. [2]
    [PDF] A proof of Fermat's little theorem - UT Computer Science
    Sep 5, 2021 · The following theorem, known as Fermat's little theorem, is a fundamental result in number theory. The theorem has many applications.
  3. [3]
    [PDF] introductory group theory and fermat's little theorem - UChicago Math
    Aug 26, 2011 · theory called Fermat's Little Theorem. The theorem was first proposed by. Fermat in 1640, but a proof was not officially published until 1736.Missing: history | Show results with:history
  4. [4]
    Fermat's Little Theorem - The Donald Lab at Duke University
    Fermat's Little Theorem. Pierre de Fermat first stated the theorem in a letter dated October 18, 1640, to his friend and confidant Frénicle de Bessy as the ...Missing: history | Show results with:history
  5. [5]
    [PDF] on fermat's little theorem - UChicago Math
    A new proof of Fermat's Little Theorem is presented. A brief history of this theorem is presented to both provide historical context and to show the new proof ...
  6. [6]
    Fermat's Little Theorem
    Leibniz had a proof but Euler was the first to publish a proof in 1736. Fermat's Little Theorem: Let p be a prime and suppose that a is a positive integer ...Missing: history | Show results with:history
  7. [7]
    [PDF] FERMAT'S LITTLE THEOREM 1. Introduction When we compute ...
    Using Fermat's Little Theorem to Prove Compositeness. A crucial feature of Fermat's little theorem is that it is a property of every integer a 6≡ 0 mod p ...
  8. [8]
    When Was Pierre de Fermat Born?
    Additional research led Barner to conclude that Fermat was born between October 31 and December 6, 1607 (Barner 2007).Missing: reliable | Show results with:reliable
  9. [9]
    Pierre Fermat (1601 - 1665) - Biography - MacTutor
    Pierre de Fermat was a French lawyer and government official most remembered for his work in number theory; in particular for Fermat's Last Theorem. He is also ...Missing: reliable | Show results with:reliable
  10. [10]
  11. [11]
    "Theorematum quorundam ad numeros primos spectantium ...
    Sep 25, 2018 · This paper presents the first proof of the Euler-Fermat theorem, also known as Fermat's Little Theorem, that ap-1 = 1 (mod p) for all a ...Missing: history | Show results with:history
  12. [12]
    Fermat's last theorem - MacTutor History of Mathematics
    Euler wrote to Goldbach on 4 August 1753 claiming he had a proof of Fermat's Theorem when n = 3 n = 3 n=3.Missing: partial 1772
  13. [13]
    Eduard Kummer - Biography
    ### Summary of Dirichlet and Kummer's Role in Advancing Fermat's Number Theory with Ideal Numbers
  14. [14]
    The Background of Kummer's Proof of Fermat's Last Theorem ... - jstor
    significance. A few years later, in 1850, the Paris Academy offered a prize for a proof of. Fermat's Last Theorem. Of course no proof was forthcoming, and ...
  15. [15]
    A History of Prizes in Mathematics
    Fermat's Last Theorem was proposed in 1850, with Cauchy as the chairman of the judges, but no satisfactory answers were received, and the problem was rolled ...
  16. [16]
    [PDF] fermat's test - keith conrad
    Fermat's little theorem says for prime p that ap-1 ≡ 1 mod p for all integers a 6≡ 0 mod p. A naive extension of this to a composite modulus n ≥ 2 is: for all ...
  17. [17]
    [PDF] EULER'S THEOREM 1. Introduction Fermat's little ... - Keith Conrad
    It is the relative primality point of view on the right that lets Fermat's little theorem be extended to a general modulus, as Euler discovered. Theorem 1.2 ( ...
  18. [18]
    Fermat's Last Theorem -- from Wolfram MathWorld
    Fermat's last theorem is a theorem first proposed by Fermat in the form of a note scribbled in the margin of his copy of the ancient Greek text Arithmetica by ...
  19. [19]
    Fermat's last margin note. - | Lapham's Quarterly
    After his death in 1665, Pierre de Fermat's son Clement-Samuel discovered a copy of Arithmetic, a third-century math book by Diophantus, in which Fermat had ...Missing: 1637 | Show results with:1637
  20. [20]
    [PDF] Kummer, Regular Primes, and Fermat's Last Theorem
    Abstract. This paper rephrases Kummer's proof of many cases of Fermat's last theorem in contemporary notation that was in fact derived from his work.
  21. [21]
    [PDF] Fermat's Last Theorem for Regular Primes - Berkeley Math
    Sep 22, 2015 · For over 300 years Fermat's claim remained unsolved, and it provided motivation for many important developments in algebraic number theory.
  22. [22]
    [PDF] Modular elliptic curves and Fermat's Last Theorem
    Fermat's Last Theorem follows as a corollary by virtue of previous work by Frey, Serre and Ribet. An elliptic curve over Q is said to be modular if it has a ...
  23. [23]
    Modular elliptic curves and Fermat's Last Theorem
    Modular elliptic curves and Fermat's Last Theorem from Volume 141 (1995), Issue 3 by Andrew Wiles. No abstract available for this article.
  24. [24]
    [PDF] Algebraic Number Theory and Fermat's Last Theorem
    We use this celebrated theorem to motivate a general study of the theory of algebraic numbers, from a reasonably concrete point of view. The range of topics ...
  25. [25]
    [PDF] Contents 1. Introduction 2. Fermat's two squares theorem
    Proposition 2.5. No number in the form n = 4m + 3 is a sum of two squares. Proof. Let n = 4m + 3 for some m P Z.
  26. [26]
  27. [27]
    None
    - **Statement of Fermat's Theorem**: "omnem numerum primum formae 4n + 1 esse summam duorum quadratorum" – every prime number of the form 4n + 1 is the sum of two squares.
  28. [28]
    [PDF] Euler's proof of the Sums of Two Squares the- orem
    Theorem: (Fermat's two squares theorem) Every odd prime p is a sum of two squares if and only if p ≡ 1 (mod 4). For the avoidance of ambiguity, ...
  29. [29]
  30. [30]
    [PDF] Fermat's Theorem on Sums of Squares - Williams College
    One can show that the norm serves as an appropriate Euclidean norm; the Gaussian integers are a Euclidean Domain. One can show that 𝑁 𝛼 = 1 if and only if 𝛼 is ...
  31. [31]
    [PDF] SUM OF TWO SQUARES Contents 1. Introduction 1 2. Preliminaries ...
    Aug 22, 2008 · Since for each prime factor p of n such that p ≡ 3 (mod 4), p occurs to an even power, p - m. Thus each prime p0 > 2 that divides m satisfies p0 ...
  32. [32]
    [PDF] Representing Integers as the Sum of Two Squares in the Ring Zn
    Jun 21, 2014 · A positive integer z can be written as the sum of two squares if and only if all prime factors q of z with q ≡ 3 (mod 4) occur with even ...
  33. [33]
    [PDF] A Theorem of Fermat on Congruent Number Curves - HAL
    Jan 16, 2019 · Using a theorem of Fermat, we give an elementary proof for the fact that congruent number curves do not contain rational points of finite order ...<|control11|><|separator|>
  34. [34]
    [PDF] Right triangles and elliptic curves
    Theorem (Fermat, ∼1640). There is no rational right triangle with area 1 ... An elliptic curve is a curve defined by a cubic equation y2 = x3 + ax + b.
  35. [35]
    [PDF] Fermat, Leibniz, Euler, and the Gang: The True History of the ...
    Fermat, Leibniz, Euler, and Cauchy all used one or another form of approximate equality, or the idea of discarding “negligible” terms. Their inferential moves ...
  36. [36]
    [PDF] Fermat's methods of maxima and minima and of tangents. A ...
    13 Methodus ad disquirendam maximam et minimam (1637), OF I: 133--34; Ad ... My identification of M2 with FERMAT'S earliest extremum method will be sup- ported by ...Missing: theorem | Show results with:theorem
  37. [37]
  38. [38]
    [PDF] On the analytic and synthetic demonstrations in Fermat's ... - UNAM
    In a letter sent to Cureau de la Chambre in August 1657, which we take as opening the second period, Fermat insists on his objections towards Descartes' method ...
  39. [39]
    [PDF] Fermat's Principle and the Geometric Mechanics of Ray Optics
    Fermat's principle of stationary ray paths is dual to Huygens' principle (1678) of constructive interference of waves. According to Huygens, among all possible ...
  40. [40]
    Optical Path Length – optical phase, Fermat's principle - RP Photonics
    According to Fermat's principle, light always takes the path between two points such that the minimum possible optical path length (i.e., the minimum phase ...
  41. [41]
    Ray Optics, Fermat's Principle, and Applications to General Relativity
    This book is about the mathematical theory of light propagation in media on general-relativistic spacetimes.