Illustrated · 2 min

Recall that in Z[n]\mathbb{Z}[\sqrt{n}], N(α)=a2−nb2N(\alpha)=a^2-nb^2. What if nn was −1-1, so that we are working in Z[i]\mathbb{Z}[i]? What are the possible norms that an element in Z[i]\mathbb{Z}[i] can have? Well, we know that norms are multiplicative, so let's see which primes can be norms, because we can multiply them to determine if a composite can be a norm.

First, let's state a theorem and its proof:

Minkowski's Convex Body Theorem In an nn-dimensional lattice spanned by the nn vectors

ν1=(k(1,1),k(1,2),⋯ ,k(1,n))ν2=(k(2,1),k(2,2),⋯ ,k(2,n))⋮νn=(k(n,1),k(n,2),⋯ ,k(n,n)),\begin{gather} \nu_1=(k_{(1,1)},k_{(1,2)},\cdots,k_{(1,n)})\\ \nu_2=(k_{(2,1)},k_{(2,2)},\cdots,k_{(2,n)})\\ \vdots\\ \nu_n=(k_{(n,1)},k_{(n,2)},\cdots,k_{(n,n)})\\ \end{gather}, let Δ=∣k(1,1)k(1,2)⋯k(1,n)k(2,1)k(2,2)⋯k(2,n)⋮⋮⋱⋮k(n,1)k(n,2)⋯k(n,n)∣\Delta=\left\lvert\begin{matrix} k_{(1,1)}&k_{(1,2)}&\cdots&k_{(1,n)}\\ k_{(2,1)}&k_{(2,2)}&\cdots&k_{(2,n)}\\ \vdots&\vdots&\ddots&\vdots\\ k_{(n,1)}&k_{(n,2)}&\cdots&k_{(n,n)}\\ \end{matrix}\right\rvert.

Then, if we have a convex region RR symmetric about the origin with volume greater than 2nΔ2^n \Delta, then there exists a non-zero point of the lattice in RR.

Whew. That was a mouthful. Let's try a two-dimensional example to see what this is trying to show.

Let's take the vectors ν1=(1,3)\nu_1=(1,3) and ν2=(4,−1)\nu_2=(4,-1). Then, the lattice looks like so:

Additionally, we have that the green region has area Δ=∣134−1∣\Delta=\left\lvert\begin{matrix}1&3\\4&-1\end{matrix}\right\rvert. Thus, since all of the parallelograms have the same area, the region below has area 22Δ=4Δ2^2\Delta=4\Delta.

Minkowski's theorem states that if we have a convex region symmetric about the origin with area greater than 4Δ4\Delta, then it will have a lattice point other than the origin. That seems reasonable enough. Let's try to prove the general case.

Suppose we have an nn-dimensional lattice spanned by the vectors

ν1=(k(1,1),k(1,2),⋯ ,k(1,n))ν2=(k(2,1),k(2,2),⋯ ,k(2,n))⋮νn=(k(n,1),k(n,2),⋯ ,k(n,n)),\begin{gather} \nu_1=(k_{(1,1)},k_{(1,2)},\cdots,k_{(1,n)})\\ \nu_2=(k_{(2,1)},k_{(2,2)},\cdots,k_{(2,n)})\\ \vdots\\ \nu_n=(k_{(n,1)},k_{(n,2)},\cdots,k_{(n,n)})\\ \end{gather}, and let Δ=∣k(1,1)k(1,2)⋯k(1,n)k(2,1)k(2,2)⋯k(2,n)⋮⋮⋱⋮k(n,1)k(n,2)⋯k(n,n)∣\Delta=\left\lvert\begin{matrix} k_{(1,1)}&k_{(1,2)}&\cdots&k_{(1,n)}\\ k_{(2,1)}&k_{(2,2)}&\cdots&k_{(2,n)}\\ \vdots&\vdots&\ddots&\vdots\\ k_{(n,1)}&k_{(n,2)}&\cdots&k_{(n,n)}\\ \end{matrix}\right\rvert.

