Introduction to Modern Algebra

Contents › Chapter 12

Chapter 12. Unique factorization

12.1 Units, associates and irreducibles

Every integer other than 00 and ±1\pm 1 is a product of primes and their negatives, in one way up to order and signs. Saying the same in Z[i]\mathbb{Z}[i], in Z[−5]\mathbb{Z}[\sqrt{-5}] or in F[x]F[x] needs meanings for “prime” and “the same factorization” that work in any integral domain, with the units of the ring in place of the signs ±1\pm 1.

Divisibility, associates and irreducible elements give those meanings in any integral domain, and in rings like Z[i]\mathbb{Z}[i] the norm decides which elements can be split.

Divisibility and associates

In Z\mathbb{Z} the factorizations 6=2⋅36 = 2 \cdot 3 and 6=(−2)(−3)6 = (-2)(-3) differ only by the signs ±1\pm 1, the units of Z\mathbb{Z}. In another ring the units play the part of the signs.

Definition 12.1.1 (Divisibility; associates).

Let RR be an integral domain and let a,b∈Ra, b \in R. Then aa divides bb, written a∣ba \mid b, if b=acb = ac for some c∈Rc \in R. And aa and bb are associates, written a∼ba \sim b, if b=uab = ua for some unit uu of RR.

In terms of principal ideals: a∣ba \mid b exactly when (b)⊆(a)(b) \subseteq (a), and a∼ba \sim b exactly when (a)=(b)(a) = (b).

Why divisibility and associates can be read from ideals.

Idea. (a)(a) is the set of multiples of aa, so ”bb is a multiple of aa” says "b∈(a)b \in (a)". Each of the two statements is then checked in both directions.

  1. If a∣ba \mid b, then (b)⊆(a)(b) \subseteq (a).

    Say b=acb = ac. Then every multiple rb=(rc)arb = (rc)a of bb is a multiple of aa.

  2. If (b)⊆(a)(b) \subseteq (a), then a∣ba \mid b.

    b=1⋅bb = 1 \cdot b lies in (a)(a), so b=cab = ca for some c∈Rc \in R.

  3. If a∼ba \sim b, then (a)=(b)(a) = (b).

    Say b=uab = ua with uu a unit. Then a∣ba \mid b, and a=u−1ba = u^{-1}b gives b∣ab \mid a, so (b)⊆(a)(b) \subseteq (a) and (a)⊆(b)(a) \subseteq (b) by the first step.

  4. If (a)=(b)(a) = (b), then a∼ba \sim b.

    By the second step, b=cab = ca and a=dba = db for some c,d∈Rc, d \in R. If a=0a = 0, then b=c⋅0=0=1⋅ab = c \cdot 0 = 0 = 1 \cdot a. If a≠0a \neq 0, then a=dcaa = dca gives a(1−dc)=0a(1 - dc) = 0, and since RR has no zero divisors, dc=1dc = 1. So cc is a unit, and b=cab = ca.

□

Since a∼ba \sim b says (a)=(b)(a) = (b), being associates behaves like equality of ideals: every element is an associate of itself, a∼ba \sim b gives b∼ab \sim a, and a∼ba \sim b and b∼cb \sim c give a∼ca \sim c.

Irreducible elements

A prime pp of Z\mathbb{Z} has divisors, but only dull ones: in every factorization p=abp = ab, one factor is ±1\pm 1. The definition copies this, with units in place of ±1\pm 1.

Definition 12.1.2 (Irreducible element).

Let RR be an integral domain. An element p∈Rp \in R is irreducible if:

  • (i) Not a unit: pp is not a unit of RR.
  • (ii) No proper factorization: whenever p=abp = ab with a,b∈Ra, b \in R, one of aa and bb is a unit.

Condition (ii) rules out 00, since 0=0⋅00 = 0 \cdot 0 and 00 is not a unit. So an irreducible element is a non-zero non-unit that is not a product of two non-units.

For polynomials over a field this is the definition of Definition 11.4.1 again. In F[x]F[x] the units are the non-zero constants (Theorem 11.1.2). So for a non-zero pp, a factorization p=ghp = gh in which neither factor is a unit is one in which both factors are non-constant, that is, a factorization into polynomials of smaller degree than pp. A non-zero p∈F[x]p \in F[x] is therefore an irreducible element exactly when it is an irreducible polynomial.

An associate upup of an irreducible element pp is irreducible. It is not a unit, since otherwise p=u−1(up)p = u^{-1}(up) would be one. And if up=abup = ab, then p=(u−1a)bp = (u^{-1}a)b, so u−1au^{-1}a or bb is a unit, and then aa or bb is one.

The norm

In Z\mathbb{Z}, the size ∣a∣\lvert a\rvert settles which numbers can be split. Rings of the form Z[d]\mathbb{Z}[\sqrt{d}] (Example 10.3.3) have a size of their own, and it turns each question about factors into a question about integers.

Proposition 12.1.3 (The norm).

Let dd be an integer that is not a perfect square. For z=a+bdz = a + b\sqrt{d} in Z[d]\mathbb{Z}[\sqrt{d}], the norm of zz is the integer

N(z)=a2−db2.N(z) = a^2 - db^2.

For all z,w∈Z[d]z, w \in \mathbb{Z}[\sqrt{d}]:

  • (i) N(zw)=N(z)N(w)N(zw) = N(z)N(w), and N(z)=0N(z) = 0 only for z=0z = 0.
  • (ii) zz is a unit exactly when N(z)=±1N(z) = \pm 1.
  • (iii) Suppose z≠0z \neq 0 is not a unit, and no element of Z[d]\mathbb{Z}[\sqrt{d}] has norm mm or −m-m for any divisor mm of N(z)N(z) with 1<m<∣N(z)∣1 < m < \lvert N(z)\rvert. Then zz is irreducible. In particular, zz is irreducible when N(z)=±qN(z) = \pm q for a prime number qq.
Proof.

Idea. Write the norm as a product, N(z)=zzˉN(z) = z\bar{z}, where zˉ=a−bd\bar{z} = a - b\sqrt{d}. Then (i) comes from the fact that this bar respects products, and (ii) and (iii) follow from (i).

  1. The bar zˉ=a−bd\bar{z} = a - b\sqrt{d} is well defined, and zzˉ=N(z)z\bar{z} = N(z).

    Each element of Z[d]\mathbb{Z}[\sqrt{d}] has only one form a+bda + b\sqrt{d} (Example 10.3.3), and zzˉ=a2−db2z\bar{z} = a^2 - db^2.

  2. N(zw)=N(z)N(w)N(zw) = N(z)N(w), the first half of (i).

    Let w=c+edw = c + e\sqrt{d}. By the product formula of Example 10.3.3, zw=(ac+dbe)+(ae+bc)dzw = (ac + dbe) + (ae + bc)\sqrt{d}, and expanding zˉwˉ=(a−bd)(c−ed)\bar{z}\bar{w} = (a - b\sqrt{d})(c - e\sqrt{d}) gives (ac+dbe)−(ae+bc)d(ac + dbe) - (ae + bc)\sqrt{d}, which is zw‾\overline{zw}. So

    N(zw)=zw zw‾=zzˉ wwˉ=N(z)N(w).\begin{aligned} N(zw) &= zw\,\overline{zw} \\ &= z\bar{z}\,w\bar{w} = N(z)N(w). \end{aligned}
  3. N(z)=0N(z) = 0 only for z=0z = 0. This proves (i).

    If N(z)=0N(z) = 0, then a2=db2a^2 = db^2. If b≠0b \neq 0, this gives d=(a/b)2d = (a/b)^2. That is impossible for d<0d < 0, since a square is not negative; and for d>0d > 0 it makes d=∣a/b∣\sqrt{d} = \lvert a/b\rvert rational, which it is not, since dd is not a perfect square. So b=0b = 0, and then a2=0a^2 = 0 gives a=0a = 0.

  4. (ii) zz is a unit exactly when N(z)=±1N(z) = \pm 1.

    If zw=1zw = 1, then N(z)N(w)=N(1)=1N(z)N(w) = N(1) = 1 by (i). Both are integers, so N(z)=±1N(z) = \pm 1. Conversely, if N(z)=zzˉ=±1N(z) = z\bar{z} = \pm 1, then z⋅(±zˉ)=1z \cdot (\pm\bar{z}) = 1, and ±zˉ\pm\bar{z} lies in Z[d]\mathbb{Z}[\sqrt{d}], so zz is a unit.

  5. (iii) Under its hypothesis, zz is irreducible.

    zz is not a unit by hypothesis. Suppose z=vwz = vw with neither vv nor ww a unit. By (i), N(z)=N(v)N(w)N(z) = N(v)N(w). Neither factor is 00, since z≠0z \neq 0, and neither is ±1\pm 1, by (ii). So m=∣N(v)∣m = \lvert N(v)\rvert divides N(z)N(z), m>1m > 1, and m=∣N(z)∣/∣N(w)∣m = \lvert N(z)\rvert / \lvert N(w)\rvert is less than ∣N(z)∣\lvert N(z)\rvert. Then vv has norm mm or −m-m, against the hypothesis. So no such factorization exists, and zz is irreducible.

  6. If N(z)=±qN(z) = \pm q with qq a prime number, the hypothesis of (iii) holds.

    N(z)=±qN(z) = \pm q is neither 00 nor ±1\pm 1, so zz is non-zero and not a unit, by (i) and (ii). And no divisor mm of qq has 1<m<q1 < m < q.

□

For d<0d < 0, d=i∣d∣\sqrt{d} = i\sqrt{\lvert d\rvert}, and N(a+bd)=a2+∣d∣b2N(a + b\sqrt{d}) = a^2 + \lvert d\rvert b^2 is the square of the distance from 00 to a+bda + b\sqrt{d} in the complex plane. Then (i) is the rule that absolute values of complex numbers multiply.

Example 12.1.4 (Units and irreducibles in Z[i]\mathbb{Z}[i] and Z[−5]\mathbb{Z}[\sqrt{-5}]).

