Fermat was born in Beaumont-de-Lomagne, Tarn-et-Garonne, France; the late 15th century mansion where Fermat was born is now a museum. He was of Basque origin. Fermat's father was a wealthy leather merchant and second consul of Beaumont-de-Lomagne. Pierre had a brother and two sisters and was almost certainly brought up in the town of his birth. There is little evidence concerning his school education, but it may have been at the local Franciscan monastery.
Bust in the Salle des Illustres in Capitole de Toulouse
He attended the University of Toulouse before moving to Bordeaux in the second half of the 1620s. In Bordeaux he began his first serious mathematical researches and in 1629 he gave a copy of his restoration of Apollonius's De Locis Planis to one of the mathematicians there. Certainly in Bordeaux he was in contact with Beaugrand and during this time he produced important work on maxima and minima which he gave to Étienne d'Espagnet who clearly shared mathematical interests with Fermat. There he became much influenced by the work of François Viète.
From Bordeaux, Fermat went to Orléans where he studied law at the University. He received a degree in civil law before, in 1631, receiving the title of councillor at the High Court of Judicature in Toulouse, which he held for the rest of his life. Due to the office he now held he became entitled to change his name from Pierre Fermat to Pierre de Fermat. Fluent in Latin, Basque, classical Greek, Italian, and Spanish, Fermat was praised for his written verse in several languages, and his advice was eagerly sought regarding the emendation of Greek texts.
He communicated most of his work in letters to friends, often with little or no proof of his theorems. This allowed him to preserve his status as an "amateur" while gaining the recognition he desired. This naturally led to priority disputes with fellow contemporaries such as Descartes and Wallis. He developed a close relationship with Blaise Pascal.
Anders Hald writes that, "The basis of Fermat's mathematics was the classical Greek treatises combined with Vieta's new algebraic methods."
Fermat's pioneering work in analytic geometry was circulated in manuscript form in 1636, predating the publication of Descartes' famous La géométrie. This manuscript was published posthumously in 1679 in "Varia opera mathematica", as Ad Locos Planos et Solidos Isagoge, ("Introduction to Plane and Solid Loci").
Pierre de Fermat
Fermat was the first person known to have evaluated the integral of general power functions. Using an ingenious trick, he was able to reduce this evaluation to the sum of geometric series. The resulting formula was helpful to Newton, and then Leibniz, when they independently developed the fundamental theorem of calculus.
In number theory, Fermat studied Pell's equation, perfect numbers, amicable numbers and what would later become Fermat numbers. It was while researching perfect numbers that he discovered the little theorem. He invented a factorization method - Fermat's factorization method - as well as the proof technique of infinite descent, which he used to prove Fermat's Last Theorem for the case n = 4. Fermat developed the two-square theorem, and the polygonal number theorem, which states that each number is a sum of three triangular numbers, four square numbers, five pentagonal numbers, and so on.
Although he carefully studied, and drew inspiration from Diophantus, Fermat began a different tradition. Diophantus was content to find a single solution to his equations, even if it were an undesired fractional one. Fermat was interested only in integer solutions to his Diophantine equations, and he looked for all possible general solutions. He often proved that certain equations had no solution, which usually baffled his contemporaries.
Through his correspondence with Pascal in 1654, Fermat and Pascal helped lay the fundamental groundwork for the theory of probability. From this brief but productive collaboration on the problem of points, they are now regarded as joint founders of probability theory. Fermat is credited with carrying out the first ever rigorous probability calculation. In it, he was asked by a professional gambler why if he bet on rolling at least one six in four throws of a die he won in the long term, whereas betting on throwing at least one double-six in 24 throws of two dice resulted in him losing. Fermat subsequently proved why this was the case mathematically.
Fermat's principle of least time (which he used to derive Snell's law in 1657) was the first variational principle enunciated in physics since Hero of Alexandria described a principle of least distance in the first century CE. In this way, Fermat is recognized as a key figure in the historical development of the fundamental principle of least action in physics. The term Fermat functional was named in recognition of this role.