<<

DEGREE PROJECT IN TECHNOLOGY, FIRST CYCLE, 15 CREDITS STOCKHOLM, SWEDEN 2021

Gaussian and Other Quadratic Rings

ERIK LANDIN

SEIF HUSSEIN

KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ENGINEERING SCIENCES Abstract This thesis deals with rings, in particular the Gaus- sian integers Z[i]. Concepts such as quadratic extensions, Euclidean do- mains and unique domains will be introduced to the reader. The goal of this thesis is to show how a natural generalization of the integers Z, in the form of the Gaussian integers, can be used to prove important results in Z. Furthermore, it aims to explore other types of quadratic integer rings and their differences. The first two sections will introduce the Gaussian integers, integral do- mains and norms. In the third section the irreducible elements of the Gaussian integers are categorized. The fourth and fifth sections talk about general quadratic integer rings and their norms. Section six and seven cat- egorizes the prime elements and introduces unique factorization domains.

Sammanfattning Den h¨aruppsatsen avser kvadratiska heltalsringar, och s¨arskiltde Gaussiska heltalen Z[i]. Koncept som kvadratiska utvidgningar, Euklidisk dom¨anoch unik faktoriseringsdom¨anintroduceras till l¨asaren.M˚aletmed uppsatsen ¨aratt visa hur en naturlig generalisering av heltalen Z, i form av de Gaussiska heltalen, kan anv¨andasf¨oratt bevisa viktiga resultat i Z. Dessutom avser den att utforska olika typer av kvadratiska heltalsringar och deras skillnader. De tv˚af¨orstasektionerna kommer att introducera de Gaussiska heltalen, heltalsdom¨aneroch normer. I den tredje sektionen kategoriseras de irre- ducibla elementen hos de Gaussiska heltalen. Den fj¨ardeoch femte sektio- nen n¨amnerallm¨anakvadratiska heltalsringar och deras normer. Sektion sex och sju kategoriserar primtalselement och introducerar begreppet unik faktoriseringsdom¨an.

1 Acknowledgements We would like to thank our supervisor Roy Skjelnes for the guidance and help that he has offered us in writing this thesis.

2 Contents

1 Introducing complex and the Gaussian integers 4 1.1 Identifying the Gaussian integers with matrices ...... 4 1.2 Gaussian integers as a ...... 5 1.3 Inverse ...... 6 1.4 Gaussian integers as an ...... 7

2 Norm of the Gaussian integers 8 2.1 Units of the Gaussian integers ...... 8

3 Irreducible elements of the Gaussian integers 9

4 Quadratic extensions 13 4.1 Integral closure of a ...... 13 4.2 Integral elements of a quadratic extension ...... 13

5 Norm of quadratic integer rings 16 5.1 The field norm ...... 16 5.2 Units of quadratic integer rings ...... 18

6 Euclidean domains 21 6.1 Gaussian integers as a ...... 21 6.2 Prime elements ...... 22

7 Principal domains and unique factorization domains 23 7.1 domains ...... 23 7.2 Unique factorization domains ...... 23 7.3 Integers D that result in a UFD ...... 25

3 1 Introducing complex numbers and the Gaus- sian integers

The complex numbers, C, is defined as the set numbers of the form a+bi, where a and b are real numbers. They have (a+bi)+(c+di) = (a+c)+(b+d)i and (a + bi)(c + di) = (ac − bd) + (ad + bc)i. The Gaussian integers Z[i] are the integer lattice of the complex numbers a+bi, meaning a and b are integers.

Figure 1.1: The integer lattice Z[i].

1.1 Identifying the Gaussian integers with matrices We will begin by looking at the subset of real 2 × 2-matrices of the form a −b . b a This subset is certainly closed under addition. Also under multiplication since a −b c −d ac − bd −(ad + bc) = . Multiplication is moreover com- b a d c ad + bc ac − bd ac − bd −(ad + bc) c −d a −b mutative since = . Call this subset ad + bc ac − bd d c b a R2×2, we will show that it can be identified with C. To show this we need a bijection φ between R2×2 and C. a −b Let φ: −→ be the function that sends z = a + bi to the matrix . C R2×2 b a To show it is bijective, we note that φ(a + bi) = φ(c + di) corresponds to an a −b c −d equality between matrices = . So it is injective and for each b a d c

4 a −b we can find a corresponding element in , simply choose a + bi. We b a C also need it to preserve the two operations. To show this note that,

a + c −(b + d) φ((a + bi) + (c + di)) = = φ(a + bi) + φ(c + di) b + d a + c meaning it is preserves addition. Also note that,

ac − bd −(ad + bc) φ((a + bi)(c + di)) = φ((ac − bd) + (ad + bc)i) = ad + bc ac + bd a −b c −d = = φ(a + bi)φ(c + di) b a d c therefore also preserving multiplication. We now have an isomorphism between R2×2 and C. Hence, results for these matrices when a and b are integers will also apply to the Gaussian integers.