In Z[i]\mathbb{Z}[i] the norm is N(a+bi)=a2+b2N(a + bi) = a^2 + b^2.

  • The units are the elements of norm 11, and a2+b2=1a^2 + b^2 = 1 only for (a,b)=(±1,0)(a, b) = (\pm 1, 0) or (0,±1)(0, \pm 1). So the units of Z[i]\mathbb{Z}[i] are 11, −1-1, ii and −i-i.
  • 33 is irreducible. Its norm is 99, so a factor that is not a unit would have norm 33, and a2+b2=3a^2 + b^2 = 3 is impossible: the squares that are at most 33 are 00 and 11.
  • 22 is not irreducible: 2=(1+i)(1−i)2 = (1 + i)(1 - i). Each factor has norm 22, a prime, so each is irreducible. Since 1−i=−i(1+i)1 - i = -i(1 + i), also 2=−i(1+i)22 = -i(1 + i)^2: up to a unit, 22 is the square of one irreducible.
  • 55 is not irreducible: 5=(2+i)(2−i)5 = (2 + i)(2 - i), and each factor has norm 55, so each is irreducible.

In Z[−5]\mathbb{Z}[\sqrt{-5}] the norm is N(a+b−5)=a2+5b2N(a + b\sqrt{-5}) = a^2 + 5b^2.

  • a2+5b2=1a^2 + 5b^2 = 1 forces b=0b = 0 and a=±1a = \pm 1, so the only units are ±1\pm 1.
  • 22 and 33 are irreducible. Their norms are 44 and 99, so a factor that is not a unit would have norm 22 or 33. But a2+5b2≥5a^2 + 5b^2 \ge 5 when b≠0b \neq 0, and a2a^2 is never 22 or 33.

So the primes 22 and 55 of Z\mathbb{Z} split in Z[i]\mathbb{Z}[i] while 33 does not, and in Z[−5]\mathbb{Z}[\sqrt{-5}] the norm takes none of the values 22 and 33. Each of these facts came from asking which integers have the form a2−db2a^2 - db^2.

12.2 Unique factorization domains, and a failure

Irreducible elements and associates make sense in every integral domain, and with them the property that makes Z\mathbb{Z} special can be stated for any of them: every non-zero non-unit is a product of irreducibles, in one way up to order and unit factors. A ring as close to Z\mathbb{Z} as Z[−5]\mathbb{Z}[\sqrt{-5}] does not have it.

Unique factorization domains

Definition 12.2.1 (Unique factorization domain).Not yet reviewed

An integral domain RR is a unique factorization domain, or UFD, if:

  • (i) Existence: every non-zero non-unit a∈Ra \in R is a product a=p1p2⋯pra = p_1p_2 \cdots p_r of irreducible elements of RR, with r≥1r \ge 1.
  • (ii) Uniqueness: if a=p1⋯pr=q1⋯qsa = p_1 \cdots p_r = q_1 \cdots q_s are two products of irreducible elements, then r=sr = s, and the qjq_j can be renumbered so that pi∼qip_i \sim q_i for every ii.

Prime elements

Euclid’s lemma (Theorem 2.3.3) gives the primes of Z\mathbb{Z} a second property: a prime that divides a product divides one of the factors. In a general integral domain this property has its own name.

Definition 12.2.2 (Prime element).

Let RR be an integral domain. An element p∈Rp \in R is a prime element, or prime, if pp is non-zero and not a unit, and whenever p∣abp \mid ab with a,b∈Ra, b \in R, then p∣ap \mid a or p∣bp \mid b.

Equivalently, p≠0p \neq 0 and the principal ideal (p)(p) is a prime ideal.

Why prime elements are those generating prime ideals.

Idea. Translate each condition on the ideal (p)(p) into a condition on the element pp.

  1. x∈(p)x \in (p) says p∣xp \mid x.

    The ideal (p)(p) consists of the multiples of pp.

  2. The ideal (p)(p) is proper exactly when pp is not a unit.

    If pp is a unit, every r∈Rr \in R is (rp−1)p∈(p)(rp^{-1})p \in (p), so (p)=R(p) = R. If (p)=R(p) = R, then 1=cp1 = cp for some c∈Rc \in R, so pp is a unit.

  3. (p)(p) is a prime ideal exactly when pp is not a unit and has the divisibility property.

    With x∈(p)x \in (p) read as p∣xp \mid x, the condition ”ab∈(p)ab \in (p) implies a∈(p)a \in (p) or b∈(p)b \in (p)” says ”p∣abp \mid ab implies p∣ap \mid a or p∣bp \mid b”, and properness is the second step.

□
Theorem 12.2.3 (Irreducible elements of a UFD are prime).Not yet reviewed

In a unique factorization domain RR, every irreducible element is prime.

Proof.

Idea. p∣abp \mid ab means that pp appears, up to a unit, among the irreducible factors of abab; and those are the factors of aa together with the factors of bb. Throughout, pp is irreducible, so non-zero and not a unit, and p∣abp \mid ab, say ab=pcab = pc.

  1. If aa or bb is 00 or a unit, then pp divides aa or bb.

    If a=0a = 0 or b=0b = 0, then pp divides it, since 0=p⋅00 = p \cdot 0. If aa is a unit, then b=p(a−1c)b = p(a^{-1}c), so p∣bp \mid b; likewise p∣ap \mid a if bb is a unit.

  2. Otherwise, ab=a1⋯arb1⋯bsab = a_1 \cdots a_r b_1 \cdots b_s is a factorization of abab into irreducibles.

    Now aa and bb are non-zero non-units, so by existence a=a1⋯ara = a_1 \cdots a_r and b=b1⋯bsb = b_1 \cdots b_s with all aia_i and bjb_j irreducible.

  3. ab=p c1⋯ctab = p\,c_1 \cdots c_t is a second factorization into irreducibles.

    Here c≠0c \neq 0, since ab≠0ab \neq 0 in an integral domain. And cc is not a unit: otherwise ab=cpab = cp would be a factorization into the single irreducible cpcp (an associate of pp), against the factorization with r+s≥2r + s \ge 2 factors, which uniqueness forbids. So by existence c=c1⋯ctc = c_1 \cdots c_t with each ckc_k irreducible.

  4. pp divides aa or bb.

    By uniqueness, pp is an associate of one of the aia_i or one of the bjb_j. If ai=upa_i = up for a unit uu, then pp divides aia_i, and so divides aa. Likewise, if pp is an associate of some bjb_j, then p∣bp \mid b.

□

The converse holds in every integral domain. If pp is prime and p=abp = ab, then p∣abp \mid ab, so pp divides aa or bb, say a=pca = pc. Then p=pcbp = pcb, and canceling the non-zero pp gives cb=1cb = 1, so bb is a unit. So in a UFD the irreducible elements and the prime elements are the same.

The failure

Theorem 12.2.4 (Unique factorization fails in Z[−5]\mathbb{Z}[\sqrt{-5}]).

In Z[−5]\mathbb{Z}[\sqrt{-5}],

6=2⋅3=(1+−5)(1−−5).\begin{aligned} 6 &= 2 \cdot 3 \\ &= (1 + \sqrt{-5})(1 - \sqrt{-5}). \end{aligned}
  • (i) The four elements 22, 33, 1+−51 + \sqrt{-5} and 1−−51 - \sqrt{-5} are irreducible.
  • (ii) No two of them are associates.

So 66 has two factorizations into irreducibles that do not agree up to order and associates, and Z[−5]\mathbb{Z}[\sqrt{-5}] is not a UFD. Moreover, 22 is irreducible but not prime.

Proof.

Idea. Compute norms: N(2)=4N(2) = 4, N(3)=9N(3) = 9 and N(1±−5)=6N(1 \pm \sqrt{-5}) = 6. No element has norm 22 or 33, so none of the four can be split; and associates have equal norms, while the units are only ±1\pm 1, so no factor on one side matches a factor on the other.

  1. (1+−5)(1−−5)=6(1 + \sqrt{-5})(1 - \sqrt{-5}) = 6.

    The product is 1−(−5)2=1+5=61 - (\sqrt{-5})^2 = 1 + 5 = 6.

  2. 22 and 33 are irreducible, and the units are ±1\pm 1.

    This is Example 12.1.4: a factor of 22 or 33 that is not a unit would have norm 22 or 33, and a2+5b2a^2 + 5b^2 never takes these values.

  3. 1+−51 + \sqrt{-5} and 1−−51 - \sqrt{-5} are irreducible.

    Each has norm 1+5=61 + 5 = 6, and the divisors mm of 66 with 1<m<61 < m < 6 are 22 and 33. No element has norm 22 or 33, so Proposition 12.1.3 (iii) applies. This proves (i).

  4. No two of the four are associates.

    If w=uzw = uz with uu a unit, then N(w)=N(u)N(z)=N(z)N(w) = N(u)N(z) = N(z), since N(±1)=1N(\pm 1) = 1. So an associate of 22, 33 or 1±−51 \pm \sqrt{-5} has norm 44, 99 or 66 respectively, which separates all pairs except 1+−51 + \sqrt{-5} and 1−−51 - \sqrt{-5}. Those are not associates either: the associates of 1+−51 + \sqrt{-5} are ±(1+−5)\pm(1 + \sqrt{-5}), and neither is 1−−51 - \sqrt{-5}. This proves (ii).

  5. Z[−5]\mathbb{Z}[\sqrt{-5}] is not a UFD.

    The factorizations 2⋅32 \cdot 3 and (1+−5)(1−−5)(1 + \sqrt{-5})(1 - \sqrt{-5}) of 66 are both into irreducibles, by (i). Uniqueness would match 22 with an associate among 1±−51 \pm \sqrt{-5}, which (ii) rules out.

  6. 22 is not prime.

    22 divides 6=(1+−5)(1−−5)6 = (1 + \sqrt{-5})(1 - \sqrt{-5}). But every multiple 2(a+b−5)=2a+2b−52(a + b\sqrt{-5}) = 2a + 2b\sqrt{-5} of 22 has even coefficients, while 1±−51 \pm \sqrt{-5} has coefficients 11 and ±1\pm 1. So 22 divides neither factor.

□

Primality is what would match the factor 22 with an associate in the second factorization. If 22 were prime, it would divide 1+−51 + \sqrt{-5} or 1−−51 - \sqrt{-5}, since it divides their product 66, and an irreducible element divisible by the non-unit 22 is an associate of 22.

12.3 Principal ideal domains and Euclidean domains

In Z\mathbb{Z}, unique factorization rests on Euclid’s lemma, and Euclid’s lemma rests on Bézout’s identity: the combinations ax+byax + by of two integers are the multiples of one number, gcd⁡(a,b)\gcd(a, b) (Theorem 2.3.2). In the language of ideals, every ideal of Z\mathbb{Z} is principal (Theorem 10.5.2), and so is every ideal of F[x]F[x] (Theorem 11.3.1). Z[i]\mathbb{Z}[i] has the same property, for the same reason: it too has a division with remainder.

Principal ideal domains

Definition 12.3.1 (Principal ideal domain).

An integral domain RR is a principal ideal domain, or PID, if every ideal of RR is principal: each ideal II is (a)={ra:r∈R}(a) = \{ra : r \in R\} for some a∈Ra \in R.

So in a PID, as in Z\mathbb{Z}, any two elements aa and bb have a greatest common divisor: a common divisor dd of aa and bb that every common divisor of aa and bb divides. A generator dd of the ideal (a,b)(a, b) is one: aa and bb lie in (d)(d), so dd divides both; and dd lies in (a,b)(a, b), so Bézout’s identity d=ra+sbd = ra + sb holds for some r,s∈Rr, s \in R, and every common divisor of aa and bb divides dd. Two greatest common divisors divide each other, so they are associates (Definition 12.1.1), and the greatest common divisor is unique only up to associates. One of the two non-examples, Z[−5]\mathbb{Z}[\sqrt{-5}], is also the ring in which unique factorization failed.

Euclidean domains

The proofs for Z\mathbb{Z} and for F[x]F[x] share one move: divide by an element of least size, and the remainder is too small to be anything but 00. Division with remainder in Z\mathbb{Z} and in F[x]F[x] (Theorem 11.2.1) are the two cases of one definition.

Definition 12.3.2 (Euclidean domain).

An integral domain RR is a Euclidean domain if there is a function δ\delta from the non-zero elements of RR to the integers 0,1,2,…0, 1, 2, \dots, a size function, such that for all a,b∈Ra, b \in R with b≠0b \neq 0 there are q,r∈Rq, r \in R with

a=qb+r,r=0 or δ(r)<δ(b).a = qb + r, \quad r = 0 \text{ or } \delta(r) < \delta(b).
Theorem 12.3.3 (Euclidean domains are PIDs).

Let RR be a Euclidean domain with size function δ\delta, and let II be a non-zero ideal of RR. Then I=(b)I = (b) for every non-zero b∈Ib \in I with δ(b)\delta(b) as small as possible. Since also {0}=(0)\{0\} = (0), every Euclidean domain is a PID.

Proof.

The idea is to divide any element of II by bb: the remainder lies in II and is smaller than bb, so it is 00.

The sizes of the non-zero elements of II are non-negative integers, so some non-zero b∈Ib \in I has the least size. Since b∈Ib \in I and II absorbs multiplication, (b)⊆I(b) \subseteq I.

Conversely, let a∈Ia \in I. As RR is Euclidean, a=qb+ra = qb + r with r=0r = 0 or δ(r)<δ(b)\delta(r) < \delta(b). Here r=a−qbr = a - qb lies in II, because aa and qbqb do. A non-zero rr would be an element of II smaller than bb, so r=0r = 0 and a=qb∈(b)a = qb \in (b). So I=(b)I = (b). □

For Z\mathbb{Z} this is the proof that every subgroup of Z\mathbb{Z} is nZn\mathbb{Z} (Theorem 2.3.1), and for F[x]F[x] the proof of Theorem 11.3.1: both are this theorem for a particular size function.

The Gaussian integers

In Z[i]\mathbb{Z}[i] there is no obvious remainder, but there is a size, the norm N(a+bi)=a2+b2N(a + bi) = a^2 + b^2, the square of the distance from 00 to a+bia + bi.

Theorem 12.3.4 (The Gaussian integers are Euclidean).

For all z,w∈Z[i]z, w \in \mathbb{Z}[i] with w≠0w \neq 0 there are q,r∈Z[i]q, r \in \mathbb{Z}[i] with

z=qw+r,N(r)≤12N(w).z = qw + r, \quad N(r) \le \tfrac{1}{2}N(w).

So Z[i]\mathbb{Z}[i] is a Euclidean domain with size function the norm NN, and therefore a PID.

Proof.

Idea. Divide in C\mathbb{C} and round the quotient to the nearest Gaussian integer.

  1. Rounding z/wz/w gives q,r∈Z[i]q, r \in \mathbb{Z}[i] with z=qw+rz = qw + r.

    Divide in C\mathbb{C}: z/w=s+tiz/w = s + ti for real numbers ss and tt. Choose integers mm and nn with ∣s−m∣≤12\lvert s - m\rvert \le \tfrac{1}{2} and ∣t−n∣≤12\lvert t - n\rvert \le \tfrac{1}{2}, and put q=m+niq = m + ni and r=z−qwr = z - qw. Both lie in Z[i]\mathbb{Z}[i], and z=qw+rz = qw + r.

  2. N(r)≤12N(w)N(r) \le \tfrac{1}{2}N(w).

    For a Gaussian integer, N(a+bi)=a2+b2=∣a+bi∣2N(a + bi) = a^2 + b^2 = \lvert a + bi\rvert^2, and absolute values of complex numbers multiply. So

    N(r)=∣w∣2 ∣z/w−q∣2=N(w)((s−m)2+(t−n)2)≤N(w)(14+14).\begin{aligned} N(r) &= \lvert w\rvert^2 \, \lvert z/w - q\rvert^2 \\ &= N(w)\bigl((s - m)^2 + (t - n)^2\bigr) \\ &\le N(w)\bigl(\tfrac{1}{4} + \tfrac{1}{4}\bigr). \end{aligned}
  3. NN is a size function, and Z[i]\mathbb{Z}[i] is a PID.

    The norm takes non-negative integer values, and N(w)≥1N(w) \ge 1 for w≠0w \neq 0 (Proposition 12.1.3). So r=0r = 0 or N(r)≤12N(w)<N(w)N(r) \le \tfrac{1}{2}N(w) < N(w), and Z[i]\mathbb{Z}[i] is a PID by Theorem 12.3.3.

□
Example 12.3.5 (The first principal ideal domains).

Each of these rings is Euclidean, and so a PID by Theorem 12.3.3:

  • Z\mathbb{Z}, with size ∣a∣\lvert a\rvert;
  • F[x]F[x] for a field FF, with size deg⁡f\deg f;
  • Z[i]\mathbb{Z}[i], with size the norm (Theorem 12.3.4).

For Z\mathbb{Z} and F[x]F[x] this recovers Theorem 10.5.2 and Theorem 11.3.1 as one theorem. Not every integral domain is a PID: Z[x]\mathbb{Z}[x] is not, since (2,x)(2, x) is not principal, and neither is Z[−5]\mathbb{Z}[\sqrt{-5}].

So any two elements of Z[i]\mathbb{Z}[i] have a greatest common divisor, a common divisor that every common divisor divides, unique up to the units ±1\pm 1, ±i\pm i. It is found by the Euclidean algorithm with rounded quotients, exactly as in Z\mathbb{Z}.

12.4 Why principal ideals give unique factorization

Z\mathbb{Z} factors uniquely and is a PID. Z[−5]\mathbb{Z}[\sqrt{-5}] does not factor uniquely (Theorem 12.2.4), and it is not a PID, since (2,1+−5)(2, 1 + \sqrt{-5}) has no single generator. That is no accident: every PID is a UFD, and the proof is the proof of the fundamental theorem of arithmetic, with each step done by ideals.

Primes in a PID

In Z\mathbb{Z}, a prime pp that does not divide aa has gcd⁡(p,a)=1\gcd(p, a) = 1, so 1=sp+ta1 = sp + ta by Bézout’s identity, and that is why p∣abp \mid ab forces p∣bp \mid b. In a PID the same argument runs on the ideal (p,a)(p, a).

Theorem 12.4.1 (Irreducible and prime elements).Not yet reviewed

Let RR be an integral domain.

  • (i) Every prime element of RR is irreducible.
  • (ii) If RR is a PID, then for every irreducible element pp of RR the ideal (p)(p) is maximal, and pp is prime.
Proof.

Idea. For (ii), every ideal containing pp is generated by a single divisor of pp, and an irreducible pp has only two kinds of divisor: units and associates of pp. Part (i) needs only cancellation.

  1. (i) Every prime element pp is irreducible.

    Suppose p=abp = ab. Then p∣abp \mid ab, so pp divides aa or bb; say a=pca = pc. Then p⋅1=p cbp \cdot 1 = p\,cb, and canceling the non-zero pp (Theorem 10.2.4) gives cb=1cb = 1, so bb is a unit. Since pp is also not a unit, pp is irreducible.

  2. For irreducible pp, (p)≠R(p) \neq R.

    Otherwise 1=cp1 = cp for some cc, and pp would be a unit.

  3. For irreducible pp, (p)(p) is maximal.

    Let JJ be an ideal with (p)⊆J(p) \subseteq J. As RR is a PID, J=(a)J = (a) for some aa (Definition 10.5.1), and p∈(a)p \in (a), say p=rap = ra. Since pp is irreducible, rr or aa is a unit. If rr is a unit, then a=r−1p∈(p)a = r^{-1}p \in (p), so J=(p)J = (p). If aa is a unit, then JJ contains a unit, so J=RJ = R (Theorem 10.6.1). So no ideal lies strictly between (p)(p) and RR (Definition 10.6.3).

  4. If pp is irreducible and p∤ap \nmid a, then (p,a)=R(p, a) = R.

    The ideal (p,a)(p, a) is (d)(d) for some dd, and d∣pd \mid p, say p=dcp = dc. As pp is irreducible, dd or cc is a unit, and if cc is, then d=c−1pd = c^{-1}p is an associate of pp. So dd is a unit or an associate of pp. If dd were an associate of pp, then a∈(d)=(p)a \in (d) = (p) and p∣ap \mid a, which is not the case. So dd is a unit and (p,a)=R(p, a) = R.

  5. For irreducible pp, pp is prime. This proves (ii).

    Suppose p∣abp \mid ab and p∤ap \nmid a. By the previous step, 1=sp+ta1 = sp + ta for some s,t∈Rs, t \in R. Then b=spb+tabb = spb + tab, and pp divides both terms, the second because p∣abp \mid ab. So p∣bp \mid b.

□

Chains of ideals

The other ingredient is a finiteness property. In Z\mathbb{Z} an integer cannot be split into smaller and smaller factors forever, because the sizes go down. In a general PID there is no size, but the ideals do the same job.

Lemma 12.4.2 (Ascending chains of ideals stop).

Let RR be a PID, and let

I1⊆I2⊆I3⊆⋯I_1 \subseteq I_2 \subseteq I_3 \subseteq \cdots

be ideals of RR. Then there is an nn with In=In+1=In+2=⋯I_n = I_{n+1} = I_{n+2} = \cdots.

Proof.

The idea is that the union of the chain is again an ideal, so it has a single generator, and that generator already lies in some InI_n.

Let II be the union of all the IkI_k. It is an ideal. It contains 00, which lies in I1I_1. If a,b∈Ia, b \in I, say a∈Ija \in I_j and b∈Ikb \in I_k with j≤kj \le k, then both lie in IkI_k, so a+ba + b and −a-a lie in Ik⊆II_k \subseteq I. And if a∈Ija \in I_j and r∈Rr \in R, then ra∈Ij⊆Ira \in I_j \subseteq I.

As RR is a PID, I=(a)I = (a) for some aa, and aa lies in some InI_n. For every m≥nm \ge n,

I=(a)⊆In⊆Im⊆I,I = (a) \subseteq I_n \subseteq I_m \subseteq I,

so Im=InI_m = I_n. □

Unique factorization

Theorem 12.4.3 (Every PID is a UFD).Not yet reviewed

Let RR be a principal ideal domain. Then every non-zero non-unit of RR is a product of irreducible elements, and any two such products for the same element agree up to order and associates. So RR is a unique factorization domain.

Proof.

Idea. Existence: an element with no factorization could be split again and again, each time giving a strictly bigger principal ideal, and a chain of ideals in a PID cannot climb forever. Uniqueness: in a PID irreducible elements are prime, so an irreducible factor on one side divides a factor on the other and can be canceled, as in Z\mathbb{Z}.

  1. If a=bca = bc with a≠0a \neq 0 and cc not a unit, then (a)⊊(b)(a) \subsetneq (b).

    Since b∣ab \mid a, (a)⊆(b)(a) \subseteq (b). If the ideals were equal, then b=dab = da for some dd, so a=bc=dcaa = bc = dca and a(1−dc)=0a(1 - dc) = 0. As a≠0a \neq 0, dc=1dc = 1, and cc would be a unit.

  2. Every non-zero non-unit is a product of irreducible elements.

    Suppose a non-zero non-unit a1a_1 is not such a product. Then a1a_1 is not irreducible, so a1=bca_1 = bc with bb and cc non-units. If both bb and cc were products of irreducibles, so would a1a_1 be; so one of them is not. Call it a2a_2: it is a non-zero non-unit, it is not a product of irreducibles, and (a1)⊊(a2)(a_1) \subsetneq (a_2) by the first step, since the other factor is not a unit. Repeating with a2a_2 in place of a1a_1, and so on, gives a chain (a1)⊊(a2)⊊(a3)⊊⋯(a_1) \subsetneq (a_2) \subsetneq (a_3) \subsetneq \cdots that never stops, which Lemma 12.4.2 rules out.

  3. An irreducible pp that divides a product q1⋯qsq_1 \cdots q_s of irreducibles is an associate of one of the qjq_j.

    By Theorem 12.4.1, pp is prime. Since p∣q1(q2⋯qs)p \mid q_1(q_2 \cdots q_s), pp divides q1q_1 or q2⋯qsq_2 \cdots q_s; repeating, p∣qjp \mid q_j for some jj. Write qj=pcq_j = pc. As qjq_j is irreducible and pp is not a unit, cc is a unit, so p∼qjp \sim q_j.

  4. Two factorizations p1⋯pr=q1⋯qsp_1 \cdots p_r = q_1 \cdots q_s into irreducibles agree up to order and associates.

    By induction on rr. By the previous step, p1p_1 is an associate of some qjq_j; renumber so that q1=up1q_1 = up_1 with uu a unit. Canceling p1p_1 gives p2⋯pr=u q2⋯qsp_2 \cdots p_r = u\,q_2 \cdots q_s.

    If r=1r = 1, the left side is 11, so s=1s = 1: otherwise q2q_2 would divide 11 and be a unit. If r≥2r \ge 2, then s≥2s \ge 2 in the same way, since p2p_2 cannot divide the unit uu. Then p2⋯pr=(uq2)q3⋯qsp_2 \cdots p_r = (uq_2)q_3 \cdots q_s, where uq2uq_2 is irreducible, and by the induction hypothesis r−1=s−1r - 1 = s - 1 and the remaining factors match up to order and associates (pi∼uq2p_i \sim uq_2 means pi∼q2p_i \sim q_2). With p1∼q1p_1 \sim q_1, this proves uniqueness.

□

The first PIDs (Example 12.3.5) are therefore UFDs: Z\mathbb{Z}, Z[i]\mathbb{Z}[i], and F[x]F[x] for every field FF. For F[x]F[x] the factorization can be normalized so that it is unique on the nose.

Theorem 12.4.4 (Factorization in F[x]F\lbrack x\rbrack).

Let FF be a field. Every non-constant f∈F[x]f \in F[x] can be written as

f=c p1p2⋯prf = c\,p_1p_2 \cdots p_r

with c∈Fc \in F non-zero and p1,…,prp_1, \dots, p_r monic irreducible polynomials. This expression is unique up to the order of the pip_i, and cc is the leading coefficient of ff.

Proof.

Idea. Take the factorization that Theorem 12.4.3 provides and move the leading coefficient of each factor to the front.

  1. f=q1⋯qrf = q_1 \cdots q_r with each qiq_i irreducible.

    F[x]F[x] is a PID (Theorem 11.3.1), so it is a UFD. Its units are the non-zero constants (Theorem 11.1.2), so a non-constant ff is a non-zero non-unit.

  2. f=(b1⋯br) p1⋯prf = (b_1 \cdots b_r)\,p_1 \cdots p_r with each pip_i monic irreducible.

    If bib_i is the leading coefficient of qiq_i, then pi=bi−1qip_i = b_i^{-1}q_i is monic, and irreducible as an associate of qiq_i.

  3. In any such expression f=c p1⋯prf = c\,p_1 \cdots p_r, the constant cc is the leading coefficient of ff.

    A product of monic polynomials is monic, since leading coefficients multiply (Theorem 11.1.2).

  4. The monic factors are unique up to order.

    Suppose f=c p1⋯pr=c p1′⋯ps′f = c\,p_1 \cdots p_r = c\,p'_1 \cdots p'_s with all pip_i and pj′p'_j monic irreducible, the constant being the same by the previous step. Since ff is non-constant, r,s≥1r, s \ge 1, and (cp1)p2⋯pr=(cp1′)p2′⋯ps′(cp_1)p_2 \cdots p_r = (cp'_1)p'_2 \cdots p'_s are two factorizations into irreducibles. So r=sr = s, and after renumbering each pip_i is an associate of pi′p'_i: pi′=upip'_i = up_i for a non-zero constant uu. Comparing leading coefficients of these monic polynomials gives u=1u = 1, so pi′=pip'_i = p_i.

□

12.5 Gauss's lemma

Z[x]\mathbb{Z}[x] is not a PID (Example 12.3.5), so Theorem 12.4.3 says nothing about whether its factorizations are unique. A polynomial with integer coefficients can be factored in Q[x]\mathbb{Q}[x], where factorization is unique (Theorem 12.4.4), and the question is whether the factors can be brought back to Z[x]\mathbb{Z}[x]. Two tools do this for any UFD RR in place of Z\mathbb{Z}: a field containing RR, as Q\mathbb{Q} contains Z\mathbb{Z}, and Gauss’s lemma.

The field of fractions

The rational numbers are fractions a/ba/b of integers, with 1/2=2/41/2 = 2/4 because 1⋅4=2⋅21 \cdot 4 = 2 \cdot 2. The same construction works over any integral domain.

Definition 12.5.1 (Field of fractions).Not yet reviewed

Let RR be an integral domain. Call two pairs (a,b)(a, b) and (c,d)(c, d) of elements of RR, with b≠0b \neq 0 and d≠0d \neq 0, equivalent when ad=bcad = bc. This is an equivalence relation; write a/ba/b for the class of (a,b)(a, b). The field of fractions Frac⁡(R)\Frac(R) is the set of these classes, with

ab+cd=ad+bcbd,ab⋅cd=acbd.\begin{aligned} \frac{a}{b} + \frac{c}{d} &= \frac{ad + bc}{bd}, \\ \frac{a}{b} \cdot \frac{c}{d} &= \frac{ac}{bd}. \end{aligned}

These operations are well defined and make Frac⁡(R)\Frac(R) a field. The map a↦a/1a \mapsto a/1 is an injective ring homomorphism R→Frac⁡(R)R \to \Frac(R), and aa is identified with a/1a/1, so that RR is a subring of Frac⁡(R)\Frac(R).

Why the field of fractions is a field.

