The set of integers. Let R be an integral domain. There exists a field FR and an embedding f :RFR such that every element of FR is of the form f(a)·f(b)-1 (a,b R, b0). Let F be a field, X an indeterminate over F, f a nonzero, nonconstant polynomial in F[X], a the leading coefficient of f. Then f can be written in the form f = af1*...ft*, where fi* is an irreducible, monic polynomial. Moreover, this decomposition is unique up to the order of the fi* Let x Rx, x UR and let x = 1...s = 1...t be two expressions of x as a product of irreducible elements. Then s = t and by renumbering 1,...,s, we can guarantee that i and i are associates (1 < i < s). Let f,g R[X] be primitive. Then fg is primitive. Let f R[X] be nonzero and let c be a g.c.d of the coefficients of f. Then f can be written in the form f = cf *, where f * R[X] is primitive. Let R be a unique factorization domain, a,b, R, irreducible. If |ab, then |a or |b. We say that R is a unique factorization domain if the following two conditions are satisfied: (1) If x Rx is not a unit of R, then x can be written as a product of irreducible elements of R.and (2) If x Rx is not a unit of R, and if x = 1 ... s = 1 ... t are two expressions of x as a product of irreducible elements, then s = t and it is possible to renumber 1 ... s so that 1 and 1 are associates (1 < i < s). A ring R having the property that every ideal is principal is called a principal ideal ring (PIR). If, in addition, R is an integral domain, then R is called a principal ideal domain (PID). Let R be a principal ideal domain. Then R is a unique factorization domain.

Let R be a ring x,y R. We say that x and y are associates if x = y for some unit of R. Let R be a ring with identity 1, and let a R. If a has an inverse with respect to multiplication, then we say that a is a unit of R.

### Unique Factorization in Polynomial Rings

We have seen that if F is a field and X is an indeterminate over F, then F[X] is a UFD. Thus, we can factor polynomials in one variable with coefficients in a field into a product of irreducible polynomials in an essentially unique way. Can the same be said for polynomials in several variables? In other words, if X1,...,Xn are indeterminates over F, is F[X1,...,Xn] a UFD? The only way which we have at our disposal to prove that F[X1,...,Xn] is a UFD is to verify that F[X1,...,Xn] is a PID. However, we have already seen that for n = 2, F[X1,...,Xn] is not a PID. Therefore, the machinery developed earlier is not sensitive enough to determine whether or not F[X1,...,Xn] is a UFD. We will prove that it is, but we will require several new ideas, which are due to Gauss, who first exploited them in the early part of the nineteenth century. Our main result will be

Theorem 1: Let R be a unique factorization domain and X an indeterminate over R. Then R[X] is a unique factorization domain.

Before we begin proving Theorem 1, let us mention two easy consequences of it.

Corollary 2: Let R be a unique factorization domain and let X1,...,Xn be indeterminates over R. Then R[X1,...,Xn] is a unique factorization domain.

Proof: Induction on n. The result is true for n = 1 by Theorem 1. Assume the result for n - 1 (n > 1). Then R[X1,...,Xn-1] is a UFD. Therefore, by Theorem 1, R[X1,...,Xn] = R[X1,...,Xn-1][Xn] is a UFD.

Corollary 3: Let F be a field, X1,...,Xn indeterminates over F. Then F[X1,...,Xn] is a unique factorization domain.

Proof: F is a PID since its only ideals are (0) and F = (1). Therefore, F is a UFD by Theorem 1 in the section on arithmetic in a principal ideal domain. Therefore, F[X1,...,Xn] is a UFD by Corollary 2 above.

To prove Theorem 1, it will be necessary to establish some preliminary machinery. Throughout the rest of this section, let R be a UFD. Let P be a set of irreducible elements of R such that

(1) every irreducible element of R is an associate of some element of P and

(2) no two elements of P are associates.

Such a set can be constructed as follows: Let P* denote the set of all irreducible elements of R. Define an equivalence relation ~ on P* by setting x ~ y if and only if x and y are associates. Then P can be gotten by choosing one element from each equivalence class of P* with respect to ~. Every element r Rx can be written in the form

