Some history¶
On Christmas day (25 December 1640), Pierre de Fermat wrote a letter to Marin Mersenne where he stated that every prime number of the form could be written as the sum of two squares. He claimed to have an irrefutable proof of the statement.
The result was already conjectured by Albert Girard, but the first complete proof was given by Leonhard Euler, who announced it in a letter sent to Christian Goldbach.
Today the theorem is known as “Fermat’s theorem on sums of two squares” or “Fermat’s Christmas Theorem”, because of the date in which Fermat claimed to have the proof.
Detailed historical information can be found in the relevant chapter of Dickinson (1938).
Random thoughts sometimes are nice¶
We’re bored, so we start writing some useless calculations in our notebook. We really like prime numbers (we’ll explain why later in the posts), so we start by writing a few of them:
Since we have nothing better to do, we start asking some questions about them, like:
how many prime numbers are there?
which numbers could be expressed as the product of prime numbers?
We like these questions (and will answer them in the next few posts), but in the process we ask a more subtle one:
When can we write a prime number as the sum of two squares? In other words, when can we write
with and are integers?
We try to approach the problem by trial and error to understand it better.
Consider the prime number . Can we write it as the sum of two squares? Well, there aren’t many ways to write as a sum of two integers:
But since we have
therefore we can indeed write as the sum of two squares.
Let’s try with : the only possible ways of writing as a sum of two numbers are and However and are not squares, so does not have the property.
We move on to the number : we can write it as , but since and are not squares, we have to search for another writing, that we find in , since and .
What about ? Well, we can write as:
, but is not a square;
, but is not a square;
, but neither nor are squares;
, but is not a square. therefore cannot be written as the sum of two squares.
Continuing this process, we find that among the primes in the list above, those that satisfy the property are:
We start to look at them carefully and we conjecture the following fact:
All odd primes that can be written as the sum of two squares have remainder when divided by .
This conjecture tells us nothing about (which is the only even prime number), but we already know that can be written as sum of two squares.
However, this only tells us that if an odd prime is a sum of two squares, then it leaves remainder when divided by . But in general it’s not easy to check whether a prime is the sum of two squares, since we’d have to try many possibilities (look at and imagine larger primes). If we just want to know whether a prime has remainder when divided by , we can compute that quickly and save time.
But maybe we didn’t waste our time thinking about this problem. Since we can easily check what is the remainder of a prime when divided by , what if we can write an odd prime as the sum of two squares each time it has remainder in such a division? That would be great: we could avoid long case checks and simply compute the remainder, like we learned in elementary school. Luckily, the theorem we want to focus on gives us the answer:
Now we see why the theorem is nice: it simplifies a difficult problem (determining whether an odd prime is the sum of two squares) to a simple one (checking whether its remainder is when divided by ).
Some plan for the future¶
I chose to talk about this theorem because, to me, the most interesting part is its proof. As a math student I spend most of my time trying to understand proofs (for me, mathematics is mostly about them).
Maybe some of you are asking yourselves:
What is a mathematical proof?
This isn’t an easy question (it’s rather philosophical). Anyway, we can think of a proof as an argument convincing us about the truth of some proposition. Probably not all the arguments I share will be full formal proofs, since I won’t always be very formal. My goal is to convey the general ideas rather than the technical details. I hope the careful reader will forgive me if I sometimes prefer simplicity to rigor.
The aim is to help interested readers convince themselves of Fermat’s Christmas Theorem and to explain some basic mathematical ideas along the way.
A rough plan for the proof will involve:
talking about general properties of integers
talking about modular arithmetic
talking about Gaussian integers
putting everything together
I hope you enjoy the process as much as I did the first time I learned these beautiful ideas.
See you soon!
- Dickinson, L. J. (1938). History of the Theory of Numbers. Chelsea Publishing Company.