Consider the region SS with the area greater than 2nΔ2^n\Delta. Consider the congruence classes {(x1,x2,⋯ ,xn)+2λ1ν1+2λ2ν2+⋯+2λnνn∣λi∈Z}.\{(x_1,x_2,\cdots,x_n)+2\lambda_1\nu_1+2\lambda_2\nu_2+\cdots+2\lambda_n\nu_n\mid\lambda_i\in\mathbb{Z}\}. Then, we know that each point in the region is congruent to a point in the region of area 2nΔ2^n\Delta. By the pidgeonhole principle, since the area of SS is greater than 2nΔ2^n\Delta, there exists two distinct points A,B∈SA,B\in S such that A=(x1,x2,⋯ ,xn)+2α1ν1+2α2ν2+⋯+2αnνnB=(x1,x2,⋯ ,xn)+2β1ν1+2β2ν2+⋯+2βnνn\begin{gather} A=(x_1,x_2,\cdots,x_n)+2\alpha_1\nu_1+2\alpha_2\nu_2+\cdots+2\alpha_n\nu_n\\ B=(x_1,x_2,\cdots,x_n)+2\beta_1\nu_1+2\beta_2\nu_2+\cdots+2\beta_n\nu_n \end{gather} Since SS is symmetric about the origin, we know that −B∈S-B\in S, and then since SS is convex, the midpoint of AA and −B-B is in SS. Thus, A−B2=(α1−β1)ν1+(α2−β2)ν2+⋯+(αn−βn)νn.\dfrac{A-B}{2}=(\alpha_1-\beta_1)\nu_1+(\alpha_2-\beta_2)\nu_2+\cdots+(\alpha_n-\beta_n)\nu_n. Note that since AA and BB are distinct, at least one of (αi−βi)(\alpha_i-\beta_i) is non-zero, so we have found a non-zero lattice point in SS. □\hspace{1cm}\Box

Now let's state and prove Fermat's Christmas Theorem.

Theorem A prime pp is the sum of two squares if and only if p≡1(mod4)p\equiv 1\pmod{4}.


Lemma If p≡1(mod4)p\equiv 1\pmod{4}, then −1-1 is a quadratic residue modulo pp. From the Legendre symbol or Euler's criterion, we know (−1∣p)=(−1)p−12(-1|p)=(-1)^{\frac{p-1}{2}}. In order for (−1∣p)=1(-1|p)=1 to be true, p−12\frac{p-1}{2} must be even. Thus, p−12=2k\frac{p-1}{2}=2k for some kk. Rearranging yields p=4k+1p=4k+1 for some kk. Thus, if p≡1(mod4)p\equiv 1\pmod{4}, then −1-1 is a quadratic residue modulo pp.


Proof By our lemma, we know that there exists uu such that u2=−1(modp)u^2=-1\pmod{p}. Consider the lattice spanned by the vectors (1,u)(1,u) and (0,p)(0,p). Note that every lattice point has a distance that is a multiple of pp from the origin: ∣a(1,u)+b(0,p)∣≡∣(a,au+bp)∣≡a2+a2u2+2abup+b2p2≡0(modp)\begin{align} |a(1,u)+b(0,p)|&\equiv|(a,au+bp)|\\ &\equiv\sqrt{a^2+a^2u^2+2abup+b^2p^2}\\ &\equiv 0\pmod{p} \end{align} Additionally, we have that Δ=∣10up∣=p\Delta=\left\lvert\begin{matrix}1&0\\u&p\end{matrix}\right\rvert=p. Now, consider the set of points (x,y)(x,y) such that 0≤x2+y2<2p0\leq x^2+y^2<2p. This is a convex region symmetric about the origin. We also know that this is a circle with radius 2p\sqrt{2p} and area 2πp2\pi p. Since we know π>2\pi>2, we have 2πp>4p=4Δ2\pi p>4p=4\Delta. Thus, there must exist a point (x,y)(x,y) on the lattice such that p∣x2+y2p\mid x^2+y^2 and 0<x2+y2<2p0<x^2+y^2<2p. However, this means that x2+y2=px^2+y^2=p, which is what we wanted to prove.□\hspace{1cm}\Box

Now you might be thinking, Why did we prove Minkowski's Theorem for nn-dimensions when we only needed it for two dimensions? Well, here, we use it in four dimensions!

Read · 1 min

Q2,P1Q_2, P_1 and P3P_3 : The Definition

So, let's take a look at what Q2,P1Q_2, P_1 and P3P_3 are.

P1P_1 and P3P_3

Well,

P1P_1 is the set of all prime numbers congruent to 11 mod 44.

P3P_3 is the set of all prime numbers congruent to 33 mod 44.

So, what about 22? Well, this only even prime is the only prime not in P1P_1 and P3P_3.

Q2Q_2

So, Q2Q_2 is the set of positive integers that can be written as the sum of two squares of nonnegative integers.