Idea. Every claim is an identity between elements of RR, after cross-multiplying. Two facts about integral domains do the work: a product of non-zero elements is non-zero, and a non-zero factor can be canceled.

  1. The relation is an equivalence relation.

    It is reflexive, since ab=baab = ba, and symmetric, since ad=bcad = bc gives cb=dacb = da. For transitivity, suppose ad=bcad = bc and cf=decf = de, with b,d,fb, d, f non-zero. Then adf=bcf=bdeadf = bcf = bde, so d(af−be)=0d(af - be) = 0, and since d≠0d \neq 0, af=beaf = be.

  2. The operations are well defined.

    They make sense: bd≠0bd \neq 0, since bb and dd are non-zero and RR has no zero divisors. The result must not depend on the pairs chosen, as for residue classes. Suppose ab′=a′bab' = a'b. Then

    (ad+bc) b′d=ab′d2+bb′cd=a′bd2+bb′cd=(a′d+b′c) bd,\begin{aligned} (ad + bc)\,b'd &= ab'd^2 + bb'cd \\ &= a'bd^2 + bb'cd \\ &= (a'd + b'c)\,bd, \end{aligned}

    so (ad+bc)/bd=(a′d+b′c)/b′d(ad + bc)/bd = (a'd + b'c)/b'd; and ac⋅b′d=a′c⋅bdac \cdot b'd = a'c \cdot bd, so ac/bd=a′c/b′dac/bd = a'c/b'd. Changing the second pair is the same computation, since both formulas are symmetric in the two fractions.

  3. The ring axioms hold.

    One rule helps: ae/be=a/bae/be = a/b whenever e≠0e \neq 0, since ae⋅b=be⋅aae \cdot b = be \cdot a. Both operations are commutative, because the formulas are symmetric. Multiplication is associative, with both bracketings giving ace/bdface/bdf, and so is addition, with both giving (adf+bcf+bde)/bdf(adf + bcf + bde)/bdf. The zero is 0/10/1, the negative of a/ba/b is (−a)/b(-a)/b, since their sum 0/b20/b^2 equals 0/10/1, and the one is 1/11/1. For distributivity,

    acbd+aebf=acbf+bdaeb2df=b(acf+ade)b(bdf)=a(cf+de)bdf,\begin{aligned} \frac{ac}{bd} + \frac{ae}{bf} &= \frac{acbf + bdae}{b^2df} \\ &= \frac{b(acf + ade)}{b(bdf)} \\ &= \frac{a(cf + de)}{bdf}, \end{aligned}

    which is ab(cd+ef)\frac{a}{b}\bigl(\frac{c}{d} + \frac{e}{f}\bigr).

  4. Frac⁡(R)\Frac(R) is a field.

    1/1≠0/11/1 \neq 0/1, since 1⋅1≠1⋅01 \cdot 1 \neq 1 \cdot 0. A fraction a/ba/b equals 0/10/1 exactly when a=0a = 0; if a≠0a \neq 0, then b/ab/a is a fraction and ab⋅ba=abab=11\frac{a}{b} \cdot \frac{b}{a} = \frac{ab}{ab} = \frac{1}{1}.

  5. The map a↦a/1a \mapsto a/1 is an injective ring homomorphism.

    a/1+c/1=(a+c)/1a/1 + c/1 = (a + c)/1, (a/1)(c/1)=ac/1(a/1)(c/1) = ac/1, and 1↦1/11 \mapsto 1/1; and a/1=c/1a/1 = c/1 means a=ca = c.

□

For a field FF, the elements of Frac⁡(F[x])\Frac(F[x]) are the rational functions over FF, and this field is written F(x)F(x).

In Frac⁡(R)\Frac(R) a fraction is a quotient in the field: a/b=(a/1)(1/b)a/b = (a/1)(1/b), and 1/b1/b is the inverse of b/1b/1. So from now on a/ba/b means ab−1ab^{-1}, and an element of Frac⁡(R)[x]\Frac(R)[x] can be given a common denominator: if the coefficients are a0/b0,…,an/bna_0/b_0, \dots, a_n/b_n, multiplying by b=b0⋯bnb = b_0 \cdots b_n gives a polynomial with coefficients in RR.

Primitive polynomials

Over a UFD, the common factor of the coefficients of a polynomial can be split off, as 6x+46x + 4 is 2(3x+2)2(3x + 2).

Definition 12.5.2 (Primitive polynomial; content).

Let RR be a UFD. A non-zero polynomial f∈R[x]f \in R[x] is primitive if no irreducible element of RR divides all of its coefficients.

Every non-zero f∈R[x]f \in R[x] can be written as f=cf1f = cf_1 with c∈Rc \in R and f1∈R[x]f_1 \in R[x] primitive. Such an element cc is a content of ff, written c(f)c(f).

Why every polynomial has a content.

Idea. Divide out irreducible common factors one at a time; the leading coefficient loses an irreducible factor each time, so this stops. The argument is an induction on the number of irreducible factors of the leading coefficient aa of ff.

  1. For a non-zero a∈Ra \in R, the number ℓ(a)\ell(a) of irreducible factors of aa is well defined.

    It is 00 if aa is a unit, and otherwise the rr in a factorization a=p1⋯pra = p_1 \cdots p_r, which is the same for every factorization, by uniqueness.

  2. If no irreducible divides all the coefficients of ff, then f=1⋅ff = 1 \cdot f is the required form.

    ff is then primitive, by the definition.

  3. When ℓ(a)=0\ell(a) = 0, no irreducible divides all the coefficients of ff.

    An irreducible pp dividing the unit aa, say a=pea = pe, would itself be a unit, since p(ea−1)=1p(ea^{-1}) = 1.

  4. If some irreducible pp divides every coefficient, then f=pgf = pg, and the leading coefficient a′a' of gg has ℓ(a′)=ℓ(a)−1\ell(a') = \ell(a) - 1.

    Dividing each coefficient by pp gives f=pgf = pg with g∈R[x]g \in R[x], and a=pa′a = pa'. Appending pp to a factorization of a′a' gives one of aa (and if a′a' is a unit, a=pa′a = pa' is irreducible).

  5. So ff has a content.

    By induction, g=c′g1g = c'g_1 with g1g_1 primitive, so f=(pc′)g1f = (pc')g_1.

□

Gauss’s lemma

Theorem 12.5.3 (Gauss’s lemma).Not yet reviewed

Let RR be a UFD and K=Frac⁡(R)K = \Frac(R).

  • (i) A product of primitive polynomials in R[x]R[x] is primitive.
  • (ii) If cf1=dg1cf_1 = dg_1 with c,d∈Rc, d \in R non-zero and f1,g1∈R[x]f_1, g_1 \in R[x] primitive, then c∼dc \sim d. So any two contents of a polynomial are associates; and a content of ff divides every coefficient of ff, and every common divisor of the coefficients divides it.
  • (iii) If a primitive f∈R[x]f \in R[x] is a product f=ghf = gh with g,h∈K[x]g, h \in K[x], then f=g1h1f = g_1h_1 with g1,h1∈R[x]g_1, h_1 \in R[x] primitive, g1=λgg_1 = \lambda g and h1=λ−1hh_1 = \lambda^{-1}h for some non-zero λ∈K\lambda \in K. In particular deg⁡g1=deg⁡g\deg g_1 = \deg g and deg⁡h1=deg⁡h\deg h_1 = \deg h.
Proof.

Idea. An irreducible element of a UFD is prime (Theorem 12.2.3), so it can be followed through products of coefficients; (iii) then clears denominators and uses (i) and (ii) to show that nothing was lost.

  1. (i) A product fgfg of primitive polynomials is primitive.

    Let f=∑aixif = \sum a_ix^i and g=∑bjxjg = \sum b_jx^j be primitive, and let pp be irreducible, so prime. Let i0i_0 be the least index with p∤ai0p \nmid a_{i_0}, and j0j_0 the least with p∤bj0p \nmid b_{j_0}; they exist because ff and gg are primitive. The coefficient of xi0+j0x^{i_0 + j_0} in fgfg is the sum of the aibja_ib_j with i+j=i0+j0i + j = i_0 + j_0. Every term other than ai0bj0a_{i_0}b_{j_0} has i<i0i < i_0 or j<j0j < j_0, so pp divides it. And p∤ai0bj0p \nmid a_{i_0}b_{j_0}, because pp is prime and divides neither factor (Definition 12.2.2). So pp does not divide this coefficient of fgfg. As pp was any irreducible, fgfg is primitive.

  2. (ii) If cf1=dg1cf_1 = dg_1 as in (ii) and cc is a unit, then c∼dc \sim d.

    Part (ii) is proved by induction on ℓ(c)\ell(c), the number of irreducible factors of cc, as in the definition of content; this is the case ℓ(c)=0\ell(c) = 0. Write aja_j for the coefficients of f1f_1 and bjb_j for those of g1g_1. Suppose dd is not a unit; then it has an irreducible factor pp. Since pp divides every coefficient of dg1=cf1dg_1 = cf_1, p∣cajp \mid ca_j for every jj. Since pp is prime and does not divide the unit cc, pp divides every aja_j, which is impossible for a primitive f1f_1. So dd is a unit, and c∼dc \sim d.

  3. (ii) If ℓ(c)≥1\ell(c) \ge 1, then c∼dc \sim d.

    Let pp be an irreducible factor of cc. Then pp divides every coefficient of cf1=dg1cf_1 = dg_1, so p∣dbjp \mid db_j for every jj. Some bjb_j is not divisible by pp, as g1g_1 is primitive, so p∣dp \mid d. Write c=pc′c = pc' and d=pd′d = pd'. Then p(c′f1−d′g1)=0p(c'f_1 - d'g_1) = 0, and since R[x]R[x] is an integral domain (Theorem 11.1.2), c′f1=d′g1c'f_1 = d'g_1. As ℓ(c′)=ℓ(c)−1\ell(c') = \ell(c) - 1, induction gives c′∼d′c' \sim d', and so c∼dc \sim d.

  4. (ii) A content cc of ff divides every coefficient of ff, and every common divisor of the coefficients divides cc.

    If f=cf1f = cf_1, then cc divides each coefficient of ff. If ee divides every coefficient, then f=egf = eg with g∈R[x]g \in R[x]; writing g=c′g1g = c'g_1 with g1g_1 primitive gives f=(ec′)g1f = (ec')g_1, so c∼ec′c \sim ec' by the previous steps, and e∣ce \mid c.

  5. (iii) After clearing denominators, f=(ug2)h1f = (ug_2)h_1 with g2,h1∈R[x]g_2, h_1 \in R[x] primitive and uu a unit of RR.

    Since f≠0f \neq 0, gg and hh are non-zero. Clearing denominators, choose non-zero a,b∈Ra, b \in R with agag and bhbh in R[x]R[x], and write ag=cg2ag = cg_2 and bh=dh1bh = dh_1 with g2,h1g_2, h_1 primitive. Then

    ab f=cd g2h1.ab\,f = cd\,g_2h_1.

    By (i), g2h1g_2h_1 is primitive, and ff is primitive, so by (ii), cd=u abcd = u\,ab for a unit uu of RR. Canceling abab gives f=(ug2)h1f = (ug_2)h_1.

  6. (iii) g1=ug2g_1 = ug_2 is primitive, g1=λgg_1 = \lambda g and h1=λ−1hh_1 = \lambda^{-1}h with λ=ua/c\lambda = ua/c, and the degrees are unchanged.

    An irreducible dividing every coefficient of ug2ug_2 would divide every coefficient of g2=u−1(ug2)g_2 = u^{-1}(ug_2). Then g1=(ua/c) g=λgg_1 = (ua/c)\,g = \lambda g, and h1=(b/d) hh_1 = (b/d)\,h with λ⋅b/d=uab/cd=1\lambda \cdot b/d = uab/cd = 1. Multiplying by a non-zero constant does not change the degree.