1.2 Gaussian integers as a ring We will now present the algebraic structure known as a ring. Definition 1.1. A ring R is a nonempty set where we require R to have two binary operations [+, ·], which we will refer to as addition and multiplication respectively. Those binary operations must fulfill the following conditions:

• Commutativity with respect to addition meaning a+b = b+a for a, b ∈ R. • Associativity with respect to addition, meaning (a + b) + c = a + (b + c) for a, b, c ∈ R.

• Associativity with respect to multiplication, meaning (ab)c = a(bc) for a, b, c ∈ R.

• The existence of an element 0 such that a + 0 = 0 + a = a for all a ∈ R, and 1 ∈ R.

• An additive inverse, meaning for every element a ∈ R, there exists an element −a in R such that a + (−a) = 0.

• Two-sided distributivity with respect to multiplication, meaning for any a, b, c ∈ R a(b + c) = ab + ac (a + b)c = ac + bc

Any subset of a ring that fulfills these conditions is called a subring. If the multiplication operation is also commutative, a · b = b · a for all a, b ∈ R, the ring is said to be a . An element u of R is called a in R if there is some v in R such that vu = 1 and uv = 1.

5 Example. The Gaussian integers is a commutative ring. The integer lattice Z[i] is clearly an under addition. As for multiplication it is com- mutative since C is commutative and Z[i] is a subring of C and it is associative since ((a+bi)(c+di))(e+fi) = (a+bi)((c+di)(e+fi)). We also have distribu- tivity since (a+bi)((c+e)+(d+f)i) = a((c+e)+(d+f)i)+b((c+e)i−(d+f)) = (a + bi)(c + di) + (a + bi)(e + fi). Therefore, the criteria for Z[i] to be a com- mutative ring are fulfilled.

1.3 Inverse Investigating the in the complex plane. We may assume a−bi that not both a and b in a+bi are zero. Looking at the product (a+bi) a2+b2 = 1, a−bi we conclude that the multiplicative inverse in C is a2+b2 . In Z[i] each element a−bi will not always have an inverse since a2+b2 is not always a .

6 1.4 Gaussian integers as an Integral domain Here we introduce the concept of an Integral domain. Definition 1.2. An Integral domain is a commutative ring R such that ab 6= 0 for all nonzero a, b ∈ R.

Example. We have shown that the Gaussian integers are a commutative ring. a −b Since the Gaussian integers are isomorphic to and the determinant b a of this matrix is a2 + b2, then the determinant is greater than zero as long as a, b 6= 0. It follows that the product of two matrices of this type has a determinant greater than zero since the determinant is multiplicative, meaning the Gaussian integers make up an integral domain. Definition 1.3. Let R be an integral domain.

• Suppose r ∈ R is nonzero and is not a unit. Then r is called irreducible in R if whenever r = ab with a, b ∈ R, at least one of a or b must be a unit in R. Otherwise, r is said to be reducible.

• A nonzero element p is a prime if it is not a unit and whenever p divides ab for any a, b ∈ R, then either p divides a or p divides b. If r ∈ R and r = ab where a, b ∈ R and a is a unit, then we say that r is equal to b up to associates.

7 2 Norm of the Gaussian integers

This section will introduce a norm on the Gaussian integers.

Definition 2.1. A function N : R −→ N is a norm on the integral domain R. If N(a) > 0 for a 6= 0 then define N to be a positive norm.

Let N : Z[i] −→ N be N(a + bi) = a2 + b2. Then N is a positive norm on the Gaussian integers a2 + b2 > 0 if not a, b = 0. This is the same thing a −b as taking the determinant of the corresponding matrix of the form , b a a −b since det( ) = a2 + b2. Letz ¯ denote the complex conjugate of z, that is b a z¯ = a +¯ bi = a−bi, then we also have that N(z) = z·z¯ = (a+bi)(a−bi) = a2+b2.

Note that the norm is multiplicative since det(AB) = det(A) det(B), where A, B are matrices. So for zw we have N(zw) = (zw)zw = zzw¯ w¯ = N(z)N(w). An- other property of the defined norm is that if a divides b then N(a) divides N(b). This can be shown by first assuming a = p + qi divides b = u + wi. We then get that N(a) = (p+qi)(p−qi) = a(p−qi) and N(b) = (u+wi)(u−wi) = b(u−wi) so N(a) clearly divides N(b) if a divides b.

2.1 Units of the Gaussian integers Since the norm of a Gaussian integer is the sum of two squares, we have that N(z) ≥ 1 when z is nonzero. We can now use the norm to see that {1, i, −1, −i} are all the units in Z[i]. Let I be the identity matrix. Since det(I) = det(AA−1) = det(A) det(A−1) we have that the inverse of a Gaus- sian integer has a norm smaller than 1 unless both the Gaussian integer and its inverse have the norm 1. Since the Gaussian integers with norm 1 are {1, i, −1, −i}, we have that these are exactly the units in Z[i].

8 3 Irreducible elements of the Gaussian integers

Our goal in this section is to categorize the irreducible elements of the Gaussian integers. We will do this through a series of lemmas leading up to a theorem, this section is mostly based on [1].