Interactive · 1 question

Q2,P1Q_2, P_1 and P3P_3 : Some Simple Properties

Previous part

In this article, we'll look at the respectively properties of these sets.

P3P_3

We know that the set of primes are infinite. So, how about P3P_3? Is it infinite? How do we prove it?

We'll prove that P3P_3 is in fact, infinite. We argue by contradiction. Suppose not, then let p1<p2<...<pkp_1 < p_2 < ... < p_k be the primes of P3P_3.

What can we say about Q=4p1p2...pk−1Q = 4p_1p_2...p_k - 1?

Choose all correct answers

Interactive · 3 questions

Q2,P1,P3Q_2, P_1, P_3 : Similarities and Differences

Previous part

So, we've introduced three seemingly bizarre sets. Now what? We'll prove two statements in this article. Firstly :

Q2∩P3=∅Q_2 \cap P_3 = \emptyset

Indeed, this is not hard to prove at all.

What are the possible remainders when a square is divided by 44?

Choose all correct answers

Read · 1 min

Q2,P1Q_2, P_1 and P3P_3 : The complete characterization of Q2Q_2

Previous part

In this article, we'll completely characterize which numbers can be written as the sum of two squares and which numbers can't.

We call a number aa square-free if it n2∤an^2 \nmid a for all positive integers n>1n > 1.

Complete Characterization of Q2Q_2

A number nn can be written as the sum of two squares if and only if the exponent of every prime congruent to 33 modulo 44 in the prime factorization of nn is even.

We'll present the proof.

Firstly, suppose that a number nn has the exponent of every prime congruent to 33 modulo 44 in its prime factorization even. Then we claim that it can be written as the sum of two squares.

Let n=s2mn = s^2m, where mm is square-free. Note that mm is the product of primes in P1P_1 or 22. Thus, each prime p>2p > 2 dividing nn is in P1P_1. Now, since P1⊂Q2P_1 \subset Q_2 and the product of two elements in Q2Q_2 is an element of Q2Q_2, nn is in Q2Q_2. (product of s2+02s^2 + 0^2, 12+121^2 + 1^2s, and primes of P1P_1.) (See here if in doubt)

Now, suppose nn is the sum of two squares. Again, let n=s2mn = s^2m, where mm is square-free. If m=1m = 1, then n=s2n = s^2, and the conclusion is obvious. We need to prove that for every odd prime p∣mp \mid m, p∈P1p \in P_1.

Let n=x2+y2n = x^2 + y^2. Let x=dx1,y=dy1x = dx_1, y = dy_1 where d=gcd⁡(x,y)d = \gcd(x, y). Then,

n=d2(x12+x22)⇒s2md2=x12+x22n = d^2(x_1^2 + x_2^2) \Rightarrow \frac{s^2m}{d^2} = x_1^2 + x_2^2.

Since mm is square-free, d2∣s2d^2 \mid s^2. Let s2=td2s^2 = td^2 for some t∈Zt \in \mathbb{Z}.

Then, tm=x12+x22tm = x_1^2 + x_2^2.

Since p∣mp \mid m, p∣x12=x22p \mid x_1^2 = x_2^2. Thus, x12≡−x22(modp)x_1^2 \equiv -x_2^2 \pmod{p}.

Now, we show a useful fact :

If p∈P3p \in P_3 such that p∣x2+y2p \mid x^2 + y^2, then p∣gcd⁡(x,y)p \mid \gcd(x, y). Indeed, applying this into the problem gives that p∈P1p \in P_1, as desired, since gcd⁡(x1,y1)=1\gcd(x_1, y_1) = 1.

It remains to prove the fact :

Indeed, if p∤gcd⁡(x,y)p \nmid \gcd(x, y), then by Fermat's Little Theorem,

1≡xp−1≡(x2)p−12≡(−y2)p−12≡(−1)p−12yp−1≡−1(modp)1 \equiv x^{p - 1} \equiv (x^2)^{\frac{p - 1}{2}} \equiv (-y^2)^{\frac{p - 1}{2}} \equiv (-1)^{\frac{p - 1}{2}}y^{p - 1} \equiv -1 \pmod{p}, since p∈P3p \in P_3. This is a contradiction. Thus, p∣gcd⁡(x,y)p \mid \gcd(x, y).

Back to the original problem, this means that p∈P1p \in P_1. But that is exactly what we wanted to prove. ■\blacksquare.

This should end your worries and doubts on when a number can be written as the sum of two squares.

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems