Pierre de Fermat (pjɛʁ də fɛʁma; between 31 October and 6 December 1607 – 12 January 1665) was a French mathematician who is given credit for early developments that led to infinitesimal calculus, including his technique of adequality. In particular, he is recognized for his discovery of an original method of finding the greatest and the smallest ordinates of curved lines, which is analogous to that of differential calculus, then unknown, and his research into number theory. He made notable contributions to analytic geometry, probability, and optics. He is best known for his Fermat's principle for light propagation and his Fermat's Last Theorem in number theory, which he described in a note at the margin of a copy of Diophantus' Arithmetica. He was also a lawyer at the Parlement of Toulouse, France.
Fermat was born in 1607 in Beaumont-de-Lomagne, France—the late 15th-century mansion where Fermat was born is now a museum. He was from Gascony, where his father, Dominique Fermat, was a wealthy leather merchant and served three one-year terms as one of the four consuls of Beaumont-de-Lomagne. His mother was Claire de Long. Pierre had one brother and two sisters and was almost certainly brought up in the town of his birth.
He attended the University of Orléans from 1623 and received a bachelor in civil law in 1626, before moving to Bordeaux. 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.
In 1630, he bought the office of a councilor at the Parlement de Toulouse, one of the High Courts of Judicature in France, and was sworn in by the Grand Chambre in May 1631. He held this office for the rest of his life.