The following results will hold under the assumption that the Gaussian inte- gers have unique factorization. This is, however, not proven until Section 7 and the reason is that unique factorization follows from a general result, where we will prove that a specific class of rings always have this property. As the theorem in this section is central for the Gaussian integers specifically, we will continue under the assumption that factorization is unique. Example. The element 2 = (1 + i)(1 − i) is not irreducible since (1 + i) and (1 − i) are not units. Lemma 3.1. A Gaussian integer whose norm is a prime integer is irreducible and the conjugate of that Gaussian integer is also irreducible. Proof. Assume that the norm of a Gaussian integer a+bi is a prime integer p and that a+bi = (c+di)(e+fi). Then we have that N(a+bi) = N(c+di)N(e+fi) = p. Since p is irreducible, then N(c + di) = 1 or N(e + fi) = 1. Since the only Gaussian integers with norm 1 are the units, then any Gaussian integer with a norm that is prime is irreducible. This also means that the conjugate a − bi is irreducible, since their norms are equal.  Example. We have that 5 = 4 + 1 = (2 + i)(2 − i) = N(2 + i) so 2 + i is an irreducible element in the Gaussian integers. Lemma 3.2. If a Gaussian integer is irreducible then it either has norm p or p2 where p is a prime integer. Proof. Assume that a Gaussian integer a + bi is irreducible, we then get that N(a + bi) = (a + bi)(a − bi) = a2 + b2 where a2 + b2 is an integer. This integer can then be factored into prime integers. Since factorization is unique in the Gaussian integers, here we use the fact the Gaussian integers are a UFD, and the integers are a subset of the Gaussian integers. So a2 + b2 factors into at most 2 factors, since if we could factor it into say 3 primes, then that would contradict factorization being unique. Therefore, a2 + b2 can be factored into at most 2 primes. This means (a + bi)(a − bi) is either a prime integer or the product of 2 primes. Assume now (a + bi)(a − bi) = p1p2 where p1 and p2 are prime. Then if a + bi is associate to p1 meaning a + bi = ±p1 or ±ip1,(a − bi) 2 is also associate to p1. So p1 = p2 and (a + bi)(a − bi) = p1. So we have that if 2 a Gaussian integer is irreducible then it either has norm p or p .  Lemma 3.3. A prime integer p is reducible in the Gaussian integers if and only if it is a sum of squares, that is, p = a2 + b2 where a and b are integers.

9 Proof. Assume that a prime p is reducible in the Gaussian integers, that is, p = (a + bi)(c + di) where a, b, c and d are integers. Then N(p) = N(a + bi)N(c + di) = p2, if N(a + bi) = p2 then p is irreducible since N(c + di) = 1 meaning c + di is a unit, so a + bi = p up to associates. In the case of N(a + bi) = N(c + di) = p then c + di = a − bi up to associates because N(a + bi) = a2 + b2 = (a + bi)(a − bi). Since they have norm p, a + bi and a − bi are irreducible. Under our assumption that unique factorization is present, them being irreducible also means the factorization is unique. This means p is reducible into exactly two irreducible Gaussian integers if and only 2 2 if p = a + b where a and b are integers.  Example. For the case of N(a + bi) = p2 we can consider a + bi = 3 and we have N(3) = 32 = 9 where 3 is irreducible in the Gaussian integers. For the case of N(a + bi) = N(c + di) = p we can consider again N(2 + i) = (2 + i)(2 − i) = 5 where 2 + i and 2 − i are both irreducible in the Gaussian integers. Lemma 3.4. A prime integer can only be a sum of squares if it is 2 or congruent to 1 modulo 4.

Proof. For any integer a we have that a2 is congruent to 0 or 1 mod 4. In the case that it is even (2n)2 = 4n2 which is congruent to 0 mod 4. If odd then (2n + 1)2 = 4(n2 + n) + 1 which is congruent to 1 mod 4. So the sum of two squares can only be congruent to 0, 1 or 2 mod 4. But no prime is congruent to 0 mod 4 and the only one congruent to 2 mod 4 is 2.  Now the last thing needed for the theorem is that p can not be irreducible in Z[i] if p is congruent to 1 mod 4. To prove this we need to following lemma, which is closely based on Lemma 17 in [1]. Lemma 3.5. (Chapter 8, Lemma 17 in [1]). A prime integer p divides an integer of the form n2 +1 if and only if p is either 2 or is an odd prime congruent to 1 mod 4. Proof. For the case where p = 2 we have that 2 divides 12 +1. For the other case we first note that p dividing n2 + 1 is equivalent to n2 = −1 in the multiplica- ∗ tive group Zp, which consists of integers modulo p. Meaning n is an element of ∗ ∗ 4 in Zp. By Lagrange’s theorem, if Zp has an element of order 4 then that element generates a subgroup of 4 elements and the total of elements in the group is divisible by 4. Meaning we have that 4 divides p − 1 so p is congruent to 1 modulo 4.