□

A polynomial is primitive exactly when its content is a unit: if ff is primitive, 11 is a content, and by (ii) every content is an associate of 11. Conversely, if f=uf1f = uf_1 with uu a unit and f1f_1 primitive, then ff is primitive, since an irreducible dividing every coefficient of ff would divide every coefficient of f1=u−1ff_1 = u^{-1}f. So (iii) says that a primitive polynomial which factors in K[x]K[x] into factors of smaller degree already factors that way in R[x]R[x].

12.6 Polynomials over a unique factorization domain

Z[x]\mathbb{Z}[x] is not a PID, yet its elements look as if they factor uniquely: split off the greatest common divisor of the coefficients, which factors in Z\mathbb{Z}, and factor the rest in Q[x]\mathbb{Q}[x]. Gauss’s lemma (Theorem 12.5.3) makes this work with any UFD in place of Z\mathbb{Z}.

Theorem 12.6.1 (Polynomials over a UFD factor uniquely).Not yet reviewed

Let RR be a UFD and K=Frac⁡(R)K = \Frac(R). Then R[x]R[x] is a UFD. Its irreducible elements are:

  • (i) the irreducible elements of RR, as constant polynomials, and
  • (ii) the primitive polynomials of degree at least 11 that are irreducible in K[x]K[x].

In particular Z[x]\mathbb{Z}[x] is a UFD.

Proof.

Idea. Split a polynomial into a content and a primitive part. The content factors in RR. The primitive part factors in K[x]K[x], where factorization is unique (Theorem 12.4.4), and Gauss’s lemma brings each factor back to R[x]R[x] as a primitive polynomial. Uniqueness is checked the same way: contents in RR, primitive parts in K[x]K[x].

  1. R[x]R[x] is an integral domain, and its units are the units of RR.

  2. The elements in (i) and (ii) are irreducible in R[x]R[x].

    Let pp be irreducible in RR. It is not a unit of R[x]R[x], by the first step. If p=ghp = gh in R[x]R[x], the degrees add up to 00, so g,h∈Rg, h \in R, and one of them is a unit.

    Let ff be primitive of degree at least 11 and irreducible in K[x]K[x]. It is not a unit, as it is not constant. If f=ghf = gh in R[x]R[x], then one factor is constant, since otherwise this would be a factorization in K[x]K[x] into factors of smaller degree. Say g=c∈Rg = c \in R. Then cc divides every coefficient of ff, so no irreducible element of RR divides cc; as every non-zero non-unit of the UFD RR has an irreducible factor, cc is a unit.

  3. Every irreducible element qq of R[x]R[x] is of kind (i) or (ii).

    If qq is constant, a factorization of qq in RR is one in R[x]R[x], with the same units, so qq is irreducible in RR. If deg⁡q≥1\deg q \ge 1, write q=cq1q = cq_1 with q1q_1 primitive. Then q1q_1 is not a unit, so cc is, and q=cq1q = cq_1 is primitive. If qq were a product of two factors of smaller degree in K[x]K[x], Theorem 12.5.3 (iii) would give such a product in R[x]R[x], of two non-constant factors, which are non-units. So qq is irreducible in K[x]K[x].

  4. Every non-zero non-unit ff of R[x]R[x] is a product of irreducibles.

    Write f=cf1f = cf_1 with f1f_1 primitive. If f1f_1 is constant, it is a unit (no irreducible divides it), so ff is a non-unit of RR and factors into irreducibles of RR. If deg⁡f1≥1\deg f_1 \ge 1, Theorem 12.4.4 gives f1=q1⋯qkf_1 = q_1 \cdots q_k in K[x]K[x] with each qiq_i irreducible in K[x]K[x] (put the constant into q1q_1). By Theorem 12.5.3 (iii), f1=g1hf_1 = g_1h with g1=λq1g_1 = \lambda q_1 and h=λ−1q2⋯qkh = \lambda^{-1}q_2 \cdots q_k primitive in R[x]R[x]; repeating with hh gives f1=g1⋯gkf_1 = g_1 \cdots g_k, each gig_i primitive and a non-zero constant multiple of qiq_i, so irreducible in K[x]K[x], and irreducible in R[x]R[x] by the second step. Finally, factor cc in RR if it is not a unit, or put it into g1g_1 if it is.

  5. Two factorizations of ff into irreducibles agree up to order and associates.

    Group each factorization into its constant factors, with product AA (or A=1A = 1 if there are none), and its non-constant factors, with product BB, so f=AB=A′B′f = AB = A'B'. Each non-constant factor is primitive, by the third step, so BB and B′B' are primitive by Theorem 12.5.3 (i) (or equal to 11, which is primitive, if there are no non-constant factors). So AA and A′A' are contents of ff, and A′=uAA' = uA for a unit uu by Theorem 12.5.3 (ii). A non-empty product of irreducibles is not a unit, so both products of constants are empty, or neither is; in the second case uniqueness in RR, applied to A′=(up1)p2⋯pmA' = (up_1)p_2 \cdots p_m, matches the constant factors up to order and associates.

    Canceling AA from AB=uAB′AB = uAB' gives B=uB′B = uB'. The non-constant factors are irreducible in K[x]K[x] by the third step, so Theorem 12.4.4, with each factor written as a constant times a monic polynomial, gives the same number of them and, after renumbering, gi=μigi′g_i = \mu_ig'_i with μi∈K\mu_i \in K non-zero. Write μi=a/b\mu_i = a/b with a,b∈Ra, b \in R; then bgi=agi′bg_i = ag'_i with gig_i and gi′g'_i primitive, so a∼ba \sim b by Theorem 12.5.3 (ii), and μi\mu_i is a unit of RR. So gi∼gi′g_i \sim g'_i in R[x]R[x].

□

12.7 Sums of two squares

Which primes are sums of two squares? 5=1+45 = 1 + 4 and 13=4+913 = 4 + 9 are, while 33 and 77 are not. In Z[i]\mathbb{Z}[i] the question becomes one about factors, since a2+b2=(a+bi)(a−bi)a^2 + b^2 = (a + bi)(a - bi): a prime pp is a sum of two squares exactly when it splits in Z[i]\mathbb{Z}[i] into two factors of norm pp. The Gaussian integers form a PID (Theorem 12.3.4), and that settles the question.

Theorem 12.7.1 (Sums of two squares).
  • (i) An odd prime pp is a sum of two squares of integers if and only if p≡1(mod4)p \equiv 1 \pmod 4.
  • (ii) Up to units, the irreducible elements of Z[i]\mathbb{Z}[i] are: 1+i1 + i; the elements a+bia + bi for which a2+b2a^2 + b^2 is a prime congruent to 11 mod 44; and the primes of Z\mathbb{Z} that are congruent to 33 mod 44.
Proof.

Idea. For (i), find an integer nn with p∣n2+1p \mid n^2 + 1. Then pp divides (n+i)(n−i)(n + i)(n - i) but neither factor, so pp is not prime in Z[i]\mathbb{Z}[i]; in a PID that means it is not irreducible, and a factor of pp of norm pp is a sum of two squares.

  1. (i), only if: an odd sum of two squares is 11 mod 44.

    A square is 00 or 11 mod 44, since (2m)2=4m2(2m)^2 = 4m^2 and (2m+1)2=4(m2+m)+1(2m + 1)^2 = 4(m^2 + m) + 1. So a sum of two squares is 00, 11 or 22 mod 44, and an odd one is 11 mod 44.

  2. Wilson’s theorem: (p−1)!≡−1(modp){(p - 1)! \equiv -1 \pmod p}.

    In the field Fp\mathbb{F}_p (Theorem 10.2.6) every non-zero class xx has an inverse. A class is its own inverse exactly when x2=1x^2 = 1, and x2−1x^2 - 1 has at most two roots in Fp\mathbb{F}_p (Theorem 11.2.3), namely 11 and −1-1, which differ because pp is odd. So the other non-zero classes fall into pairs {x,x−1}\{x, x^{-1}\} with product 11, and the product of all non-zero classes, [1][2]⋯[p−1]=[(p−1)!][1][2] \cdots [p - 1] = [(p - 1)!], is 1⋅(−1)=−11 \cdot (-1) = -1.

  3. If p=4k+1p = 4k + 1, then n=(2k)!n = (2k)! has p∣n2+1p \mid n^2 + 1.

    Pair each j≤2kj \le 2k in (p−1)!(p - 1)! with p−j≡−jp - j \equiv -j:

    (p−1)!≡∏j=12kj(−j)=(−1)2k((2k)!)2(modp).\begin{aligned} (p - 1)! &\equiv \prod_{j = 1}^{2k} j(-j) \\ &= (-1)^{2k}\bigl((2k)!\bigr)^2 \pmod p. \end{aligned}

    So by Wilson’s theorem n2≡−1n^2 \equiv -1, that is, p∣n2+1p \mid n^2 + 1.

  4. Such a pp is not irreducible in Z[i]\mathbb{Z}[i].

    In Z[i]\mathbb{Z}[i], n2+1=(n+i)(n−i)n^2 + 1 = (n + i)(n - i). But pp divides neither factor: p(c+di)=n±ip(c + di) = n \pm i would need pd=±1pd = \pm 1. So pp is not a prime element of Z[i]\mathbb{Z}[i], and since Z[i]\mathbb{Z}[i] is a PID (Theorem 12.3.4), pp is not irreducible (Theorem 12.4.1).

  5. (i), if: p=a2+b2p = a^2 + b^2 for some integers a,ba, b.

    Since N(p)=p2N(p) = p^2 is neither 00 nor 11, pp is a non-zero non-unit (Proposition 12.1.3). As it is not irreducible, p=zwp = zw with z,wz, w non-units. Then N(z)N(w)=N(p)=p2N(z)N(w) = N(p) = p^2 with neither factor 11, so N(z)=pN(z) = p, and z=a+biz = a + bi gives a2+b2=pa^2 + b^2 = p.

  6. (ii) The listed elements are irreducible.

    1+i1 + i has norm 22, and a+bia + bi with a2+b2=pa^2 + b^2 = p has norm pp; both norms are prime, so both elements are irreducible by Proposition 12.1.3 (iii). A prime q≡3(mod4)q \equiv 3 \pmod 4 has norm q2q^2, so a factor that is not a unit would have norm qq, making qq a sum of two squares, which the first step rules out.

  7. (ii) An irreducible π\pi of Z[i]\mathbb{Z}[i] divides a prime qq of Z\mathbb{Z}, and N(π)N(\pi) is qq or q2q^2.

    Its norm N(π)=ππˉN(\pi) = \pi\bar\pi is an integer greater than 11, so it is a product of primes of Z\mathbb{Z}, and π\pi divides this product in Z[i]\mathbb{Z}[i]. Since π\pi is prime (Theorem 12.4.1), it divides one of these primes, qq. From q=πγq = \pi\gamma, N(π)N(γ)=q2N(\pi)N(\gamma) = q^2, so N(π)N(\pi) is qq or q2q^2.

  8. If N(π)=q2N(\pi) = q^2, then π\pi is an associate of qq, and q≡3(mod4)q \equiv 3 \pmod 4.

    Then N(γ)=1N(\gamma) = 1, γ\gamma is a unit, and qq is an associate of π\pi, so qq is irreducible in Z[i]\mathbb{Z}[i]. Then q≠2q \neq 2, since 2=(1+i)(1−i)2 = (1 + i)(1 - i), and q≢1(mod4)q \not\equiv 1 \pmod 4, since otherwise q=a2+b2=(a+bi)(a−bi)q = a^2 + b^2 = (a + bi)(a - bi) by (i). So q≡3(mod4)q \equiv 3 \pmod 4.

  9. If N(π)=qN(\pi) = q, then π\pi is an associate of 1+i1 + i or one of the listed a+bia + bi. This proves (ii).

    Write π=a+bi\pi = a + bi, so a2+b2=qa^2 + b^2 = q. For q=2q = 2, aa and bb are ±1\pm 1, and the four elements ±1±i\pm 1 \pm i are the associates of 1+i1 + i. For odd qq, q≡1(mod4)q \equiv 1 \pmod 4 by (i), and π\pi is one of the listed elements a+bia + bi.

