2Rings

IB Groups, Rings and Modules

2.6 Gaussian integers

We’ve mentioned the Gaussian integers already.

Definition (Gaussian integers). The Gaussian integers is the subring

Z[i] = {a + bi : a, b ∈ Z} ≤ C.

We have already shown that the norm

N

(

a

+

ib

) =

a

2

+

b

2

is a Euclidean

function for

Z

[

i

]. So

Z

[

i

] is a Euclidean domain, hence principal ideal domain,

hence a unique factorization domain.

Since the units must have norm 1, they are precisely

±

1

, ±i

. What does

factorization in Z[i] look like? What are the primes? We know we are going to

get new primes, i.e. primes that are not integers, while we will lose some other

primes. For example, we have

2 = (1 + i)(1 − i).

So 2 is not irreducible, hence not prime. However, 3 is a prime. We have

N

(3) = 9. So if 3 =

uv

, with

u, v

not units, then 9 =

N

(

u

)

N

(

v

), and neither

N

(

u

) nor

N

(

v

) are 1. So

N

(

u

) =

N

(

v

) = 3. However, 3 =

a

2

+

b

2

has no

solutions with

a, b ∈ Z

. So there is nothing of norm 3. So 3 is irreducible, hence

a prime.

Also, 5 is not prime, since

5 = (1 + 2i)(1 − 2i).

How can we understand which primes stay as primes in the Gaussian integers?

Proposition.

A prime number

p ∈ Z

is prime in

Z

[

i

] if and only if

p 6

=

a

2

+

b

2

for a, b ∈ Z \{0}.

The proof is exactly what we have done so far.

Proof. If p = a

2

+ b

2

, then p = (a + ib)(a − ib). So p is not irreducible.

Now suppose

p

=

uv

, with

u, v

not units. Taking norms, we get

p

2

=

N

(

u

)

N

(

v

). So if

u

and

v

are not units, then

N

(

u

) =

N

(

v

) =

p

. Writing

u = a + ib, then this says a

2

+ b

2

= p.

So what we have to do is to understand when a prime

p

can be written as a

sum of two squares. We will need the following helpful lemma:

Lemma.

Let

p

be a prime number. Let

F

p

=

Z/pZ

be the field with

p

elements.

Let

F

×

p

=

F

p

\{

0

}

be the group of invertible elements under multiplication. Then

F

×

p

∼

=

C

p−1

.

Proof.

Certainly

F

×

p

has order

p −

1, and is abelian. We know from the classifi-

cation of finite abelian groups that if

F

×

p

is not cyclic, then it must contain a

subgroup

C

m

×C

m

for

m >

1 (we can write it as

C

d

×C

d

0

×···

, and that

d

0

| d

.

So C

d

has a subgroup isomorphic to C

d

0

).

We consider the polynomial

X

m

−

1

∈ F

p

[

x

], which is a UFD. At best, this

factors into

m

linear factors. So

X

m

−

1 has at most

m

distinct roots. But if

C

m

× C

m

≤ F

×

p

, then we can find

m

2

elements of order diving

m

. So there are

m

2

elements of

F

p

which are roots of

X

m

−

1. This is a contradiction. So

F

×

p

is

cyclic.

This is a funny proof, since we have not found any element that has order

p − 1.

Proposition. The primes in Z[i] are, up to associates,

(i) Prime numbers p ∈ Z ≤ Z[i] such that p ≡ 3 (mod 4).

(ii)

Gaussian integers

z ∈ Z

[

i

] with

N

(

z

) =

z¯z

=

p

for some prime

p

such that

p = 2 or p ≡ 1 (mod 4).

Proof.

We first show these are primes. If

p ≡

3 (

mod

4), then

p 6

=

a

2

+

b

2

, since

a square number mod 4 is always 0 or 1. So these are primes in Z[i].

On the other hand, if

N

(

z

) =

p

, and

z

=

uv

, then

N

(

u

)

N

(

v

) =

p

. So

N

(

u

)

is 1 or

N

(

v

) is 1. So

u

or

v

is a unit. Note that we did not use the condition

that p 6≡ 3 (mod 4). This is not needed, since N(z) is always a sum of squares,

and hence N (z) cannot be a prime that is 3 mod 4.

Now let

z ∈ Z

[

i

] be irreducible, hence prime. Then

¯z

is also irreducible. So

N

(

z

) =

z¯z

is a factorization of

N

(

z

) into irreducibles. Let

p ∈ Z

be an ordinary

prime number dividing N (z), which exists since N(z) 6= 1.

Now if

p ≡

3 (

mod

4), then

p

itself is prime in

Z

[

i

] by the first part of the

proof. So

p | N

(

z

) =

z¯z

. So

p | z

or

p | ¯z

. Note that if

p | ¯z

, then

p | z

by taking

complex conjugates. So we get

p | z

. Since both

p

and

z

are both irreducible,

they must be equal up to associates.

Otherwise, we get

p

= 2 or

p ≡

1 (

mod

4). If

p ≡

1 (

mod

4), then

p −

1 = 4

k

for some

k ∈ Z

. As

F

×

p

∼

=

C

p−1

=

C

4k

, there is a unique element of order 2 (this

is true for any cyclic group of order 4

k

— think

Z/

4

kZ

). This must be [

−

1]

∈ F

p

.

Now let a ∈ F

×

p

be an element of order 4. Then a

2

has order 2. So [a

2

] = [−1].

This is a complicated way of saying we can find an

a

such that

p | a

2

+ 1.

Thus

p |

(

a

+

i

)(

a − i

). In the case where

p

= 2, we know by checking directly

that 2 = (1 + i)(1 − i).

In either case, we deduce that

p

(or 2) is not prime (hence irreducible),

since it clearly does not divide

a ± i

(or 1

± i

). So we can write

p

=

z

1

z

2

, for

z

1

, z

2

∈ Z[i] not units. Now we get

p

2

= N(p) = N(z

1

)N(z

2

).

As the

z

i

are not units, we know

N

(

z

1

) =

N

(

z

2

) =

p

. By definition, this means

p = z

1

¯z

1

= z

2

¯z

2

. But also p = z

1

z

2

. So we must have ¯z

1

= z

2

.

Finally, we have

p

=

z

1

¯z

1

| N

(

z

) =

z¯z

. All these

z

,

z

i

are irreducible. So

z

must be an associate of z

1

(or maybe ¯z

1

). So in particular N(z) = p.

Corollary.

An integer

n ∈ Z

≥0

may be written as

x

2

+

y

2

(as the sum of two

squares) if and only if “when we write

n

=

p

n

1

1

p

n

2

2

···p

n

k

k

as a product as distinct

primes, then p

i

≡ 3 (mod 4) implies n

i

is even”.

We have proved this in the case when n is a prime.

Proof. If n = x

2

+ y

2

, then we have

n = (x + iy)(x − iy) = N (x + iy).

Let

z

=

x

+

iy

. So we can write

z

=

α

1

···α

q

as a product of irreducibles in

Z

[

i

].

By the proposition, each

α

i

is either

α

i

=

p

(a genuine prime number with

p ≡

3

(

mod

4)), or

N

(

α

i

) =

p

is a prime number which is either 2 or

≡

1 (

mod

4). We

now take the norm to obtain

N = x

2

+ y

2

= N(z) = N(α

1

)N(α

2

) ···N(α

q

).

Now each

N

(

α

i

) is either

p

2

with

p ≡

3 (

mod

4), or is just

p

for

p

= 2 or

p ≡

1

(

mod

4). So if

p

m

is the largest power of

p

divides

n

, we find that

n

must be

even if p ≡ 3 (mod 4).

Conversely, let

n

=

p

n

1

1

p

n

2

2

···p

n

k

k

be a product of distinct primes. Now for

each p

i

, either p

i

≡ 3 (mod 4), and n

i

is even, in which case

p

n

i

i

= (p

2

i

)

n

i

/2

= N(p

n

i

/2

i

);

or

p

i

= 2 or

p

i

≡

1 (

mod

4), in which case, the above proof shows that

p

i

=

N

(

α

i

)

for some α

i

. So p

n

i

= N(α

n

i

).

Since the norm is multiplicative, we can write

n

as the norm of some

z ∈ Z

[

i

].

So

n = N(z) = N(x + iy) = x

2

+ y

2

,

as required.

Example.

We know 65 = 5

×

13. Since 5

,

13

≡

1 (

mod

4), it is a sum of squares.

Moreover, the proof tells us how to find 65 as the sum of squares. We have to

factor 5 and 13 in Z[i]. We have

5 = (2 + i)(2 − i)

13 = (2 + 3i)(2 − 3i).

So we know

65 = N(2 + i)N(2 + 3i) = N((2 + i)(2 + 3i)) = N(1 + 8i) = 1

2

+ 8

2

.

But there is a choice here. We had to pick which factor is

α

and which is

¯α

. So

we can also write

65 = N((2 + i)(2 − 3i)) = N (7 − 4i) = 7

2

+ 4

2

.

So not only are we able to write them as sum of squares, but this also gives us

many ways of writing 65 as a sum of squares.