∗ Now to prove the other direction. Assume that 4 divides p−1. First we show Zp has a unique element of order 2. Assume that m 6= 1, then if m2 is congruent to 1 mod p, then p divides m2 −1 = (m−1)(m+1). Meaning p divides either m−1 or m + 1. Also p dividing m − 1 is equivalent to m being congruent to 1 mod p which means in this case the residue class of m is an element of order 1. In the second case, p dividing m + 1 is equivalent to m being congruent to −1 mod p. ∗ In the latter case, we have that −1 is the unique element of order 2. Since Zp

10 is Abelian the subgroup {1, −1} is normal. Meaning we have the natural ho- ∗ ∗ ∗ p−1 momorphism Zp −→ Zp/{1, −1}. The number of elements of Zp/{1, −1} is 2 which is even, due to us assuming that 4 divides p − 1. Then it must contain an element of order 2, that element then generates a subgroup of 2 elements. The ∗ preimage of that subgroup must then be a subgroup of Zp with 4 elements. We ∗ already saw that Zp only has one unique element of order 2. The only group of 4 elements with only 1 element of order 2 is the cyclic group, it has to have an element of order 4. We have that p dividing n2 + 1 is equivalent to n2 = −1 in ∗ ∗ 2 ∗ Zp. We have an element of order 4 in Zp so we have n = −1 in Zp.  With the use of Lemma 3.1 through 3.5, we are now ready to formulate and prove the following theorem.

Theorem 3.6. (Chapter 8, Proposition 18, in [1]) Let a, b, p ∈ Z, where p is prime. Then p is the sum of two integer squares, p = a2 +b2 if and only if p = 2 or p is congruent to 1 mod 4. Except for interchanging a and b or changing signs of a and b, The representation of p as a sum of squares is unique.

The irreducible elements of the Gaussian integers Z[i] are as follows, • 1 + i. Having the norm 2. • p congruent to 3 mod 4. These elements have, furthermore, the norm p2.

• a + bi, a − bi that are the distinct irreducible factors of the prime integer p = a2 +b2 = (a+bi)(a−bi) with p congruent to 1 mod 4. These elements have, furthermore, the norm p. Proof. By Lemma 3.5 we have that an integer prime p is congruent to 1 mod 4 if and only if it divides n2 + 1 for some integer n. This means p also divides (n + i)(n − i) in Z[i]. If p were irreducible in Z[i] it would need to divide either of these factors, but since p is a it would divide both n + i and its complex conjugate. Therefore, it would also divide their difference 2i. Which it cannot since p is congruent to 1 mod 4. This then means that p is reducible in the Gaussian integers and can, by Lemma 3.3, be written as a sum of squares. Since it is a sum of squares we have that p = a2 + b2 = N(a + bi). So by Lemma 3.1 we have that the Gaussian integer a + bi and its complex conjugate are both irreducible.

The integer prime 2 is a sum of squares 2 = 12 + 12. So by Lemma 3.3 it is reducible and by Lemma 3.1 those factors will be irreducible. We saw in the first example that those factors are 1 + i and 1 − i.

By Lemma 3.4, an integer prime p cannot be a sum of squares if it is con- gruent to 3 mod 4. So then by Lemma 3.3 p is irreducible in the Gaussian integers.

By Lemma 3.2, any Gaussian integer that is irreducible either has norm p2

11 or p. Since it can only have norm p if p is congruent to 1 mod 4 and norm p2 if p congruent to 3 mod 4 we have that these are all the irreducible elements. 

12 4 Quadratic extensions

Here√ we will discuss degree two extensions of the rational numbers√ Q. For D ∈ Z and D/∈ Z, we will√ specifically look at the integers√ of Q( D). Elements in the quadratic field Q( D) are of the form a + b D, where a, b ∈ Q. An important theorem about the integral elements of these quadratic fields will be proven at the end of this section. This section is mostly based on [1].

4.1 Integral closure of a subring Definition 4.1. Suppose R is a subring of the commutative ring S with a nonzero multiplicative identity in R, 1 = 1s ∈ R.

• An element s ∈ S is an integral over R if s is the root of a in the set of polynomials with coefficients in R.

• The ring S is an integral extension of R or just integral over R if every s ∈ S is integral over R.

• The integral closure of R in S is the set of elements of S that are integral over R.

• The ring R is said to be integrally closed in S if R is equal to its integral closure in S.

Example. The Gaussian integers are integrally closed in Q(i). The element 1 + i in the Gaussian integers is integral over Q since it is a root of x2 − 2x + 2.

4.2 Integral elements of a quadratic extension

Definition 4.2. Let K be an extension field of Q, that is K is a field containing the subfield Q. A field is a commutative ring where every non-zero element is a unit.

