courseshub.world · Lives in Mathematics and Physics

Pierre de Fermat

Pierre Fermat, conseiller au Parlement de Toulouse

A course in two strands: the life of a provincial magistrate who did mathematics in his spare hours and published almost nothing, and the methods he left in letters, which anticipated calculus, analytic geometry, probability and modern number theory.

Born 1607 (traditionally 17 August 1601), Beaumont-de-Lomagne Died 12 January 1665, Castres Last Theorem stated c. 1637, proved 1994 Level undergraduate → advanced undergraduate
Fermat’s quadrature of \(y=x^2\): rectangles on \([ar^{k+1},ar^k]\) with ratio \(r=0.8\). Their total area is a geometric series, and as \(r\to1\) it tends to \(a^3/3\).
Lesson 00

How to use this course

Pierre de Fermat is the most famous amateur in the history of mathematics. He spent his working life as a judge in Toulouse, never held an academic post, and printed only one short treatise in his lifetime. His results travelled in letters to Paris, often as challenges without proofs. Yet he found the derivative test for extrema before Newton and Leibniz, wrote equations of curves at the same time as Descartes, founded probability theory with Pascal, and set the agenda of number theory for three centuries.

Prerequisites for Part II
  • Algebra with polynomials and completing the square.
  • Single-variable calculus: limits, derivatives, geometric series.
  • Elementary number theory: divisibility, primes, congruences.
  • For Lesson 08, binomial coefficients and basic counting.

Each technical lesson opens with a paragraph for the general reader, then states results in modern notation, sketches Fermat’s argument or a modern proof, and ends with exercises whose solutions are folded. Fermat wrote in the algebraic notation of François Viète, with vowels for unknowns and consonants for known quantities. We translate everything into today’s symbols, and say so when a modern proof replaces one Fermat never wrote down.

Reference

Timeline

1607Born in Beaumont-de-Lomagne, son of the merchant Dominique Fermat and Claire de Long. Older biographies give 17 August 1601, the baptism date of a half-brother also named Pierre.
1623–26Studies civil law at the University of Orléans; bachelor’s degree in 1626.
c. 1626–30In Bordeaux: reads Viète, restores Apollonius’s Plane Loci (copy given away in 1629), finds his method of maxima and minima.
1630–31Buys the office of councillor at the Parlement de Toulouse; received in May 1631. Marries Louise de Long on 1 June 1631.
163626 April: first letter to Marin Mersenne. Manuscripts on maxima and minima and on loci circulate in Paris.
1637–38Dispute with René Descartes over the Dioptrique and the method of tangents.
c. 1637Writes in the margin of Diophantus’s Arithmetica that \(x^n+y^n=z^n\) has no solutions for \(n>2\).
164018 October: states his little theorem to Bernard Frénicle de Bessy. 25 December: two-squares theorem to Mersenne.
1652–53Promoted to the criminal chamber. Falls ill with plague; a report of his death circulates and is corrected.
1654Correspondence with Blaise Pascal on the problem of points: the birth of probability theory.
1657Number-theoretic challenges to John Wallis and the English, including the equation \(x^2-Ny^2=1\).
1659Sends an account of his number-theory discoveries, with infinite descent, to Christiaan Huygens through Pierre de Carcavi.
1660His treatise on rectification of curves appears as an appendix to a book by Antoine de Lalouvère.
16621 January: derives the law of refraction from the principle of least time, in a letter to Marin Cureau de la Chambre.
1665Dies at Castres on 12 January while sitting at the Chambre de l’Édit.
1670His son Clément-Samuel publishes Diophantus with Fermat’s marginal notes.
1679Varia opera mathematica: his collected treatises and letters.
1994–95Andrew Wiles, with Richard Taylor, completes the proof of Fermat’s Last Theorem.
Part I · Formation
Lesson 01

Beaumont-de-Lomagne

Pierre Fermat was born in Beaumont-de-Lomagne, a market town in Gascony about 50 km north-west of Toulouse. His father, Dominique Fermat, was a prosperous leather merchant who served as one of the town’s consuls. Pierre had a brother and two sisters.

For a long time every reference book gave his birth date as 17 August 1601, the date of a baptism in the parish register. Archival work by the German historian Klaus Barner, published in 2001, showed that this child was a half-brother, also called Pierre, born of Dominique’s first wife Françoise Cazenove. The mathematician was the son of the second wife, Claire de Long. Records of his death give his age as 57, which places his birth in 1607 or the first days of 1608; Barner later narrowed it to between late October and early December 1607. Many sources still repeat 1601.

Almost nothing is known of his schooling. He probably learned his first Latin from the Franciscan friars of Beaumont and may have attended the University of Toulouse before going north. He became fluent in Latin, Greek, Italian and Spanish, and wrote Latin verse. That classical training mattered: much of his mathematics began as an attempt to restore lost Greek works from fragmentary descriptions.

Lesson 02

Orléans and Bordeaux, 1623–1630

From 1623 Fermat studied civil law at the University of Orléans and took his bachelor’s degree in 1626. He then spent several years in Bordeaux. There he met amateurs of mathematics who had access to the works of François Viète, the founder of symbolic algebra, who had died in 1603. Viète’s “analytic art” used letters for both known and unknown quantities and treated geometric problems as equations. Fermat absorbed this method completely, and he kept Viète’s notation all his life even after Descartes’s simpler symbols became standard.