□

Pierre de Fermat stated (i) in a letter to Marin Mersenne dated 25 December 1640, without proof. Leonhard Euler sent a proof to Christian Goldbach in 1749, and published it in two papers of the St Petersburg Academy, in its volumes for 1752–1755 (printed in 1758 and 1760).

Unique factorization: Exercises

Exercise 12.1.

In Z[i]\mathbb{Z}[i]:

  • (a) Write 1010 as a product of irreducible elements, and prove that each factor is irreducible.
  • (b) Also 10=(3+i)(3−i)10 = (3 + i)(3 - i). Factor 3+i3 + i and 3−i3 - i into irreducibles, and check that the result agrees with (a) up to order and associates.
Solution.

(a) 10=2⋅5=(1+i)(1−i)(2+i)(2−i)10 = 2 \cdot 5 = (1 + i)(1 - i)(2 + i)(2 - i), since (1+i)(1−i)=2(1 + i)(1 - i) = 2 and (2+i)(2−i)=5(2 + i)(2 - i) = 5. The norms (Proposition 12.1.3) are N(1±i)=2N(1 \pm i) = 2 and N(2±i)=5N(2 \pm i) = 5, both prime, so all four factors are irreducible by part (iii) of that proposition.

(b) (1+i)(2−i)=2−i+2i−i2=3+i(1 + i)(2 - i) = 2 - i + 2i - i^2 = 3 + i and (1−i)(2+i)=2+i−2i−i2=3−i(1 - i)(2 + i) = 2 + i - 2i - i^2 = 3 - i. So (3+i)(3−i)=(1+i)(2−i)(1−i)(2+i)(3 + i)(3 - i) = (1 + i)(2 - i)(1 - i)(2 + i): the same four irreducible factors as in (a), in a different order. (Since 1−i=−i(1+i)1 - i = -i(1 + i), the factors 1+i1 + i and 1−i1 - i are themselves associates, and 10=−i(1+i)2(2+i)(2−i)10 = -i(1 + i)^2(2 + i)(2 - i).) □

Exercise 12.2.

Let d=−6d = -6, so that Z[−6]={a+b−6:a,b∈Z}\mathbb{Z}[\sqrt{-6}] = \{a + b\sqrt{-6} : a, b \in \mathbb{Z}\} has norm N(a+b−6)=a2+6b2N(a + b\sqrt{-6}) = a^2 + 6b^2. Show that 6=2⋅3=−6⋅(−−6)6 = 2 \cdot 3 = \sqrt{-6} \cdot (-\sqrt{-6}) are two factorizations into irreducible elements that do not agree up to order and associates, so that Z[−6]\mathbb{Z}[\sqrt{-6}] is not a UFD.

Hint.

Compute the norms of 22, 33 and −6\sqrt{-6}, and ask which values a2+6b2a^2 + 6b^2 can take.

Solution.

The plan is the one used for Z[−5]\mathbb{Z}[\sqrt{-5}] (Theorem 12.2.4): show by norms that no factor can be split, and that factors on different sides have different norms.

First, −6⋅(−−6)=−(−6)2=−(−6)=6\sqrt{-6} \cdot (-\sqrt{-6}) = -(\sqrt{-6})^2 = -(-6) = 6.

The units are ±1\pm 1: by Proposition 12.1.3 (ii) a unit has norm ±1\pm 1, and a2+6b2=1a^2 + 6b^2 = 1 forces b=0b = 0 and a=±1a = \pm 1.

The values of a2+6b2a^2 + 6b^2 never include 22 or 33: if b≠0b \neq 0 the value is at least 66, and if b=0b = 0 it is a square.

Now N(2)=4N(2) = 4, N(3)=9N(3) = 9 and N(±−6)=6N(\pm\sqrt{-6}) = 6. A factor that is not a unit would have norm 22 (for 22), 33 (for 33) or 22 or 33 (for ±−6\pm\sqrt{-6}), and none exists. So all of 22, 33, −6\sqrt{-6} and −−6-\sqrt{-6} are irreducible, by Proposition 12.1.3 (iii).

Associates have equal norms, since units have norm 11. The norms 44 and 99 of 22 and 33 differ from the norm 66 of ±−6\pm\sqrt{-6}, so neither 22 nor 33 is an associate of −6\sqrt{-6} or of −−6-\sqrt{-6}. The two factorizations of 66 cannot be matched up to associates, so uniqueness fails and Z[−6]\mathbb{Z}[\sqrt{-6}] is not a UFD. □

Exercise 12.3.

In Z[i]\mathbb{Z}[i], use division with remainder to show that the ideal (11+8i,3+i)(11 + 8i, 3 + i) is all of Z[i]\mathbb{Z}[i], and find u,v∈Z[i]u, v \in \mathbb{Z}[i] with u(11+8i)+v(3+i)=1u(11 + 8i) + v(3 + i) = 1.

Solution.

Divide as in Theorem 12.3.4. In C\mathbb{C},

11+8i3+i=(11+8i)(3−i)10=41+13i10,\begin{aligned} \frac{11 + 8i}{3 + i} &= \frac{(11 + 8i)(3 - i)}{10} \\ &= \frac{41 + 13i}{10}, \end{aligned}

which is 4.1+1.3i4.1 + 1.3i. Rounding gives q=4+iq = 4 + i, and

r=(11+8i)−(4+i)(3+i)=(11+8i)−(11+7i)=i.\begin{aligned} r &= (11 + 8i) - (4 + i)(3 + i) \\ &= (11 + 8i) - (11 + 7i) = i. \end{aligned}

So i=(11+8i)−(4+i)(3+i)i = (11 + 8i) - (4 + i)(3 + i) lies in the ideal. It is a unit, so the ideal is all of Z[i]\mathbb{Z}[i] (Theorem 10.6.1). Multiplying by −i-i gives

1=−i(11+8i)+i(4+i)(3+i),1 = -i(11 + 8i) + i(4 + i)(3 + i),

so u=−iu = -i and v=i(4+i)=−1+4iv = i(4 + i) = -1 + 4i. □

Exercise 12.4.

Factor 3x4+123x^4 + 12 into irreducible elements of Z[x]\mathbb{Z}[x], and prove that each factor is irreducible.

Solution.

First split off the content: 3x4+12=3(x4+4)3x^4 + 12 = 3(x^4 + 4), and x4+4x^4 + 4 is primitive. By Example in Proposition 11.4.2,

x4+4=(x2+2x+2)(x2−2x+2).x^4 + 4 = (x^2 + 2x + 2)(x^2 - 2x + 2).

So 3x4+12=3(x2+2x+2)(x2−2x+2)3x^4 + 12 = 3(x^2 + 2x + 2)(x^2 - 2x + 2).

33 is irreducible in Z\mathbb{Z}, so in Z[x]\mathbb{Z}[x] by Theorem 12.6.1 (i). The quadratic x2+2x+2=(x+1)2+1x^2 + 2x + 2 = (x + 1)^2 + 1 is at least 11 for every real xx, so it has no rational root, and since it has degree 22 it is irreducible in Q[x]\mathbb{Q}[x] (Proposition 11.4.2). It is primitive, its leading coefficient being 11, so it is irreducible in Z[x]\mathbb{Z}[x] by Theorem 12.6.1 (ii). The same argument works for x2−2x+2=(x−1)2+1x^2 - 2x + 2 = (x - 1)^2 + 1. □

Exercise 12.5.

Show that Z[i]/(3)\mathbb{Z}[i]/(3) is a field with 99 elements.

Hint.

Decide first whether 33 is irreducible in Z[i]\mathbb{Z}[i], and what that says about the ideal (3)(3) in a PID. For the count, compare a+bia + bi with the element whose coefficients are the remainders of aa and bb mod 33.

Solution.

The plan is to show that (3)(3) is a maximal ideal, and then count cosets.

33 is irreducible in Z[i]\mathbb{Z}[i] (Example 12.1.4). Z[i]\mathbb{Z}[i] is a PID (Theorem 12.3.4), so (3)(3) is a maximal ideal (Theorem 12.4.1), and Z[i]/(3)\mathbb{Z}[i]/(3) is a field (Theorem 10.6.4 (ii)).