(1)
x = a(x),

where a(x) is a nonnegative integer, is a unit of R, a(x) = 0 for all but a finite number of , and denotes the product over P for which a(x) > 0. The decomposition (1) follows from the fact that x can be written as a product of irreducible elements and every irreducible element of R is an associate of some P. Since factorization in R is unique, the decomposition (1) is unique, up to rearrangements of the P. (Here we use the fact that no two elements of P are associates.)

Let a1,...,an R. Then a greatest common divisor of a1,...,an is an element of R such that

1. c|a1, ..., c|an.

2. If d R such that d|a1, ..., d|an, then d|c.

In the case n = 2, this definition coincides with the definition of g.c.d which we gave earlier. As before, we can prove that if d and d' are two g.c.d's of a1,...,an, then d and d' are associates. We also showed that if at least one of a and b is nonzero, then a and b have a g.c.d when R is a PID. We can generalize this statement.

Lemma 4: Let R be a UFD, a1,...,an R not all 0. Then a1,...,an have a g.c.d.

Proof: Let

ai = i a(ai),    i a unit of R (1 < i < n).

For each P, let a be the smallest of a(ai),..., a(an). Then since a(ai) = 0 for all but a finite number of , we see that a = 0 for all but a finite number of , and thus we may set

c = a.

Then c is a g.c.d. of a1,...,an. We leave the details of this verification to the interested reader.

In an earlier section, we showed that if R is a principal ideal domain, a,b, R, irreducible, then |ab implies |a or |b. Let us observe that this is true in any unique factorization domain.

Proposition 5: Let R be a unique factorization domain, a,b, R, irreducible. If |ab, then |a or |b.

Proof: Since |ab, there exists k R such that ab = k. Without loss of generality, we may assume that a0, 0, k0. Since R is a UFD, we can write a and b as a product of irreducible elements. Since appears in a decomposition of k into a product of irreducible elements, the uniqueness of factorization implies that is an associate of either some irreducible element dividing a or some irreducible element dividing b. Thus, either |a or |b.

If 1 is a g.c.d of a1,...,an R, then we say that a1,...,an are relatively prime. Moreover, if c is a g.c.d. of a1,...,an R, then ai = kic (1 < i < n) for some ki R, and k1,...,kn are relatively prime.

Let us now turn to the study of polynomials f R[X]. Let f = a0 + a1X + ... + anXn, ai R, be a nonzero polynomial. If a0,...,an are relatively prime, then we say that f is primitive. Let c be a g.c.d. of a0,...,an and let ai = kic (1 < i < n), where ki R. then k0,...,kn are relatively prime so that

f * = k0 + k1X + ... + knXn

is primitive. Moreover,

f = cf *.

Thus we have proved

Lemma 6: Let f R[X] be nonzero and let c be a g.c.d of the coefficients of f. Then f can be written in the form

f = cf *,

where f * R[X] is primitive.

The element c of Lemma 6 is called the content of f. It is uniquely determined up to multiplication by units of R.

For example, consider the polynomial

4X5 + 8X3 + 4X2 + 12 Z[X].

Then a g.c.d. of 4,8,4, and 12 is 4,

4X5 + 8X3 + 4X2 + 12 = 4(X5 + 2X3 + X2 + 3),

and X5 + 2X3 + X2 + 3 is primitive.

The key to the proof of Theorem 1 is the following result , which is referred to as Gauss's lemma.

Theorem 7: Let f,g R[X] be primitive. Then fg is primitive.

Proof: Let

f = a0 + a1X + ... + anXn,
g = b0 + a1X + ... + bnXm,
fg = c0 + c1X + ... + cm+nXm+n.

Let be an irreducible element of R. It suffices to prove that does not divide all of c0,...,cm+n. For then if e is a g.c.d. of c0,...,cm+n, then e is not divisible by any irreducible element of R and is thus a unit, so that c0,...,cm+n are relatively prime. Since f and g are primitive, does not divide all of a0,...,an and does not divide all of b0,...,bm. Let ai and bi be the first coefficients of f and g, respectively, which are not divisible by . We assert that ci+j is not divisible by . Indeed, assume that |ci+j. Then