• An element α ∈ K is called an if α is an integral over Z, i.e., if α is the root of some monic polynomial with coefficients in Z • The integral closure of Z in K is called the of K, and is denoted by OK √ Theorem 4.1. Given a quadratic extension Q( D) of Q, the algebraic elements of this extension are known as the ring of quadratic integers Z[ω] = {a+bω|a, b ∈ and Z (√ D, if D is congruent to 2, 3 mod 4. √ ω = 1+ D 2 , if D is congruent to 1 mod 4. √ Proof. Let K be a quadratic√ extension of Q, then K = Q( D) for some square free integer D. Let α = a + b D with a, b ∈ Q. Taking the minimal polynomial of α we get x2 − 2ax + (a2 − b2D). Since the minimal polynomial is in Z[x],

13 we have that 2a and a2 − b2D are elements of Z. Then (2a)2 − (2b)2D is also an integer meaning 4b2D is also an integer and since D is square free it means x y that 2b also has to be an integer. Let a = 2 and b = 2 , where x, y ∈ Z meaning a, b ∈ Q. Since a2 − b2D is an integer, we have that x2 − y2D is congruent to 0 mod 4. Since D is not divisible by 4 and the only squares mod 4 are {0, 1}, the only possibilities are the following:

• D is congruent to 2 or 3 mod 4 and x, y are both even • D is congruent to 1 mod 4 and x, y are both even or both odd. √ √ In the first case: a, b ∈ and in the second case a + b D = x + y D = √ Z 2 2 x−y 1+ D 2 + y 2 . This is what we stated.  √ √ The reason we look at the integral closure and not just the ring Z[ D] = a+b D is that we want to be able to factor any proper ideal into prime ideals and this requires the ring to be integrally closed. This is not something we will talk more about later, it is just here as motivation.

The choice of D affects the lattice structure in the plane, we will present some examples of how this might look. √ Example. Choosing D = −5 we get the quadratic integer ring Z[ −5], since −5 is congruent to 3 mod 4.

√ Figure 4.1: Integer lattice of Z[ −5] .

Note that the lattice is not necessarily rectangular. One case of a triangular lattice is the Eisenstein integers.

14 Example. Choosing D =√ −3 we get the Eisenstein integers which is the 1+ −3 quadratic integer ring Z[ 2 ], since −3 is congruent to 1 mod 4.

Figure 4.2: lattice.

When looking at integer rings with D > 0, there is not an√ obvious way√ for a 1+ 5 1+ 5 lattice representation. Consider D = 5, which yields Z[ 2 ], where 2 = ϕ is known as the . An element a + bϕ belongs to the real numbers, so how do we represent this as a lattice? One way is to look at the norm in Z[ϕ]. In the following section we will look closer at the norm in general quadratic integer rings and answer this question.

15 5 Norm of quadratic integer rings

We will now look at a few concepts discussed earlier to do with Gaussian integers, but now for general quadratic integer rings.

5.1 The field norm

For a general quadratic integer ring Z[ω] we define the field norm N as a map Z[ω] −→ Z satisfying ( a2 − Db2, if D is congruent to 2 or 3 mod 4. N(a+bω) = (a+bω)(a+bω) = 2 1−D 2 a + ab + 4 b , if D is congruent to 1 mod 4. where ( √ − D, if D is congruent to 2 or 3 mod 4. √ ω = 1− D 2 , if D is congruent to 1 mod 4. Take any two elements α, β ∈ Z[ω] where α = a + bω and β = c + dω. We have that N(α)N(β) = ((a+bω)(a+bω))((c+dω)(c+dω)) = ((a+bω)(c+dω))((a+ bω)(c + dω)) = N(αβ). This means the norm is multiplicative.

Proposition 5.1. If D < 0 then the field norm is a norm.

2 2 2 1−D 2 Proof. If D < 0 we have that a − Db ≥ 0 and a + ab + 4 b ≥ 0 so it is a norm.  If D > 0 we have to take the of the field norm for it to be a norm.

16 Example. Looking again at D = 5 and Z[ϕ], we conclude that the norm of an element a + bϕ is N(a + bϕ) = a2 + ab − b2. Note that a2 + ab − b2 = b (a + bϕ)(a − ϕ ), so one way to represent Z[ϕ] as a lattice is to define the b coordinate transformation a + bϕ 7→ (a + bϕ, a − ϕ ).

Figure 5.1: Lattice of Z[ϕ].

Since this kind of coordinate transformation is closely related to the norm of the integer ring, there should also be a clear way to represent units in this lattice. We will see this in the next section, as well as how the cases of quadratic integer rings with D > 0 and D < 0 differ in terms of units.

17 5.2 Units of quadratic integer rings Proposition 5.2. An element α of a quadratic integer ring having the field norm N(α) = ±1 is equivalent to it being a unit.

Proof. Assume α ∈ Z[ω] has field norm N(α) = ±1. Then we have that the inverse of α = a + bω is α−1 = ±(a + bω) since N(α) = N(a + bω) = ±(a + bω)(a + bω) = ±1, where a + bω is also an element of Z[ω] so α is a unit. Now assume α is a unit so αβ = 1 for some β ∈ Z[ω]. Then since the field norm is multiplicative we have that N(α)N(β) = N(αβ) = 1. Now since both N(α) and N(β) are integers we must have that N(α),N(β) = ±1.  Proposition 5.3. In the cases where D < 0 we have that the units of Z[ω] are ±1 unless D = −1 or D = −3. If D = −1 then the units are {1, i, −1, −i}. If D = −3 then the units are {en2π/6} where n ∈ {1, 2, 3, 4, 5, 6}. That is √ 2 −1 3 {±1, ±δ, ±δ , } where δ = 2 + i 2 Proof. The case where D = −1 we already saw in Section 2. √ 1+ −3 2 2 1 When D = −3 we have α ∈ Z[ 2 ]. So N(α) = a + ab + b = 4 (2a + 2 b2 2 2 b) + 3 4 = 1 which is equivalent to the condition (2a + b) + 3b = 4. This means b can be ±1 or 0. If b = 0 we can have a = ±1. If b = −1 we can have a = 0 or a =√ 2. If b = 1 we can have a = 0 or a = −1. Inserting these values 1+ −3 into a + b 2 gives the units.

For any other values of D < 0 we have one of two cases, either D is congruent to 2 or 3 mod 4 or it is congruent√ to 1 mod 4. If D is congruent to 2 or 3 mod 4 then we have that α ∈ Z[ω] = Z[ D] and N(α) = a2 − b2D = 1. Since D ≤ −2 we have that a2 − b2D ≥ a2 + 2b2 = 1. So for any value of D we have that b = 0 and then we must have that√a = ±1 which is what was stated. If D is congruent 1+ D 2 1−D 2 to 1 mod 4 α ∈ Z[ω] = Z[ 2 ] and N(α) = a +ab+ 4 b = 1. Since D ≤ −7 2 1−D 2 1 2 b2D 1 2 b2 we have that a + ab + 4 b = 4 (2a + b) − 4 ≥ 4 (2a + b) + 7 4 = 1. So for any value of D we need to have b = 0 and therefore we get that a = ±1 which is what was stated.  Proposition 5.4. (Theorem 13.9.9 in [2]). In the case where D > 0 there is an infinite amount of units.

Proof. See Theorem 13.9.9 in [2]. 

18 Example. To find the units in Z[ϕ] we can consider our previous lattice rep- b resentation given by the coordinate transformation a + bϕ 7→ (a + bϕ, a − ϕ ). b Since the product (a + bϕ)(a − ϕ ) gives the norm as previously stated, we can b examine the intersections of the level curves (a + bϕ)(a − ϕ ) = ±1 with points on the lattice. Plotting these curves generates the following intersections

b Figure 5.2: Intersections of level curves (a + bϕ)(a − ϕ ) = ±1 in the lattice of Z[ϕ].

We can see that there’s a few points which correspond to units, so what are these 2 2 1 points? First, note that N(ϕ) = 0 − 1 + 0 = −1 and N( ϕ ) = N(ϕ − 1) = (−1)2 −12 −1 = −1 so these two elements are clearly units. Using the multiplic- n Qn n n ity of the norm we can conclude that N(ϕ ) = i=1 N(ϕ) = N(ϕ) = (−1) 1 1 n n and in the same way for ϕ we get N( ϕ ) = (−1) . n n We can use a recurrence relation to find ϕ , let ϕ = αnϕ + βn which in turn n+1 2 gives that ϕ = αnϕ + βnϕ = αn(ϕ + 1) + βnϕ = (αn + βn)ϕ + αn = αn+1ϕ + βn+1. So αn+1 = αn + βn and βn+1 = αn =⇒ αn+1 = αn + αn−1. (ϕ)n−(−ϕ)−n This is the Fibonacci-sequence, so ϕn = F ϕ + F , where F = √ n n−1 n 5

1 n −n −1 −(n+1) −2 −1 For ( ϕ ) we let ϕ = σnϕ + γn. We then get ϕ = σnϕ + γnϕ = −1 −1 −1 σn(1 − ϕ ) + γnϕ = (γn − σn)ϕ + σn. So σn+1 = γn − σn and γn+1 = σn, −n −1 −1 meaning σn+1 = σn−1 − σn. We have ϕ = σnϕ + σn−1 so with ϕ = −1 σ1ϕ +σ0 our initial conditions are σ1 = 1 and σ0 = 0 which gives the solution (ϕ)−n−(−ϕ)n (ϕ)−n−(−ϕ)n of the recurrence relation to be σ = √ . Note that √ = n 5 5 (ϕ)n−(−ϕ)−n (−1)n+1 √ = (−1)n+1F , so ϕ−n = (−1)n+1F ϕ−1 + (−1)nF . 5 n n n−1

19 This means that we can identify ϕn with elements a+bϕ and ϕ−n with elements b a− ϕ so our intersection points in the lattice are given by the different products n −n n+1 −1 n ±ϕ ϕ = ±(Fnϕ + Fn−1)((−1) Fnϕ + (−1) Fn−1) = ±1. So the units are precisely the elements a + bϕ where (a, b) = ±(Fn−1,Fn). Note that for example 5 − 3ϕ is a unit since N(5 − 3ϕ) = 25 − 9 − 15 = −1, but here −3 is supposedly the Fibonacci-number after 5. This is because the Fibonacci- numbers can be indexed throughout the integers, and in particular we have n+1 that F−n = (−1) Fn. With this notation, F−5 = 5 and F−4 = F−5 + F−6 = 5 − 8 = −3, so the statement is still true.

20 6 Euclidean domains

In this section we introduce the concept of an Euclidean domain. Then we show that the Gaussian integers are a Euclidean domain and look at what that means. This section is mostly based on [1]. Definition 6.1. The integral domain R is said to be a Euclidean domain if there is a norm N on R such that for any two elements a, b ∈ R with b 6= 0 there exist elements q, r ∈ R with

a = qb + r with r = 0 or N(r) < N(b).

The element q is called the quotient and the element r is called the remainder of the division.

6.1 Gaussian integers as a Euclidean domain

Proposition 6.1. The Gaussian integers Z[i] with the field norm N : Z[i] −→ N is a Euclidean domain.

Proof. Let α, β ∈ Z[i] with β 6= 0 meaning α = a + bi and β = c + di. Then α let β = r + si with r, s ∈ Q. Let p be an integer the closest to r and q the one 1 1 closest to s so that both, |r − p| ≤ 2 , |s − q| ≤ 2 . Now let γ = α − (p + qi)β which is a Gaussian integer since α − (p + qi)β = a + bi − (p + qi)(c + di) where a, b, c, d, p, q ∈ Z as well as their sums and products. Then we have that N(γ) = N(α−(p+qi)β) = N(α/β −(p+qi))N(β) = ((r−p)2 +(s−q)2)N(β) = 1 2 N(β) < N(β) and so we have the division algorithm.  √ √ Proposition 6.2. The quadratic integer ring Z[ −2] with the field norm N : Z[ −2] −→ N is a Euclidean domain. √ √ √ Proof. Let α, β ∈ Z[ −2] with β 6= 0 meaning α = a+b −2 and β = c+d −2. α √ Then let β = r + s −2 with r, s ∈ Q. Let p be an integer the closest to r and q one closest to s. So that both, |r − p| ≤ 1 , |s − q| ≤ 1 . Now let √ √ 2 2 γ = α − (p√+ q −2)β meaning γ ∈√ Z[ −2]. Then we have that N(γ) = N(α−(p+q −2)β) = N(α/β−(p+q −2))N(β) = ((r−p)2 +2(s−q)2)N(β) = 3 4 N(β) < N(β) and so we have the division algorithm. 

21 6.2 Prime elements Proposition 6.3. Prime elements are irreducible. Proof. Assume that p = ab, then p either divides a or b. So if we say that p divides a then p = ra for some r but this means p = ab = prb so rb = 1 is b is a unit and p is therefore irreducible.  Proposition 6.4. Prime elements of a Euclidean domain are the same as the irreducible elements. Proof. We first prove that all irreducible elements are prime. Assume p is ir- reducible. Then if p divides ab and p does not divide b we need to show that p divides a. Since p does not divide b, and p is irreducible, the only common factors of p and b are units and gcd(p, b) = 1. This means px + by = 1. Since p divides ab we have pk = ab for some k, which then means ypk = yab implying that ypk = a(1 − px) which in turn implies that a = p(yk + x). So p divides a. The other direction is proved by proposition 6.3.  The last result means that Theorem 3.6 is also a categorization of all the primes of the Gaussian integers.

22 7 Principal ideal domains and unique factoriza- tion domains

Here we introduce Principal ideal domains and Unique factorization domains.

7.1 Principal ideal domains Definition 7.1. An ideal I in a commutative ring R is a subset I ⊂ R such that I is closed under addition, additive inverses and contains the zero element. We require I to be closed under multiplication, and in particular we require that if r ∈ R and i ∈ I then ri ∈ I and ir ∈ I, meaning we have multiplicative closure with any element from R. An ideal of the form hai = {ar : r ∈ R} is called a principal ideal. Definition 7.2. A or PID is an integral domain in which every ideal is principal

Proposition 7.1. (Proposition 12.2.7 in [2]) Every Euclidean domain is also a PID. Proof. Let S be some nonzero ideal and choose an element a ∈ S such that N(a) is minimal. Then choose an arbitrary element x ∈ S. By the definition of the Euclidean Domain there exist elements q, r ∈ S such that

x = qa + r with r = 0 or N(r) < N(a)

Since N(a) is minimal, we can immediately conclude that r = 0 and thus x = qa and S = (a) since x was arbitrary. 

7.2 Unique factorization domains Definition 7.3. A Unique factorization domain or UFD is an integral domain R in which every nonzero element r ∈ R which is not a unit has the following two properties:

• r can be written as a finite product of irreducibles pi of R (not necessarily distinct): r = p1p2 ··· pn

• The above decomposition is unique up to associates: namely, if r = q1q2 · ·· qm is another factorization of r into irreducibles, then m = n and there is some renumbering of the factors such that pi is associate to qi for i = 1, 2, ...n.

23 √ Example. We will now look√ at an example that demonstrates that Z[ −√5] is not a UFD. Let x = a + b√ −5 and√ let a = b = 1, meaning x = 1 + −5. We then√ get N(√x) = (1 + −5)(1 − −5) = 6 =√ 2 · 3. If we can show that {(1+ −5), (1− −5), 2, 3} are all irreducible in Z[ −5] and not associated, we are done. It is clear that if we divide any of these elements by√ any other will not yield a unit, so they are not associated. Consider√ now N(1 + −5) = N(αβ) = N(α)N(β) = 6. We have that α = p + q −5, then N(α) divides into 6. This means that N(α) = 2 or N(α) = 3. Meaning p2 + 5q2 = 2 or p2 + 5q2 = 3. In both√ cases, we√ have no integer solutions. This means that every element in {(1 + −5), (1 − −5), 2, 3} is√ irreducible meaning we have found two ways to factor 6 into irreducibles in Z[ −5]. Theorem 7.1. (Chapter 8, Theorem 14, in [1]) Every PID is a UFD. Proof. Let R be a PID and define U(R) = {x ∈ R | x is a unit}. We then define S = {y ∈ R \ U(R): y is not a product of irreducibles}, meaning S contains all elements in R that cannot be represented as a product of irreducibles. Choose an element r ∈ S. The factorization of r can, by construction of S, never terminate. This means that we get an infinite chain of ideals consisting of the factors of r. (r) ⊂ (r1) ⊂ (r2) ⊂ ... ⊂ R We will now show that this kind of infinite ascending chain is impossible in a PID, in other words we will show that there exists an N such that (rm) = (rN ) for m > N. First, we note that if I1 ⊂ I2 ⊂ I3 ⊂ ... ⊂ In ⊂ ... is an infinite ascending chain of ideals, then I = ∪Ii is an ideal. Since R is a PID, I = (a) for some a ∈ R. If a ∈ I then a ∈ IN for some N and thus we have

(a) ⊂ IN ⊂ Im ⊂ I = (a) meaning the chain terminates at precisely N. This shows that the only subset S in a PID is the empty set.

What is left to show is that factorization is unique up to a permutation. Let R be a PID and assume an element a ∈ R can be written as a product of primes a = b1b2...bn = c1c2...cm. Then we must have that bi divides cj for some i, j since the equality b1b2...bn = c1c2...cm means ci = bj, up to associates, for some i, j. Since we demand uniqueness only up to a permutation, we can let i = j = 1 and b1 = c1x1. Since we assumed the factors to be prime, x1 has to be a unit since if x1 divides b1, then b1 is not irreducible and is not a prime. We get that c1 divides into b1 and can write a = c1x1...bn = c1c2...cm and using cancellation gives us a = x1b2...bn = c2...cm. Repeating this process m yields x1x2...xmbm+1...bn = 1 and since we assumed {b}i=1 to be prime, they are not units and so m = n.  √ Example. As we saw earlier the Gaussian integers and Z[ −2] are both Eu- clidean domains and are therefore both PIDs and UFDs.

24 7.3 Integers D that result in a UFD

Proposition√ 7.2. Let D < 0 and D = 3 mod 4. Then the only ring of quadratic integers Z[ D] that is a UFD is the one where D = −1, the Gaussian integers.

Proof. We saw earlier that the Gaussian integers are a UFD. √ Assume D < −1 and D = 3 mod 4. Then the elements√ are√ of the form a + b D with a, b ∈ Z. Now the element 1 − D = (1 + D)(1 − D). But we also have that 1 − D = 2 1−D where 1−D ∈ since D = 3 mod 4. Since D < −1 there is 2 √ 2 Z therefore√ no element a + b D with√ norm 2. This means that 2 is irreducible in Z[ D] since 2 = αβ for α, β ∈ Z[ D] would imply that 4 = N(2) = N(α)N(β). Neither of them can be units,√ so they would both need to have norm 2 which√ we saw√ is impossible. If Z[ D] was a UFD then 2 would divide either 1 + D or 1 − D which it does not. 

Proposition√ 7.3. Let D < 0 and D = 2 mod 4. Then the only ring of quadratic integers Z[ D] that is a UFD is the one where D = −2. √ Proof. We saw earlier that Z[ −2] is a UFD. √ Assume D < −2 and D = 2 mod 4. Then√ √ the elements are of the form a + b D D with a, b ∈ Z. Now the element D = D D. But we also have that D = 2 2 where D ∈ since D = 2 mod 4. Since D < −2 there is therefore no element √ 2 Z √ a + b D with√ norm 2. This means that 2 is irreducible in Z[ D] since 2 = αβ for α, β ∈ Z[ D] would imply that 4 = N(2) = N(α)N(β). Neither of them can be units,√ so they would both need to have√ norm 2 which we saw is impossible. If Z[ D] was a UFD then 2 would divide D which it does not.  Theorem 7.2. (in [3]) The negative values of D that yield unique factorization are −1, −2, −3, −7, −11, −19, −43, −67, −163.

Proof. Proof found in [3] 

25 References

[1] David S. Dummit, Richard M. Foote. Abstract Algebra. 3rd edition. [2] Michael Artin. Algebra. 2nd edition. [3] H. M. Stark A complete determination of the complex quadratic fields of class-number one.

26 www.kth.se