Two projects date from these years. The first was a restoration of Apollonius of Perga’s lost Plane Loci, reconstructed from a summary by Pappus of Alexandria; he gave a copy to a Bordeaux mathematician in 1629. The second was his method of maxima and minima, which he later said he had communicated in Bordeaux around 1629. Reconstructing Greek loci led him to describe curves by equations (Lesson 04), and studying Viète’s theory of equations led him to the method of adequality (Lesson 05).

Like many sons of the rising merchant class, Fermat aimed at a legal office. In France such posts were bought and sold. Around 1630 he purchased the office of councillor at the Parlement de Toulouse, the sovereign court of Languedoc, a position that conferred minor nobility. From then on he signed as Pierre de Fermat.

Lesson 03

Toulouse and the Paris circle, 1631–1643

Fermat was received as councillor in May 1631. On 1 June 1631 he married Louise de Long. They had eight children, five of whom reached adulthood: Clément-Samuel, Jean, Claire, Catherine and Louise. The Parlement’s work was heavy, and its councillors were expected to keep apart from local society to avoid bias. That isolation may have helped his mathematics. He rose steadily, moving to a higher chamber in January 1638.

Entry to the republic of letters

In 1636 his colleague Pierre de Carcavi moved from Toulouse to Paris and told the Minim friar Marin Mersenne about the mathematician in the south. Mersenne ran a network of correspondence that linked most of Europe’s scientists. Fermat’s first letter to him is dated 26 April 1636. Within months his manuscripts on maxima and minima, on tangents, and on plane and solid loci were circulating among Mersenne, Gilles Personne de Roberval and Étienne Pascal, Blaise’s father. Fermat corresponded with Roberval and Étienne Pascal about centres of gravity and the free fall of bodies.

The quarrel with Descartes

In 1637 René Descartes published his Discours de la méthode with its appendices La Géométrie and La Dioptrique. Mersenne asked Fermat for an opinion of the Dioptrique, and Fermat criticized the derivation of the law of refraction. Descartes, who already resented hearing of a rival geometer, attacked Fermat’s method of tangents in turn. The exchange of 1637–38 was bitter, with Girard Desargues among those asked to judge. Descartes eventually conceded that the tangent method was correct, but the two never became friends. Twenty years later Fermat returned to refraction and settled the question his own way (Lesson 07).

From about 1640 his interests moved toward the theory of numbers, as the letters to Frénicle de Bessy and Mersenne of that year show (Lessons 09 and 10).

Part II · The mathematics
Lesson 04

Loci: analytic geometry

For the general reader. A locus is the set of points satisfying a condition, such as all points at a fixed distance from a centre. Fermat saw that if you measure a point by two lengths, the condition becomes an equation in two unknowns, and the shape of the curve can be read from the equation. Descartes reached the same idea independently at the same time. Today we call it coordinate geometry.

Goals
  • State Fermat’s principle that a two-variable equation determines a curve.
  • Classify equations of degree one and two as lines and conics.
  • Reduce a general quadratic to a standard form.

The Isagoge

Fermat’s Ad locos planos et solidos isagoge (Introduction to plane and solid loci) circulated in manuscript from 1636. It begins with a principle: whenever a final equation contains two unknown quantities, there is a locus, and the endpoint of one of them describes a line or a curve. He fixed a base line and a starting point, measured one unknown \(x\) along the base line and the other \(y\) along a line at a fixed angle to it. The angle need not be right.

He then proved, case by case, that the simplest equations give the classical curves:

  • \(dx=by\): a straight line through the origin;
  • \(xy=k^2\): a hyperbola with the axes as asymptotes;
  • \(x^2=dy\): a parabola;
  • \(b^2-x^2=y^2\): a circle (with perpendicular axes);
  • \(b^2-x^2=k\,y^2\): an ellipse; \(b^2+x^2=k\,y^2\): a hyperbola.

He reduced more complicated equations of degree two to these by translating and rotating the axes. The conclusion, in modern words, is the following.

Theorem (Fermat, c. 1636)

The set of points whose coordinates satisfy an equation of degree one is a straight line. The set satisfying an equation \(Ax^2+Bxy+Cy^2+Dx+Ey+F=0\) of degree two is a conic section (ellipse, hyperbola or parabola) or a degenerate case: a pair of lines, a single line, a point, or the empty set.

Proof sketch

Rotate the axes by an angle \(\theta\) with \(\cot2\theta=(A-C)/B\) (if \(B\ne0\)) to remove the \(xy\) term. The equation becomes \(A'x^2+C'y^2+D'x+E'y+F=0\). If \(A'C'\ne0\), complete both squares and translate to reach \(A'X^2+C'Y^2=G\): an ellipse if \(A',C'\) have the same sign as \(G\), a hyperbola if they have opposite signs and \(G\ne0\), and degenerate otherwise. If one of \(A',C'\) is zero, completing one square gives a parabola or a degenerate case. The discriminant \(B^2-4AC\) is unchanged by rotation and is negative, zero or positive for ellipse, parabola and hyperbola.

Fermat and Descartes differed in emphasis. Descartes started from geometric problems and used equations to solve them; Fermat started from equations and asked which curves they define. Fermat’s approach is closer to how the subject is taught today, but his treatise remained unpublished until 1679.

Exercise 4.1Identify the curve \(x^2+4y^2-2x+8y+1=0\) and find its centre and semi-axes.

Show solution
Complete the squares: \((x-1)^2-1+4(y+1)^2-4+1=0\), so \((x-1)^2+4(y+1)^2=4\), or \(\frac{(x-1)^2}{4}+\frac{(y+1)^2}{1}=1\). An ellipse with centre \((1,-1)\) and semi-axes 2 and 1.