By the choice of ai and bj, we see that a0,...,ai-1,b0,...,bj-1 are all divisible by , so that terms of I and II are divisible by . Thus,

|aibj,

which implies that aibj = k for some k R. But is irreducible in R, so that by the unique factorization in R and Proposition 5, must divide either ai or bj, which is a contradiction to the choice of ai and bj. Thus ci+j as asserted.

Let F denote the quotient field of R. Every nonzero element x of F can be written in the form x = a/b, a,b Rx. If is a g.c.d. of a and b, then a* = a/, b* = b/ belong to R and x = a*/b*, with a* and b* relatively prime. Thus every nonzero x F can be written in the form x = a/b, a,b R, a and b relatively prime. Therefore, if f F[X] is nonzero, there exists a* F and f * R[X] such that f = a*f *. Moreover, it is clear by choosing a* appropriately, we may assume that f * is primitive, by Lemma 6. Note that F[X] is a UFD by Proposition 13 of the section on principal ideal arithmetic.

Corollary 8: Let f R[X] be primitive. Then f is irreducible in R[X] if and only if f is irreducible in F[X].

Proof: Assume that f is irreducible in R[X] and that f = gh, g,h F[X]. By the above discussion, we can write g = a*g*, h = b*h*, where g*, h* R[X], g* and h* are primitive, and a*, b* F. Then f = (a*b*)(g*h*). By Theorem 7, g*h* is primitive. Therefore, since f is primitive a*b* is a unit of R. But then since f = (a*b*)g*h* is irreducible, either g* or h* is a unit of R[X]. Thus, in particular either g* or h* is a constant polynomial so that either g or h is a unit of F[X]. Thus, f is irreducible in F[X].

Assume that f is irreducible in F[X], and assume that f = gh, g,h R[X]. Then by the irreducibility of f in F[X], we see that on of g, h must be a unit of F[X], that is, a constant polynomial. Say g is a constant polynomial. Then g is a unit of R, since f = gh and f is primitive. Thus f is irreducible in R[X].

Proof of Theorem 1: Let f R[X], f a unit of R[X]. Let us first show that f can be written as a product of irreducible elements of R[X]. If f is a constant polynomial, then f R and f can be written as a product of irreducible elements of R, since R is a UFD, and an irreducible element of R is an irreducible element of R[X], Thus we may assume that f a constant polynomial. By Lemma 6, we can write

(2)
f = a*f *, a* R,  f * R[X],   f * is primitive.

Since F[X] is a UFD, we can write

(3)
f * = f1...fn,  fi F[X],   fi irreducible in F[X].

Now we can write, fi = ai fi*, fi* R[X], fi* primitive, ai F. By Corollary 8, fi* is irreducible in R[X]. Moreover, by Theorem 7, f1*...fn* is primitive, so that by (3) and the fact that f * is primitive, we see that

f * = (a1...an)f1*...fn*

and a1...an is a unit of R. By (2),

f = (a*)f1*...fn*.

Since R is a UFD, we can write a* = 1...m, i R, i irreducible. But then as observed above, i is irreducible in R[X] and

f = 1...m f1*...fn*

is a decomposition of f into the product of irreducible elements of R[X].

In order to complete the proof of Theorem 1, we must show that if

f = 1...s = 1...t

are two decompositions of f into a product of irreducible elements of R[X], then s = t and upon proper rearrangement of 1,...,s, we have i and i are associates (1 < i < s). This is proved using Proposition 5 plus the same reasoning used in the proof of Theorem 12 of the section on arithmetic in principal ideal domains.

From the proof of Theorem 1, we can use the following useful result.

Corollary 9: Let R be a unique factorization domain and let f R[X] be a primitive polynomial. Further, let F denote the quotient field of R. Then the factorization of f into a product of irreducible factors in F[X] can already be carried out in R[X].