Pierre de Fermat

Pierre de Fermat (1607–1665) had a day job as a lawyer and judge in southern France, and did mathematics purely for fun in his spare time — which makes it slightly infuriating that he became one of the greatest number theorists in history. He rarely published; his discoveries survive mostly as claims scribbled in letters and book margins, usually with the proof left as an exercise for everyone else, for centuries.

The amateur who founded number theory

Fermat's fingerprints are all over the subject. His Little Theorem is a workhorse of modern cryptography and primality testing; Fermat primes bear his name; and with Blaise Pascal, in a friendly exchange of letters about a gambling problem, he co-founded the entire theory of probability. Not bad for a hobby.

The most famous margin note in history

Around 1637, reading a copy of Diophantus's Arithmetica, Fermat jotted in the margin that the equation x^n + y^n = z^n has no whole-number solutions for n > 2 — and added the immortal tease: "I have discovered a truly marvellous proof of this, which this margin is too narrow to contain." He never wrote it down. Fermat's Last Theorem then defied the finest mathematicians on Earth for 358 years, until Andrew Wiles finally cracked it in 1994 — using deep 20th-century machinery Fermat could not possibly have known. Almost certainly, his "marvellous proof" was wrong. But what a way to be wrong.