The multiples of 33 in Z[i]\mathbb{Z}[i] are the elements 3(m+ni)=3m+3ni3(m + ni) = 3m + 3ni: those whose two coefficients are both divisible by 33. So a+bia + bi and c+dic + di lie in the same coset of (3)(3) exactly when 3∣a−c3 \mid a - c and 3∣b−d3 \mid b - d. Every a+bia + bi is therefore in the coset of a′+b′ia' + b'i, where a′a' and b′b' are the remainders of aa and bb on division by 33; and two elements a′+b′ia' + b'i and c′+d′ic' + d'i with a′,b′,c′,d′∈{0,1,2}a', b', c', d' \in \{0, 1, 2\} lie in the same coset only if a′=c′a' = c' and b′=d′b' = d'. So the cosets are the nine classes of a′+b′ia' + b'i with a′,b′∈{0,1,2}a', b' \in \{0, 1, 2\}. □

Exercise 12.6.

Let RR be a PID, and let a,b∈Ra, b \in R, not both 00. Show that aa and bb have no irreducible factor in common if and only if (a,b)=R(a, b) = R, that is, if and only if 1=ra+sb1 = ra + sb for some r,s∈Rr, s \in R.

Hint.

For the harder direction, write (a,b)=(d)(a, b) = (d): a non-unit dd has an irreducible factor.

Solution.

Suppose (a,b)=R(a, b) = R, so 1=ra+sb1 = ra + sb. An irreducible pp dividing aa and bb would divide ra+sb=1ra + sb = 1, and so be a unit, which an irreducible element is not. So aa and bb have no irreducible factor in common.

Conversely, suppose (a,b)≠R(a, b) \neq R. As RR is a PID, (a,b)=(d)(a, b) = (d) for some d∈Rd \in R. Then dd is not a unit, since an ideal containing a unit is RR (Theorem 10.6.1), and d≠0d \neq 0, since aa and bb are not both 00. As RR is a UFD (Theorem 12.4.3), dd is a product of irreducibles; let pp be one of them. Then p∣dp \mid d, and dd divides aa and bb, since aa and bb lie in (d)(d). So pp is a common irreducible factor. □

Exercise 12.7.

Let f∈Z[x]f \in \mathbb{Z}[x] be monic, and suppose f=ghf = gh with g,h∈Q[x]g, h \in \mathbb{Q}[x] monic. Show that gg and hh lie in Z[x]\mathbb{Z}[x].

Hint.

A monic polynomial is primitive. Compare leading coefficients in the factorization that Gauss’s lemma provides.

Solution.

The leading coefficient of ff is 11, which no irreducible element of Z\mathbb{Z} divides, so ff is primitive. By Theorem 12.5.3 (iii), with R=ZR = \mathbb{Z} and K=QK = \mathbb{Q}, there is a non-zero λ∈Q\lambda \in \mathbb{Q} with λg\lambda g and λ−1h\lambda^{-1}h in Z[x]\mathbb{Z}[x]. The leading coefficients of these two polynomials are λ\lambda and λ−1\lambda^{-1}, since gg and hh are monic. Both are integers and their product is 11, so λ=±1\lambda = \pm 1. Then g=±(λg)g = \pm(\lambda g) and h=±(λ−1h)h = \pm(\lambda^{-1}h) lie in Z[x]\mathbb{Z}[x]. □

Exercise 12.8.Not yet reviewed

Let RR be the set of polynomials f∈Q[x]f \in \mathbb{Q}[x] whose constant term f(0)f(0) is an integer.

  • (a) Show that RR is a subring of Q[x]\mathbb{Q}[x], and so an integral domain.
  • (b) Show that (x)⊊(x/2)⊊(x/4)⊊⋯(x) \subsetneq (x/2) \subsetneq (x/4) \subsetneq \cdots in RR, where (x/2k)(x/2^k) is the principal ideal of RR generated by x/2kx/2^k.
  • (c) Deduce that RR is not a PID.
Hint.

For (b), write x/2kx/2^k as a multiple of x/2k+1x/2^{k+1}.

Solution.

(a) The constant term of a sum, negative or product is the sum, negative or product of the constant terms, and 1∈R1 \in R. So RR contains 11 and is closed under sums, negatives and products: it is a subring of Q[x]\mathbb{Q}[x]. A subring of an integral domain is an integral domain, and Q[x]\mathbb{Q}[x] is one (Theorem 11.1.2).

(b) Each x/2kx/2^k lies in RR, its constant term being 00. Since x/2k=2⋅(x/2k+1)x/2^k = 2 \cdot (x/2^{k+1}) and 2∈R2 \in R, every multiple of x/2kx/2^k is a multiple of x/2k+1x/2^{k+1}, so (x/2k)⊆(x/2k+1)(x/2^k) \subseteq (x/2^{k+1}). The inclusion is strict: if x/2k+1=r⋅(x/2k)x/2^{k+1} = r \cdot (x/2^k) with r∈Rr \in R, then canceling x/2kx/2^k in the integral domain Q[x]\mathbb{Q}[x] gives r=12r = \tfrac{1}{2}, whose constant term is not an integer.

(c) The chain in (b) never stops. In a PID every ascending chain of ideals stops (Lemma 12.4.2), so RR is not a PID. □

Exercise 12.9.

Let N(a+b2)=a2−2b2N(a + b\sqrt{2}) = a^2 - 2b^2 on Z[2]\mathbb{Z}[\sqrt{2}]. Show that Z[2]\mathbb{Z}[\sqrt{2}] is a Euclidean domain with size function δ(z)=∣N(z)∣\delta(z) = \lvert N(z)\rvert, and deduce that it is a UFD.

Hint.

Copy the proof for Z[i]\mathbb{Z}[i]: divide in the real numbers, write the quotient as s+t2s + t\sqrt{2} with s,ts, t rational, and round ss and tt. You need NN for such numbers too.

Solution.

The approach is the one that worked for Z[i]\mathbb{Z}[i] (Theorem 12.3.4): divide exactly, round to the nearest element of the ring, and show by the norm that the remainder is smaller.

Extend the norm to the numbers s+t2s + t\sqrt{2} with s,ts, t rational, by N(s+t2)=s2−2t2N(s + t\sqrt{2}) = s^2 - 2t^2. Since 2\sqrt{2} is irrational, each such number has only one such form, and the computation of Proposition 12.1.3 (i), which used nothing about a,b,c,ea, b, c, e but the rules of arithmetic, shows that N(αβ)=N(α)N(β)N(\alpha\beta) = N(\alpha)N(\beta) for these numbers too. Also δ(z)=∣N(z)∣\delta(z) = \lvert N(z)\rvert is a positive integer for every non-zero z∈Z[2]z \in \mathbb{Z}[\sqrt{2}], by part (i) of that proposition.

Let z,w∈Z[2]z, w \in \mathbb{Z}[\sqrt{2}] with w≠0w \neq 0. With wˉ=c−e2\bar{w} = c - e\sqrt{2} for w=c+e2w = c + e\sqrt{2},

zw=zwˉN(w)=s+t2\frac{z}{w} = \frac{z\bar{w}}{N(w)} = s + t\sqrt{2}

with ss and tt rational. Choose integers m,nm, n with ∣s−m∣≤12\lvert s - m\rvert \le \tfrac{1}{2} and ∣t−n∣≤12\lvert t - n\rvert \le \tfrac{1}{2}, put q=m+n2q = m + n\sqrt{2}, and r=z−qw∈Z[2]r = z - qw \in \mathbb{Z}[\sqrt{2}]. Then r=w((s−m)+(t−n)2)r = w\bigl((s - m) + (t - n)\sqrt{2}\bigr). Put u=(s−m)2u = (s - m)^2 and v=2(t−n)2v = 2(t - n)^2, so that 0≤u≤140 \le u \le \tfrac{1}{4}, 0≤v≤120 \le v \le \tfrac{1}{2}, and N((s−m)+(t−n)2)=u−vN\bigl((s - m) + (t - n)\sqrt{2}\bigr) = u - v. Since ∣u−v∣≤max⁡(u,v)\lvert u - v\rvert \le \max(u, v) for u,v≥0u, v \ge 0,

∣N(r)∣=∣N(w)∣ ∣u−v∣≤∣N(w)∣max⁡(u,v)≤12∣N(w)∣.\begin{aligned} \lvert N(r)\rvert &= \lvert N(w)\rvert \, \lvert u - v \rvert \\ &\le \lvert N(w)\rvert \max(u, v) \\ &\le \tfrac{1}{2}\lvert N(w)\rvert. \end{aligned}

So r=0r = 0 or δ(r)<δ(w)\delta(r) < \delta(w), and δ\delta is a size function.

By Theorem 12.3.3, Z[2]\mathbb{Z}[\sqrt{2}] is a PID, and by Theorem 12.4.3 it is a UFD. □

Exercise 12.10.

Let nn be a positive integer such that every prime q≡3(mod4)q \equiv 3 \pmod 4 divides nn an even number of times (possibly zero). Show that nn is a sum of two squares of integers. Use your method to write 9090 as a sum of two squares.

Hint.

a2+b2a^2 + b^2 is the norm of a+bia + bi, and norms multiply. Which primes, and which prime powers, are norms?

Solution.

The norm of Z[i]\mathbb{Z}[i] turns products into products (Proposition 12.1.3), so it is enough to write each prime power in nn as a norm.

nn is a product of primes 22, primes p≡1(mod4)p \equiv 1 \pmod 4, and squares q2q^2 of primes q≡3(mod4)q \equiv 3 \pmod 4, since each such qq occurs an even number of times. Each of these is a norm: 2=N(1+i)2 = N(1 + i); p=a2+b2=N(a+bi)p = a^2 + b^2 = N(a + bi) for some integers a,ba, b, by Theorem 12.7.1 (i); and q2=N(q)q^2 = N(q). So n=N(z1)⋯N(zk)=N(z1⋯zk)n = N(z_1)\cdots N(z_k) = N(z_1 \cdots z_k), and if z1⋯zk=a+biz_1 \cdots z_k = a + bi, then n=a2+b2n = a^2 + b^2. (For n=1n = 1, 1=12+021 = 1^2 + 0^2.)

For 90=2⋅5⋅3290 = 2 \cdot 5 \cdot 3^2: 2=N(1+i)2 = N(1 + i), 5=N(2+i)5 = N(2 + i) and 9=N(3)9 = N(3). Now (1+i)(2+i)⋅3=(1+3i)⋅3=3+9i(1 + i)(2 + i) \cdot 3 = (1 + 3i) \cdot 3 = 3 + 9i, so 90=32+9290 = 3^2 + 9^2. □