Section13.4Primes as Sum of Squares
One of the many things you may have conjectured about sums of squares is that every prime of the form \(p=4k+1\) can be represented as the sum of two squares. It turns out this is true, and we will spend most of our time proving this. At the end of the chapter, we'll combine it with the observation about primes of the form \(p=4k+3\) to see exactly which numbers can be thus represented.
Subsection13.4.1A useful plot
First, let's look at the following plot on the integer lattice.
As you can see, I am plotting certain points on the circle \(x^2+y^2=n\), with \(n=5\) to begin. I have done some “magic” to turn the square root of \(-1\text{ mod }(n)\) into these points. Before telling you the magic, this graphic will help us get ready to see it.
More precisely, I've used this square root of \(-1\) to create the regularly spaced grid of blue points. You can think about it as a bunch of corners of parallelograms. (Sometimes we generically call things like the set of blue dots a lattice, though we won't need to know that - we will usually use the word lattice only to refer to the integer lattice of the black dots.)
- Assume that \(p\) is our prime and \(k=\left(\frac{p-1}{2}\right)!\) is our square root of negative one.
- The blue points all are of the form \((ak+bp,a)\) for all integers \(a,b\).
- (If you've had linear algebra, this is an example like vectors generated by a basis - except instead of being vectors over \(\mathbb{Q}\) or \(\mathbb{R}\), they are over \(\mathbb{Z}\).)
For one final preliminary, let's define one more thing for any old point \((x,y)\) in the integer lattice (and especially for our blue dots).