# Prime elements in the gaussian integers

Prove: If a prime number $p\in \mathbb N$ is from the form $p=4k+3,k\in \mathbb N$, then its also a prime number in $\mathbb Z[i]$,i.e. if $p|(z_1\cdot z_2)$ then $p|z_1$ or $p|z_2$.

I dont have any idea how to solve it, so I am looking for some hints.

• I suppose, and hope, you know some group theory? – Timbuc Nov 9 '14 at 19:18
• Of course I know :) – Marc Nov 9 '14 at 19:19

Let $p\equiv3(mod 4)$ a prime, and suppose that $p=mn$, where $m,n\in\mathbb{Z}[i]$. Then of course $|p|=|m|\cdot|n|$, in other words $$p^2=|m|^2\cdot|n|^2$$Assuming the decomposition is not trivial, one concludes $$|m|=|n|=p,$$and that makes $p$ the sum of two squares, which is impossible by assumption on $p$ (see explanation below).

Thus $p$ is irreducible in $\mathbb{Z}[i]$, and since it is a unique factorization domain, $p$ is prime.

Explanation: As one can verify immediately, for every integer $n$ one of the following holds: $n^2\equiv0(mod 4),$ or $n^2\equiv1(mod 4)$. It follows that the sum of two squares can't be $\equiv3(mod4)$.

• Thanks for the answer! One question: Where are you using that $p=4k+3$? – Marc Nov 9 '14 at 19:42
• @Benjamin In the "which is impossible..." part, of course. That's the hardest part of all this. If you haven't studied this or if you can't assume it, then you're going to need it. – Timbuc Nov 9 '14 at 19:47
• @Benjamin See the edited answer please. – Amitai Yuval Nov 9 '14 at 21:06

Disclaimer: there are other proofs of this, among which one can find a proof with quadratic forms, infinite descent and etc. The following is easier for me.

You must prove that a prime $\;p\;$ is the sum of two squares iff $\;p=1\pmod 4\;$. For this, we first show that $\;-1\;$ is a square $\;\pmod p\iff p=1\pmod 4\;$ :

Let us look at the (cyclic) multiplicative group of the integers modulo $\;p\;$ , i.e. $\;\Bbb F_p^*:=\Bbb F\setminus\{0\}\;$ .

== If $\;x^2=-1\pmod p\;$ has a solution then $\;x^4=1\pmod p\;$ . But we also know (Fermat's Little Theorem) that $\;x^{p-1}=1\pmod p\;$ (since clearly $\;x\neq 0\pmod p\;$ , and from Lagrange's Theorem we get that

$$\;4\mid (p-1)\iff p=1\pmod 4\;$$

The other direction I leave to you (use that a cyclic finite group has one unique subgroup of any order dividing the group's order).

From the above if follows that if $\;p=1\pmod 4\;$ then $\;p\mid m^2+1\;$ for some integer $\;m\;$ (which can also be considered as an element in $\;\Bbb F_p^*\;$ is wanted).

But $\;\;m^2+1=(m-i)(m+i)\;,\;\;i=\sqrt{-1}=\;$ the square root of $\;-1\;$ we proved above to exist. But $\;p\;$ doesn't divide either of $\;m-i\,,\,\,m+i\;$ (why? Look at the imaginary parts and, of course, the fact that the gaussian integers are a Unique Factorization Domain (why?)), so $\;p\;$ cannot be prime in $\;\Bbb Z[i]\;$ , and since the norm on this ring is multiplicative and $\;\mathcal N(p)=p^2\;$ , we must have a factorization in two elements with the same norm:

$$p=(x+iy)(x-iy)=x^2+y^2\;,\;\;\text{and we're done}$$

Now, what the above has to do with your question?? Well, if $\;p\;$ is not a prime $\;=1\pmod 4\;$ then it is not a sum of squares and thus, from the last part of the proof above, it must be prime in $\;Z[i]\;$ as its norm still is the square of a prime in $\;\Bbb Z\;$ !

• It is of great importance, of course, to classify the numbers which are the sum of two squares. However, for this question it is not really necessary (only the easy direction is). You can check the small supplement in my answer if you like. – Amitai Yuval Nov 9 '14 at 21:11