Exercise 4.2Show that \(xy+2x-3y=0\) is one of Fermat’s hyperbolas \(XY=\text{const}\) after a translation of axes. Find its asymptotes.

Show solution
\((x-3)(y+2)=xy+2x-3y-6\), so the equation is \((x-3)(y+2)=-6\). With \(X=x-3,\ Y=y+2\) it reads \(XY=-6\), a hyperbola with asymptotes \(x=3\) and \(y=-2\).

Exercise 4.3Use the discriminant to classify \(x^2+xy+y^2=1\) and \(x^2+3xy+y^2=1\).

Show solution
For the first, \(B^2-4AC=1-4=-3<0\): an ellipse (rotating by 45° gives \(\tfrac32X^2+\tfrac12Y^2=1\)). For the second, \(9-4=5>0\): a hyperbola (\(\tfrac52X^2-\tfrac12Y^2=1\)).
Lesson 05

Adequality: maxima, minima, tangents

For the general reader. Near the top of a hill the ground is almost flat: a small step changes your height very little. Fermat turned this observation into an algebraic rule for finding the largest or smallest value of an expression, and the same rule gave tangent lines to curves. It is the derivative test of calculus, found about forty years before Newton and Leibniz.

Goals
  • Carry out Fermat’s method of adequality on polynomial problems.
  • Relate it to the modern statement \(f'(a)=0\) at an interior extremum.
  • Find tangents by the subtangent method.

The method

Fermat’s Methodus ad disquirendam maximam et minimam (circulated 1636) works as follows. Let the quantity to be maximized be an expression in an unknown \(a\). Replace \(a\) by \(a+e\) and set the two expressions adequal, approximately equal, a word he took from Diophantus. Cancel common terms, divide by \(e\), then discard the terms that still contain \(e\). The remaining equation gives the extremum.

His first example: divide a segment of length \(b\) into two parts whose product is greatest. With parts \(a\) and \(b-a\),

\[ a(b-a)\ \sim\ (a+e)(b-a-e) \ \Longrightarrow\ 0\ \sim\ be-2ae-e^2 \ \Longrightarrow\ b\ \sim\ 2a+e \ \Longrightarrow\ a=\tfrac b2. \]
Theorem (modern form of Fermat’s rule)

Let \(f\) be defined on an open interval containing \(a\) and differentiable at \(a\). If \(f\) has a local maximum or minimum at \(a\), then \(f'(a)=0\).

Proof. Suppose a local maximum. For small \(h>0\), \(\frac{f(a+h)-f(a)}{h}\le0\); for small \(h<0\) the quotient is \(\ge0\). Both one-sided limits equal \(f'(a)\), so \(f'(a)=0\). For a polynomial \(f\), \(\frac{f(a+e)-f(a)}{e}\) is a polynomial in \(e\), and Fermat’s “discard the terms in \(e\)” is setting \(e=0\) in it. That is why his procedure always gives the right answer for polynomials, although he had no theory of limits to justify it, and it does not distinguish a maximum from a minimum or from a stationary point.

Tangents

For the tangent at a point \(P=(a,f(a))\) Fermat sought the subtangent \(s\): the distance along the axis from the foot of the ordinate at \(P\) back to the point where the tangent meets the axis. By similar triangles a point on the tangent at abscissa \(a+e\) has height \(f(a)\frac{s+e}{s}\). Treating this as adequal to \(f(a+e)\), cancelling, dividing by \(e\) and setting \(e=0\) gives

\[ s=\frac{f(a)}{f'(a)}. \]

For the parabola \(f(x)=x^2\), \(f(a)(s+e)/s\sim(a+e)^2\) gives \(a^2e/s\sim2ae+e^2\), so \(s=a/2\), the classical result of Apollonius. Descartes’s objection in 1638 was that the method lacked a general justification; Fermat answered with further examples, including the tangent to Descartes’s own folium \(x^3+y^3=3axy\).

Exercise 5.1By adequality, find the point that divides a segment of length \(b\) into parts \(a\) and \(b-a\) maximizing \(a^2(b-a)\).

Show solution
\(a^2(b-a)\sim(a+e)^2(b-a-e)\). Expanding and cancelling: \(0\sim(2ab-3a^2)e+(b-3a)e^2-e^3\). Divide by \(e\), drop terms in \(e\): \(2ab-3a^2=0\), so \(a=\tfrac23b\). The maximum value is \(\tfrac{4}{27}b^3\).

Exercise 5.2Show that the subtangent of \(y=x^n\) at \(x=a>0\) is \(a/n\), and use this to draw the tangent at \((2,8)\) on \(y=x^3\).

Show solution
\(f(a)/f'(a)=a^n/(na^{n-1})=a/n\). At \(a=2\), \(n=3\): \(s=2/3\), so the tangent meets the axis at \(x=2-\tfrac23=\tfrac43\). Its slope is \(8/(2/3)=12=f'(2)\), and its equation is \(y=12x-16\).

Exercise 5.3Fermat’s rule finds stationary points, not only extrema. Apply it to \(f(a)=a^3\) and explain what goes wrong.

Show solution
\((a+e)^3-a^3=3a^2e+3ae^2+e^3\); dividing by \(e\) and setting \(e=0\) gives \(3a^2=0\), so \(a=0\). But \(a^3\) has no extremum at 0: it is an inflection point. The condition \(f'(a)=0\) is necessary, not sufficient.
Lesson 06

Quadrature by geometric progression

For the general reader. To find the area under a curve, cut it into thin strips and add them up. Fermat’s trick was to make the strips unequal, with widths shrinking in a fixed ratio. Then the strip areas form a geometric series, which can be summed exactly, and the answer appears when the ratio tends to one.

Goals
  • Compute \(\int_0^a x^n\,dx\) by Fermat’s geometric partition.
  • Extend the method to fractional powers and to hyperbolas \(y=x^{-m}\).
  • See why the case \(y=1/x\) is exceptional.

By the 1630s Bonaventura Cavalieri, Roberval and others knew the area under \(y=x^n\) for whole-number \(n\), using equal strips and sums of powers. Fermat’s treatise on quadrature, written around 1658 and published in 1679, handled all rational exponents except \(-1\) by a single device.

Theorem (Fermat)

For every rational \(n>-1\), the area under \(y=x^n\) from \(0\) to \(a>0\) is \(\dfrac{a^{n+1}}{n+1}\). For every rational \(m>1\), the area under \(y=x^{-m}\) from \(a>0\) to infinity is finite and equals \(\dfrac{a^{1-m}}{m-1}\).

Proof for whole-number \(n\ge0\)

Fix \(0<r<1\) and divide \([0,a]\) at the points \(a,ar,ar^2,\dots\). The \(k\)-th interval \([ar^{k+1},ar^k]\) has width \(ar^k(1-r)\). Take the rectangle whose height is the value at the right endpoint, \((ar^k)^n\). The sum of these rectangles is

\[ S(r)=\sum_{k=0}^{\infty}a^{n+1}(1-r)\,r^{k(n+1)}=a^{n+1}\,\frac{1-r}{1-r^{n+1}}=\frac{a^{n+1}}{1+r+r^2+\cdots+r^{n}}. \]

The rectangles over-estimate the area for increasing \(x^n\), and the left-endpoint rectangles, which give \(r^nS(r)\), under-estimate it. As \(r\to1\) the denominator tends to \(n+1\), and both bounds tend to \(a^{n+1}/(n+1)\).

Fractional powers

For \(n=p/q\), Fermat substituted \(r=s^q\). Then \(\frac{1-r}{1-r^{n+1}}=\frac{1-s^q}{1-s^{p+q}}=\frac{1+s+\cdots+s^{q-1}}{1+s+\cdots+s^{p+q-1}}\), which tends to \(\frac{q}{p+q}=\frac{1}{n+1}\) as \(s\to1\).

Hyperbolas

For \(y=x^{-m}\) on \([a,\infty)\) use the points \(a,aR,aR^2,\dots\) with \(R>1\). The rectangles with left-endpoint heights sum to \(a^{1-m}(R-1)\sum_k R^{k(1-m)}=a^{1-m}\frac{R-1}{1-R^{1-m}}\), which tends to \(\frac{a^{1-m}}{m-1}\) as \(R\to1\). For \(m=1\) every strip has the same area \(R-1\): the geometric partition turns area into a count, and the sum diverges. Grégoire de Saint-Vincent and Alphonse Antonio de Sarasa saw that this makes the area under \(1/x\) behave like a logarithm.

Exercise 6.1Use Fermat’s method to find the area under \(y=\sqrt x\) from 0 to 4.

Show solution
\(n=1/2\), so \(p=1,q=2\) and the limit is \(\frac{q}{p+q}a^{3/2}=\tfrac23\cdot4^{3/2}=\tfrac{16}{3}\).

Exercise 6.2Compute the area under \(y=1/x^2\) from 1 to \(\infty\) by the geometric partition, and check the answer with an antiderivative.

Show solution
With \(m=2\), \(a=1\): \(\frac{R-1}{1-R^{-1}}=\frac{R-1}{(R-1)/R}=R\to1\). The antiderivative gives \(\int_1^\infty x^{-2}dx=[-x^{-1}]_1^\infty=1\).

Exercise 6.3For \(y=1/x\), show that the geometric partition with ratio \(R\) gives the same area for \([1,R]\) as for \([R^k,R^{k+1}]\), and deduce \(A(xy)=A(x)+A(y)\) for \(A(x)=\int_1^x dt/t\).

Show solution
The substitution \(t=R^k u\) maps \([1,R]\) to \([R^k,R^{k+1}]\) and \(dt/t=du/u\). The same substitution with \(R^k\) replaced by \(x\) gives \(\int_x^{xy}dt/t=\int_1^y du/u\), so \(A(xy)=A(x)+A(y)\): the logarithm law.
Lesson 07

Least time and refraction

For the general reader. A straw in a glass of water looks bent because light changes direction when it passes from water into air. Fermat explained the rule for this bending by a single principle: light follows the path that takes the least time. It was the first variational principle in physics, ancestor of the principle of least action.

Goals
  • Derive the law of refraction from the principle of least time.
  • See why Fermat’s derivation requires light to be slower in the denser medium.
  • Understand the 1662 controversy with the Cartesians.

The setting

Hero of Alexandria had shown that reflected light follows the shortest path. In 1657 the physician Marin Cureau de la Chambre sent Fermat a book on light observing that shortest length fails for refraction. Fermat proposed that light minimizes a “resistance” depending on the medium. In a letter to La Chambre dated 1 January 1662 he took the resistance to be inversely proportional to speed, so that light minimizes travel time, and solved the problem by adequality.

Theorem (Fermat, 1662)

Let light travel from \(A\) in a medium where its speed is \(v_1\) to \(B\) in a medium where its speed is \(v_2\), across a plane interface. If the path minimizes total travel time, then the angles of incidence and refraction, measured from the normal, satisfy

\[ \frac{\sin\theta_1}{v_1}=\frac{\sin\theta_2}{v_2}. \]

Derivation

Put the interface on the \(x\)-axis, \(A=(0,h_1)\), \(B=(d,-h_2)\), and let the ray cross at \((x,0)\). The travel time is

\[ T(x)=\frac{\sqrt{x^2+h_1^2}}{v_1}+\frac{\sqrt{(d-x)^2+h_2^2}}{v_2}. \]

Then \(T'(x)=\frac{x}{v_1\sqrt{x^2+h_1^2}}-\frac{d-x}{v_2\sqrt{(d-x)^2+h_2^2}}=\frac{\sin\theta_1}{v_1}-\frac{\sin\theta_2}{v_2}\), and \(T'(x)=0\) is the law. Since \(T''>0\), the stationary point is the unique minimum. With refractive index \(n=c/v\), the law becomes Snell’s form \(n_1\sin\theta_1=n_2\sin\theta_2\).

Fermat was surprised to find that his calculation reproduced exactly the law Descartes had published in 1637. Descartes had derived it with a model in which light moves faster in the denser medium; Fermat’s derivation needs it to move slower. The question was settled only in 1850, when Léon Foucault measured light travelling more slowly in water than in air. On 6 May 1662 Claude Clerselier, defending Descartes, objected that nature does not act with foresight and that least time was a moral principle, not a physical one. Fermat replied on 21 May 1662, conceding the physical question to his critics while maintaining that the geometry was correct.

Exercise 7.1Light passes from air into water with \(v_{\text{air}}/v_{\text{water}}=4/3\). If \(\theta_1=30^\circ\), find \(\theta_2\).

Show solution
\(\sin\theta_2=\frac{v_2}{v_1}\sin\theta_1=\tfrac34\cdot\tfrac12=0.375\), so \(\theta_2\approx22.0^\circ\). The ray bends toward the normal, as it must when it slows down.

Exercise 7.2Derive the law of reflection from the principle of least time: light goes from \(A=(0,h_1)\) to the mirror \(y=0\) and then to \(B=(d,h_2)\).

Show solution
With one speed, minimize length \(L(x)=\sqrt{x^2+h_1^2}+\sqrt{(d-x)^2+h_2^2}\). \(L'(x)=0\) gives \(\frac{x}{\sqrt{x^2+h_1^2}}=\frac{d-x}{\sqrt{(d-x)^2+h_2^2}}\): the sines of the two angles with the normal are equal, so the angle of incidence equals the angle of reflection. Geometrically, reflect \(B\) in the mirror and join \(A\) to the image by a straight line (Hero’s argument).
Lesson 08

The problem of points

For the general reader. Two gamblers stop a game before it is finished. How should they split the stakes fairly? The question had puzzled writers since the fifteenth century. In 1654 Pascal and Fermat solved it by different methods in a short exchange of letters, and in doing so created the mathematics of chance.

Goals
  • Solve the problem of points by Fermat’s method of enumerating completed games.
  • Compare it with Pascal’s method of backward expectation.
  • Handle Fermat’s three-player case.

Fermat’s method

Suppose two players of equal skill play rounds, each won with probability \(\tfrac12\), and the first to reach a target number of rounds takes the stakes. When play stops, player A needs \(a\) more wins and player B needs \(b\). Fermat observed that the game must be decided within \(a+b-1\) further rounds. He imagined all of them played, even if the game were decided earlier, which makes the \(2^{a+b-1}\) sequences equally likely. A wins exactly in those sequences containing at least \(a\) wins for A.

Theorem (Fermat, Pascal, 1654)

With fair rounds, A’s fair share of the stakes is

\[ P_A=\frac{1}{2^{a+b-1}}\sum_{k=a}^{a+b-1}\binom{a+b-1}{k}. \]

Pascal’s method

Pascal worked backwards. Let \(E(a,b)\) be A’s fair share when A needs \(a\) and B needs \(b\). After one more round we are at \((a-1,b)\) or \((a,b-1)\) with equal chance, so

\[ E(a,b)=\tfrac12E(a-1,b)+\tfrac12E(a,b-1),\qquad E(0,b)=1,\quad E(a,0)=0. \]

In his letter of 29 July 1654 Pascal took a game to three points with 64 pistoles at stake. If A has two points and B one, then \(E(1,2)=\tfrac12\cdot1+\tfrac12E(1,1)=\tfrac12+\tfrac14=\tfrac34\), so A takes 48 pistoles. Fermat’s count gives the same: of the four sequences AA, AB, BA, BB, A wins three. Pascal connected the general solution to his arithmetical triangle (see the Pascal course).

Pascal at first thought Fermat’s enumeration failed for three players, because imagined rounds after the game ends seemed to distort the count. In his letter of 25 September 1654 Fermat showed that, done carefully, it works for any number of players.

Exercise 8.1A needs 2 wins and B needs 3. Find A’s share by Fermat’s method and check it by Pascal’s recursion.

Show solution
Four further rounds: \(P_A=\frac{\binom42+\binom43+\binom44}{16}=\frac{6+4+1}{16}=\frac{11}{16}\). Recursion: \(E(1,1)=\tfrac12\), \(E(1,2)=\tfrac34\), \(E(1,3)=\tfrac78\), \(E(2,1)=\tfrac14\), \(E(2,2)=\tfrac12\), \(E(2,3)=\tfrac12(E(1,3)+E(2,2))=\tfrac12(\tfrac78+\tfrac12)=\tfrac{11}{16}\).

Exercise 8.2(Fermat’s three-player case.) Three players of equal skill; A needs 1 win, B and C each need 2. Find A’s share.

Show solution
A wins the next round with probability \(\tfrac13\). If B wins it (probability \(\tfrac13\)), all three need 1 more except C needing 2; then A wins next with \(\tfrac13\), or B wins and the game ends, or C wins and the following round decides with A taking \(\tfrac13\). So from that state A’s chance is \(\tfrac13+\tfrac13\cdot\tfrac13=\tfrac49\), and the same after a C win. Total: \(\tfrac13+\tfrac23\cdot\tfrac49=\tfrac{17}{27}\). Fermat’s count over all \(3^3=27\) imagined sequences of three rounds gives the same 17.
Lesson 09

Primes: the little theorem

For the general reader. Take a prime, say 7, and any number not divisible by it, say 3. Raise 3 to the power 6 and divide by 7: the remainder is 1. Fermat found that this always happens. The fact now protects internet traffic, since RSA encryption and the fastest primality tests rest on it.

Goals
  • State and prove Fermat’s little theorem.
  • Use it to restrict the prime factors of \(2^p-1\).
  • See why Fermat’s conjecture on \(2^{2^n}+1\) fails.

Perfect numbers and Mersenne numbers

Fermat came to the theorem through perfect numbers. Euclid had shown that \(2^{p-1}(2^p-1)\) is perfect when \(2^p-1\) is prime, so one needs to know when \(2^p-1\) is prime. In a letter to Mersenne in 1640 Fermat stated that every prime factor of \(2^p-1\) (with \(p\) an odd prime) has the form \(2kp+1\), and used it to show that \(2^{37}-1=223\times616318177\).

Theorem (Fermat’s little theorem, 1640)

If \(p\) is prime and \(p\nmid a\), then \(a^{p-1}\equiv1\pmod p\). Equivalently, \(a^p\equiv a\pmod p\) for every integer \(a\).

Fermat stated it in a letter to Frénicle de Bessy dated 18 October 1640, adding that he would send the proof if it were not too long. The first published proof is Leonhard Euler’s of 1736; Gottfried Wilhelm Leibniz had a similar unpublished proof before 1683.

Proof by the binomial theorem

For \(0<k<p\), \(\binom pk=\frac{p!}{k!(p-k)!}\) is divisible by \(p\), since \(p\) divides the numerator and not the denominator. Hence \((a+1)^p\equiv a^p+1\pmod p\). By induction from \(0^p=0\), \(a^p\equiv a\) for all \(a\ge0\), and so for all integers. If \(p\nmid a\), cancel \(a\).

Corollary (Fermat, 1640)

If \(p\) is an odd prime and \(q\) is a prime dividing \(2^p-1\), then \(q\equiv1\pmod{2p}\).

Proof. Let \(d\) be the order of 2 modulo \(q\), the least \(d\ge1\) with \(2^d\equiv1\). Since \(2^p\equiv1\), \(d\mid p\), and \(d\ne1\), so \(d=p\). By the little theorem \(2^{q-1}\equiv1\), so \(p\mid q-1\). As \(q\) is odd, \(2p\mid q-1\).

Fermat numbers

Fermat repeatedly asserted, while admitting he lacked a proof, that every number \(F_n=2^{2^n}+1\) is prime. \(F_0,\dots,F_4=3,5,17,257,65537\) are indeed prime. In 1732 Euler showed \(641\mid F_5\). No further Fermat prime has ever been found. Carl Friedrich Gauss showed in 1796 that the regular 17-gon is constructible with ruler and compass, and in 1801 that a regular \(p\)-gon is constructible whenever \(p\) is a Fermat prime; Pierre Wantzel proved the converse in 1837.

Exercise 9.1Show that if \(2^m+1\) is prime then \(m\) is a power of 2.

Show solution
If \(m=st\) with \(t\) odd and \(t>1\), then \(x+1\) divides \(x^t+1\), so \(2^s+1\) divides \(2^m+1\), with \(1<2^s+1<2^m+1\). Hence \(m\) has no odd factor greater than 1.

Exercise 9.2Prove \(641\mid2^{32}+1\) using \(641=5\cdot2^7+1=5^4+2^4\).

Show solution
Let \(x=2^7\). Then \(5x\equiv-1\pmod{641}\), so \(5^4x^4\equiv1\). Also \(5^4\equiv-2^4\), so \(-2^4x^4\equiv1\), that is \(-2^{32}\equiv1\), so \(2^{32}+1\equiv0\pmod{641}\).

Exercise 9.3Use the corollary to find the smallest prime factor of \(2^{11}-1=2047\).

Show solution
Prime factors must be \(\equiv1\pmod{22}\): candidates 23, 67, 89, … Indeed \(2047=23\times89\), and \(89=4\cdot22+1\) also has the required form.
Lesson 10

Squares, descent, the Last Theorem

For the general reader. Fermat’s favourite tool for proving that something is impossible was “infinite descent”: show that any solution would produce a smaller one, which would produce a smaller one still, forever, which cannot happen with positive whole numbers. With it he proved that no fourth power is a sum of two fourth powers. He wrote in a margin that the same was true for every power beyond the second, and the claim took 358 years to prove.

Goals
  • Prove Fermat’s two-squares theorem.
  • Carry out a full proof by infinite descent for \(x^4+y^4=z^2\).
  • Understand Fermat’s challenge on \(x^2-Ny^2=1\) and the statement of the Last Theorem.

Sums of two squares

Theorem (Fermat, letter to Mersenne, 25 December 1640)

An odd prime \(p\) is a sum of two squares if and only if \(p\equiv1\pmod 4\). The representation is unique up to order and signs.

Albert Girard had stated the characterization in 1625 without proof. Fermat claimed a proof by descent but never wrote it out. Euler gave the first published proof, announced in 1747. A short modern proof runs as follows. Squares are \(0\) or \(1\pmod4\), so a sum of two squares is never \(3\pmod4\). Conversely, if \(p\equiv1\pmod4\), Wilson’s theorem gives \(c^2\equiv-1\pmod p\) with \(c=(\tfrac{p-1}{2})!\). Consider the numbers \(u+cv\) with \(0\le u,v<\sqrt p\). There are more than \(p\) pairs, so two agree modulo \(p\) (pigeonhole), and their difference gives \(x\equiv cy\pmod p\) with \(|x|,|y|<\sqrt p\), not both zero. Then \(x^2+y^2\equiv(c^2+1)y^2\equiv0\pmod p\) and \(0<x^2+y^2<2p\), so \(x^2+y^2=p\).

Infinite descent

Theorem (Fermat)

There are no positive integers \(x,y,z\) with \(x^4+y^4=z^2\). Consequently \(x^4+y^4=z^4\) has no solution in positive integers, and the area of a right triangle with integer sides is never a square.

Proof. Take a solution with \(z\) minimal; then \(\gcd(x,y)=1\). The triple \((x^2,y^2,z)\) is a primitive Pythagorean triple, so (swapping \(x,y\) if necessary) \(x^2=m^2-n^2\), \(y^2=2mn\), \(z=m^2+n^2\) with \(\gcd(m,n)=1\) and \(m,n\) of opposite parity. From \(x^2+n^2=m^2\) with \(x\) odd, \(n\) is even and \(m\) odd, and \((x,n,m)\) is again primitive: \(x=r^2-s^2\), \(n=2rs\), \(m=r^2+s^2\) with \(\gcd(r,s)=1\). Now \(y^2=2mn=4rs(r^2+s^2)\), and \(r\), \(s\), \(r^2+s^2\) are pairwise coprime, so each is a square: \(r=u^2\), \(s=v^2\), \(r^2+s^2=w^2\). Then \(u^4+v^4=w^2\) with \(0<w\le w^2=m<m^2+n^2=z\), contradicting the minimality of \(z\). The statement about triangles is equivalent, via the parametrization of right triangles; it is the only proof Fermat wrote down in any detail, in a margin of Diophantus.

The equation \(x^2-Ny^2=1\)

In 1657 Fermat challenged Wallis and the English mathematicians to show that for every non-square positive integer \(N\) the equation \(x^2-Ny^2=1\) has infinitely many integer solutions. William Brouncker and Wallis produced a method, published in Wallis’s Commercium epistolicum (1658), though not a proof that it always works; Joseph-Louis Lagrange gave that proof in the late 1760s. Euler later attached the equation, wrongly, to the name of John Pell. For \(N=61\) the smallest solution is \(x=1766319049\), \(y=226153980\).

The Last Theorem

Fermat’s Last Theorem (stated c. 1637; proved by Wiles and Taylor–Wiles, 1995)

For every integer \(n\ge3\), the equation \(x^n+y^n=z^n\) has no solution in positive integers.

Fermat wrote the claim beside Problem II.8 of his copy of Claude-Gaspard Bachet’s 1621 edition of Diophantus, adding that he had a marvellous proof which the margin was too narrow to contain. The note became known when his son printed it in 1670. In his letters Fermat later posed only the cases \(n=3\) and \(n=4\) as challenges, which suggests he did not keep his belief in a general proof. Euler treated \(n=3\) (1770), and Ernst Kummer proved the theorem for all regular primes in the 1840s. The final proof came by a different route: Gerhard Frey (1984) linked a counterexample to a strange elliptic curve, Ken Ribet (1986) proved that such a curve could not be modular, and Andrew Wiles, with Richard Taylor, proved enough of the modularity conjecture to rule it out. The two papers filled the May 1995 issue of the Annals of Mathematics.

Exercise 10.1Write 13 and 17 as sums of two squares, then use the identity \((a^2+b^2)(c^2+d^2)=(ac\mp bd)^2+(ad\pm bc)^2\) to write \(221=13\cdot17\) as a sum of two squares in two ways.

Show solution
\(13=2^2+3^2\), \(17=1^2+4^2\). Then \((2\cdot1-3\cdot4)^2+(2\cdot4+3\cdot1)^2=10^2+11^2=221\) and \((2\cdot1+3\cdot4)^2+(2\cdot4-3\cdot1)^2=14^2+5^2=221\).

Exercise 10.2Find the smallest positive solution of \(x^2-2y^2=1\) and use \((x+y\sqrt2)^k\) to produce the next two.

Show solution
\((3,2)\): \(9-8=1\). \((3+2\sqrt2)^2=17+12\sqrt2\) gives \((17,12)\): \(289-288=1\). \((3+2\sqrt2)^3=(17+12\sqrt2)(3+2\sqrt2)=99+70\sqrt2\) gives \((99,70)\): \(9801-9800=1\). The norm \(x^2-2y^2\) is multiplicative, which is why powers of a solution are solutions.

Exercise 10.3Explain why the theorem for \(n=4\) reduces Fermat’s Last Theorem to the case where \(n\) is an odd prime.

Show solution
Every \(n\ge3\) is divisible by 4 or by an odd prime \(p\). If \(n=km\) and \(x^n+y^n=z^n\), then \((x^k)^m+(y^k)^m=(z^k)^m\) is a solution for exponent \(m\). So it suffices to rule out exponents 4 (done by descent) and odd primes.
Part III · Life and legacy
Lesson 11

Judge, challenger, recluse, 1643–1665

In the later 1640s Fermat’s mathematical correspondence thinned. In 1652 he was promoted to the highest level of the criminal court. In the plague years of the early 1650s he fell seriously ill; in 1653 a correspondent reported his death to the Dutch scholar Nicolaas Heinsius, then corrected the report. Fermat recovered.

The year 1654 brought the exchange with Blaise Pascal, whom he never met. Fermat had known Pascal’s father two decades earlier. Their letters on games of chance (Lesson 08) are the founding documents of probability theory. Fermat hoped to interest Pascal in number theory too, without success. In 1660 he proposed a meeting halfway between Toulouse and Clermont; Pascal, already ill and absorbed in religion, declined in a courteous letter that praised Fermat as the leading geometer in Europe.

Challenges to the English

In 1657, through Kenelm Digby, Fermat sent number-theoretic challenges to Wallis and other English mathematicians. He wished to revive interest in the arithmetic of whole numbers, which he felt mathematicians had neglected for geometry. Wallis replied impatiently at first; then he and Brouncker solved the problem of \(x^2-Ny^2=1\) in practice (Lesson 10). In 1659 Fermat summarized his discoveries in a memoir sent to Christiaan Huygens through Carcavi. It describes infinite descent and lists results he claimed to have proved this way.

Last works

In 1660 his treatise comparing curved lines with straight lines, on the rectification of curves, appeared as an appendix to Veterum geometria promota by the Jesuit Antoine de Lalouvère, under the initials M. P. E. A. S. It was the only mathematical work printed in his lifetime. In 1662 came the principle of least time (Lesson 07).

Fermat also sat periodically at Castres in the Chambre de l’Édit, a court with Catholic and Protestant judges created under the Edict of Nantes to hear cases involving Protestants. He died there on 12 January 1665 and was buried the next day.

Lesson 12

Posthumous works and legacy

Fermat left his results scattered in letters and margins. His son Clément-Samuel gathered them. In 1670 he reissued Bachet’s Diophantus with his father’s 48 marginal observations, including the note on the Last Theorem. In 1679 he published Varia opera mathematica, with the treatises on loci, maxima and minima, quadrature and tangents, and a selection of letters. By then calculus had been found again by Newton and Leibniz, and Fermat’s analytic methods were absorbed without much credit. Newton is reported to have said that Fermat’s method of tangents gave him a hint toward his own.

The long life of the number theory

Number theory was the part of his work no one took up at first. Euler, prompted by Christian Goldbach, read Fermat in the 1730s and spent decades proving his claims: the little theorem, the two-squares theorem, the case \(n=3\), and the refutation of the Fermat-number conjecture. Lagrange proved the four-squares theorem, which Fermat had also claimed, and the Pell result. Gauss organized the subject in his Disquisitiones arithmeticae (1801). The Last Theorem drove Kummer to invent ideal numbers, and through Dedekind’s ideals it shaped algebraic number theory. Its final proof in 1994–95 established a large part of the modularity conjecture and helped launch the Langlands program into its modern form.

Legacy

  • Calculus: adequality is the first general method for extrema and tangents; his quadratures cover all rational powers except \(-1\).
  • Geometry: co-founder, with Descartes, of analytic geometry.
  • Physics: the principle of least time, the first extremum principle in physics.
  • Probability: co-founder, with Pascal, of the mathematical theory of chance.
  • Number theory: the little theorem, two squares, infinite descent, Pell’s equation, and the Last Theorem.
  • Honours: the Lycée Pierre-de-Fermat in Toulouse bears his name, and the Capitole de Toulouse has a statue by Théophile Barrau. The Fermat Prize, awarded by the Institut de Mathématiques de Toulouse since 1989, honours research in fields where he worked.

DiscussionFermat rarely published and often withheld proofs, partly as a challenge and partly from lack of time. What did mathematics gain and lose from this habit? Compare with the publishing practice of Pascal and of Descartes.

Final projectChoose one result from Part II. Write a two-page account for a strong undergraduate that presents Fermat’s own method (adequality, geometric partition, enumeration or descent), works one example in full, and compares it with the modern treatment.

Reference

Sources and further reading

Biography

  1. J. J. O’Connor and E. F. Robertson, Pierre de Fermat, MacTutor History of Mathematics.
  2. Pierre de Fermat, Wikipedia.
  3. K. Barner, How old did Fermat become?, NTM 9 (2001).
  4. MAA Convergence, When was Fermat born?
  5. M. S. Mahoney, The Mathematical Career of Pierre de Fermat, 1601–1665, 2nd ed., Princeton University Press, 1994.

Mathematics

  1. P. Tannery and C. Henry (eds.), Œuvres de Fermat, 4 vols., Gauthier-Villars, 1891–1912.
  2. P. de Fermat, Varia opera mathematica, Toulouse, 1679.
  3. A. Weil, Number Theory: An Approach through History from Hammurapi to Legendre, Birkhäuser, 1984.
  4. Fermat’s principle and Fermat’s little theorem, Wikipedia (historical sections).
  5. Pell’s equation, Wikipedia (history of the 1657 challenge).
  6. A. Wiles, Modular elliptic curves and Fermat’s Last Theorem, Ann. of Math. 141 (1995) 443–551; R. Taylor and A. Wiles, Ring-theoretic properties of certain Hecke algebras, ibid. 553–572.
  7. F. N. David, Games, Gods and Gambling, Griffin, 1962 (with translations of the Pascal–Fermat letters).