On this page
Pierre de Fermat never held a post in mathematics. He was a lawyer and judge, and most of what he discovered survives in letters and margin notes. Yet his name is on one of the most famous problems ever solved and on a principle every student of optics uses. This post tells his story from reliable sources and then works through a "least time" problem that shows where Snell's law comes from.
Who was Pierre de Fermat?
The MacTutor biography records that Fermat was born in Beaumont-de-Lomagne, France, on 17 August 1601 (the date is disputed), and died in Castres on 12 January 1665. He studied law at Orleans and from 1631 was a councillor at the parliament in Toulouse, rising to the criminal court in 1652. In 1653 he caught the plague and his death was wrongly reported.
Mathematics was his passion alongside the law. He wrote to Mersenne in Paris and challenged others with problems he had already solved, which often annoyed them. His Introduction to Plane and Solid Loci described an algebraic approach to geometry at about the same time as Descartes, which our post on Rene Descartes and the coordinate plane explores. In 1654 his letters with Blaise Pascal laid the foundations of probability theory.
What is Fermat's Last Theorem?
The theorem says xⁿ + yⁿ = zⁿ has no solutions in positive whole numbers when n is greater than 2. For n = 2 there are plenty, such as 3² + 4² = 5². MacTutor records that Fermat wrote in the margin of his copy of Diophantus's Arithmetica that he had "a truly remarkable proof which this margin is too small to contain". The note became known only after his son Samuel published an edition with his father's notes in 1670.
Historians now think his proof was probably wrong, and MacTutor suggests that his later challenge to prove the special case n = 3 may show he knew it. The theorem resisted everyone for over 300 years. Andrew Wiles announced a proof in June 1993, withdrew it when a gap emerged, and in November 1994 claimed a corrected proof, which has been accepted. He published it as Modular elliptic curves and Fermat's Last Theorem in the Annals of Mathematics in 1995. The Abel Prize lists Wiles as its 2016 laureate. On the way, Sophie Germain made the first major progress on a general case, as our post on Sophie Germain explains.
What is the principle of least time?
Descartes had published a law of refraction in 1637, and Fermat objected to how it was derived. MacTutor's history of light through the ages records that Fermat proposed that light follows the path which takes the shortest time, which lets Snell's law of refraction be deduced mathematically. Light crossing into glass or water slows down, so the fastest route is not the straight line. It bends at the surface so that it spends less of its journey in the slow medium.
Worked example: the fastest route across sand and water
A lifeguard at A stands 30 m up the beach from the water's edge. A swimmer at B is 20 m out into the sea and 40 m along the shore. The lifeguard runs at 5 m/s on sand and swims at 2 m/s. Where should she enter the water?
Call x the distance along the shore to the entry point. Time = (distance on sand)/5 + (distance in water)/2, where distance on sand = √(x² + 30²) and distance in water = √((40 − x)² + 20²).
Straight line. The straight line from A to B meets the shore at x = 24 m. Sand: √(24² + 900) = 38.42 m, so 7.68 s. Water: √(16² + 400) = 25.61 m, so 12.81 s. Total: 20.49 s.
Run further first. At x = 30 m: sand 42.43 m (8.49 s), water 22.36 m (11.18 s), total 19.67 s. Faster.
Best point. Trying values, the minimum is near x = 33.7 m, with a total of about 19.51 s. Going all the way to x = 40 m takes 20.00 s, so too far is also slower.
Check Snell's law. Measure angles from the line perpendicular to the shore. At x = 33.7: sin θ₁ = 33.7/45.1 = 0.747 and sin θ₂ = 6.3/21.0 = 0.299. Then sin θ₁/5 = 0.149 and sin θ₂/2 = 0.149. They match.
That last line is Snell's law: sin θ₁/v₁ = sin θ₂/v₂. Since refractive index n = c/v, it becomes n₁ sin θ₁ = n₂ sin θ₂, the form in your Class 10 and 12 books, covered in our guide to refraction in Class 10.
Common mistakes: measuring angles from the surface instead of the normal, using the shortest path, and putting speeds where refractive indices go (index is inversely proportional to speed).
What can a student take from Fermat's way of working?
Keep going without an audience. He worked for decades with no position in mathematics.
Look for the principle under a rule. Least time explains why Snell's law has the form it does.
Write up your methods. MacTutor notes he rarely published, which cost him credit and left a puzzle that took over 300 years to settle.
Refraction is one of those ideas that is easier to see than read, and the Fermi Simulation Lab has interactive simulations for ideas like this, so you can watch a ray bend as you change the medium.
Rework the lifeguard problem with a swimming speed of 2.5 m/s and check that Snell's law still holds at your best point.



