Section 23 – Factorization of polynomials over a field Instructor: Yifan Yang Spring 2007 Notation Throughout this section, the letter F will always denote a field. Division algorithm for F [x] Theorem (23.1, Division algorithm for F [x]) Let F be a field. Let f (x) and g(x) be polynomials in F [x]. Suppose that g(x) is not the zero polynomial. Then there exist unique polynomials q(x) and r (x) such that 1. f (x) = g(x)q(x) + r (x), 2. r (x) = 0 or deg r (x) < deg g(x). Proof. • Assume that g(x) = bm x m + · · · + b0 , where m ≥ 0 and bm 6= 0. Consider the set S = {f (x) − g(x)s(x) : s(x) ∈ F [x]}. • If 0 ∈ S, then ∃ s(x) ∈ F [x] such that f (x) = g(x)s(x). Then we can take q(x) = s(x), r (x) = 0, and we are done. Proof of Theorem 23.1, continued • Assume that 0 6∈ S. Let r (x) be an element of minimal degree in S. We have f (x) = g(x)q(x) + r (x) for some q(x) ∈ F [x]. We need to show that deg r (x) < deg g(x). • Suppose that r (x) = ck x k + · · · + c0 with k ≥ m and ck 6= 0. Consider f (x) − g(x)(q(x) + ck /bm x k −m ). • We have f (x)−g(x)q(x) − (ck /bm )x k −m g(x) = r (x) − (ck /bm )x k −m g(x) = (ck x k + · · · + c0 ) − (ck /bm )(bm x k + · · · ), whose degree is less than r (x). This contradicts to the assumption that r (x) is of minimal degree in S. Thus, deg r (x) must be less than deg g(x). Proof of Theorem 23.1, continued We now show that q(x) and r (x) are unique. • Suppose that f (x) = g(x)q1 (x) + r1 (x) f (x) = g(x)q2 (x) + r2 (x), where ri (x) either are the zero polynomial or satisfy deg ri (x) < deg g(x). • Then we have r1 (x) − r2 (x) = g(x)(q2 (x) − q1 (x)). • Now r1 (x) − r2 (x) is either zero or a polynomial of degree < deg g(x). However, if the right-hand side is not zero, then the degree is at least deg g(x). • Thus, the only possibility is that r1 (x) = r2 (x), and q1 (x) = q2 (x). This completes the proof. Example Example. Let F = Z5 , f (x) = x 4 + x 2 + 3x + 2, and g(x) = x 2 + 2x + 3. Let us find the polynomials q(x) and r (x). Solution. x2 x 2 + 2x + 3 x 4 x4 + 3x 2x 3 + 3x 3 3x 3 +2 +x 2 + 3x 2 + 3x 2 + x2 2x 2 2x 2 +3x + 3x + 4x + 4x + 4x Thus, we find q(x) = x 2 + 3x + 2 and r (x) = 0. +1 +1 +1 0 Remark Note that the condition that F is a field is crucial. For example, assume that F = Z instead. Let f (x) = x + 1 and g(x) = 2x. Then it is impossible to find q(x), r (x) ∈ Z[x] such that f (x) = g(x)q(x) + r (x) with r (x) = 0 or deg r (x) < deg g(x). Zeros of f (x) ∈ F [x] Corollary (23.3) An element a ∈ F is a zero of f (x) ∈ F [x] if and only if x − a is a factor of f (x) in F [x]. Proof. • Suppose that f (a) = 0. By Theorem 23.1, we have f (x) = (x − a)g(x) + r (x) for some q(x) ∈ F [x], where r (x) = 0 or deg r (x) < deg(x − a) = 1, i.e., or r (x) = c is a constant polynomial. • Then we have 0 = f (a) = 0g(a) + c. That is, r (x) is the zero polynomial. This proves that f (a) = 0 ⇒ (x − a)|f (x). • The proof of the converse statement is easy. Zeros of f (x) ∈ F [x] Corollary (23.5) A nonzero polynomial f (x) ∈ F [x] of degree n can have at most n zeros in F . Proof. • We will prove by induction on the degree of f (x). • When f (x) has degree 0, i.e., when f (x) = c for some c 6= 0 ∈ F , it is clear that f (x) has no zeros. • Now assume that the statement holds for all polynomials of degree n ≤ k . We will prove that the statement also holds for polynomials f (x) of degree k + 1. Proof of Corollary 23.5, continued • If f (x) has no zeros in F , we are done. Otherwise, assume that a ∈ F is a zero of f (x). • By Corollary 23.3, f (x) = (x − a)g(x) for some polynomial g(x) of degree k . • Now if b ∈ F is a zero of f (x), then (b − a)g(b) = 0. • Since F has no zero divisors, this implies that b − a = 0 or g(b) = 0, i.e., b = a or b is a zero of g(x). • By the induction hypothesis, the polynomial g(x) has at most k zeros. It follows that f (x) has at most k + 1 zeros. • By the principle of mathematical induction, we conclude that the statement holds for all polynomials. The multiplicative group F × Corollary (23.6) Let F be a field. If G is a finite subgroup of the multiplicative group F × of all nonzero elements in F . Then G is cyclic. In particular, if F is a finite field, then F × is cyclic. Example 1. In Z5 we have 22 = 4, 23 = 3, and 24 = 1. Thus, Z× 5 = h2i is cyclic. 2. We have |Z× 7 | = 6. Thus, the multiplicative order of an 2 element in Z× 7 is 1, 2, 3, or 6. Now 3 = 2 6= 1 and 3 3 = 6 6= 1. Therefore, the multiplicative order of 3 is 6, and Z× 7 = h3i is cyclic. Proof of Corollary 23.6 • Recall that by the fundamental theorem for finitely generated abelian groups (Theorem 11.12), the finite abelian group G is isomorphic to Zpe1 × · · · × Zpek for some k 1 primes pi and integers ei ≥ 1. • Since the maximal order of an element in Zpe1 × · · · × Zpek 1 is lcm(p1e1 , . . . , pkek ), the group G is cyclic if and only if pi are all distinct. k • Observe also that the order of every element in G is a divisor of m = lcm(p1e1 , . . . , pkek ). In other words, every element of G is a zero of x m − 1. • If G is not cyclic, then m is strictly less than |G|. • Now the polynomial x m − 1 has degree m, but has at least |G| > m zeros. This contradicts to Corollary 23.5. In-class exercises Find q(x) and r (x) for the following pairs of polynomials in the specified rings of polynomials. 1. F = Z2 , f (x) = x 5 + x 3 + x + 1, g(x) = x 3 + x 2 + 1. 2. F = Z3 , f (x) = x 5 + x 3 + x + 1, g(x) = x 3 + x 2 + 1. 3. F = Z5 , f (x) = x 5 + x 3 + x + 1, g(x) = x 3 + x 2 + 1. Find a generator for each of the following groups. 1. Z× 13 . 2. Z× 17 . Irreducible polynomials Definition A nonconstant polynomial f (x) ∈ F [x] is irreducible over F or is an irreducible polynomial in F [x] if f (x) cannot be expressed as a product g(x)h(x) of two polynomials in F [x] with 0 < deg g(x), deg h(x) < deg f simultaneously. If a polynomial f (x) ∈ F [x] is nonconstant and is not irreducible over F , then it is reducible over F . Example 1. x 2 + 1 is irreducible over R. 2. x 2 + 1 is reducible over C since x 2 + 1 = (x − i)(x + i) in C. Remarks • Observe that if f (x) ∈ F [x] is irreducible over F , then in f (x) = g(x)h(x) in F [x], one of g(x) and h(x) has degree equal to deg f (x), and the other has degree 0. Since the nonzero constant polynomials in F [x] are precisely the units in F [x], the definition of irreducible polynomials can also be given as “f (x) is irreducible over F if in any factorization f (x) = g(x)h(x) in F [x], one of g(x) and h(x) is a unit”. • Note that whether a polynomial f (x) is irreducible or not depends on which field we are talking about. For example, x 2 + 1 is irreducible over R, but is reducible over C. Also, √ x 2 − 2 is irreducible over Q, but reducible over R or Q( 2). Polynomials of degree 2 or 3 Theorem (23.10) Suppose that f (x) ∈ F [x] is of degree 2 or 3. Then f (x) is reducible over F if and only if f (x) has a zero in F . Proof. Assume that f (x) is reducible, say, f (x) = g(x)h(x), where 0 < deg g(x), deg h(x) < deg f (x) = 2 or 3. Then one of g(x) and h(x) is of degree 1 taking the form x − a for some a ∈ F . Thus f (x) has a zero a in F . The converse statement is trivial. This proves the theorem. Remark Remark When the degree of f (x) is 4, it is possible that f (x) = g(x)h(x), where each of g and h is of degree 2. To determine whether f (x) is irreducible over F , we also need to consider this possibility. Examples Example. Determine whether f (x) = x 3 + x + 1 is irreducible over Z5 . Solution. • Since f (x) = x 3 + x + 1 is of degree 3, it is reducible over Z5 if and only if it has a zero in Z5 . • Now we have f (0) = 1, f (1) = 3, f (2) = 8 + 2 + 1 = 1, f (3) = 27 + 3 + 1 = 1, and f (4) = 64 + 4 + 1 = 4. None of these is equal to 0. • Thus, f (x) is irreducible over Z5 . Examples Example. Determine whether f (x) = x 4 + x 2 + x + 1 is irreducible over Z5 . Solution. • We have f (0) = 1, f (1) = 4, f (2) = 3, f (3) = 4, and f (4) = 2. Thus, f (x) has no linear factors. • Now assume that f (x) = (x 2 + ax + b)(x 2 + cx + d). Then we have x 4 + x 2 + x + 1 = x 4 + (a + c)x 3 + (ac + b + d)x 2 + (ad + bc)x + bd. • Comparing the constant terms, we get (b, d) = (1, 1), (2, 3), (3, 2), or (4, 4). • From a + c = 0, we get a = −c. Then (ad + bc) = 1 gives a(d − b) = 1. • It follows that (b, d, a) = (2, 3, 1), or (3, 2, 4). • But ac + b + d = 4 6= 1. Thus, f (x) is irreducible over Z5 . Gauss’s lemma Theorem (23.11, Gauss’s lemma) Let f (x) ∈ Z[x]. Then f (x) factors into a product of two polynomials of lower degrees r and s in Q[x] if and only if it has such a factorization with polynomials of the same degrees r and s in Z[x]. Proof. See the supplemental material. Corollary 23.12 If f (x) = x n + an−1 x n−1 + · · · + a0 is in Z[x] with a0 6= 0, and if f (x) has a zero in Q, then the zero is in Z and satisfies m|a0 . Example Example. Factor f (x) = x 4 + 10x 3 + 13x 2 − 32x + 12 ∈ Z[x] into a product of irreducible polynomials over Q. Solution. • We first check if it has a linear factor. By Corollary 23.12, such a factor is of the form x − m for some integer m|12. • By a direct computation, we find ±1, ±2, ±3, ±4, ±6, ±12 are not zeros of f (x). Thus, f (x) has no linear factors. • Assume that f (x) = (x 2 + ax + b)(x 2 + cx + d). Then by Gauss’s lemma, (b, d) = ±(1, 12), ±(2, 6), or ±(3, 4). Example, continued Example. Factor f (x) = x 4 + 10x 3 + 13x 2 − 32x + 12 ∈ Z[x] into a product of irreducible polynomials over Q. Solution. • Assume that (b, d) = (1, 12). We have x 4 + 10x 3 + 13x 2 − 32x + 12 = x 4 + (a + c)x 3 + (ac + 13)x 2 + (12a + c)x + 12. • Comparing the coefficients, we get a + c = 10, ac = 0, and 12a + c = −32. However, no integers can satisfy these equations. • Likewise, the choices (b, d) = (−1, −12) and (2, 6) do not work either. • When (b, d) = (−2, −6), we find a + c = 10, ac − 8 = 13, −6a − 2c = −32. A solution is (a, c) = (3, 7). Thus, f (x) = (x 2 + 3x − 2)(x 2 + 7x − 6). Reduction modulo m Lemma (Exercise 37, reduction modulo m) Let m > 1 be a positive integer. Define φm : Z[x] → Zm [x] by φm (an x n + · · · + a0 ) = an x n + · · · + a0 , where ai denotes the residue class modulo m containing ai . Then φm is a ring homomorphism, called reduction modulo m. Example 1. The reduction of x 2 + 4x + 7 modulo 2 is x 2 + 1. 2. The reduction of x 3 + 3x + 9 modulo 3 is x 3 . Reduction modulo p Idea. • Let f (x) ∈ Z[x]. Consider the reduction f (x) modulo p, where p is a prime. • If f (x) = g(x)h(x) is reducible over Q, then the reduction modulo p gives f (x) = g(x)h(x). (Exercise 37.) • Thus, if f (x) is irreducible over Zp , then f (x) is irreducible over Q. However, note that if f (x) is reducible over Zp , it is still possible that f (x) is irreducible over Q. For example, f (x) = x 2 + 1 and p = 2 with f (x) = (x + 1)2 . Example. The polynomial x 3 + 13x + 81 is irreducible over Q because its reduction modulo 2 is x 3 + x + 1, which is irreducible over Z2 . Eisenstein criterion Theorem (23.15, Eisenstein criterion) Let p be a prime. Suppose that f (x) = an x n + · · · + a0 is in Z[x], and an 6≡ 0 mod p, ai ≡ 0 mod p for all i < n, but a0 6≡ 0 mod p2 . Then f (x) is irreducible over Q. Example The polynomial x 2 − 2 is irreducible over Q by the Eisenstein √ criterion. This shows that 2 is an irrational number. Proof of Theorem 23.15 • Let f (x) denote the reduction of f (x) modulo p. By assumption, we have f (x) = dx n for some d 6= 0 ∈ Zp . • Now if f (x) = g(x)h(x) for some g(x), h(x) ∈ Z[x], then g(x)h(x) = dx n . • We claim that this implies that g(x) = bx k , h(x) = cx m for some nonnegative integers k , m, and some a, b ∈ Zp satisfying k + m = n and ab = d mod p. • Assume that the claim is true for the moment. Then g(x) = bk x k + · · · + b0 and cm x m + · · · + c0 , where bi , cj ≡ 0 mod p for all i < k and all j < m. • If k and m are both > 0, then the constant term a0 = b0 c0 of f (x) is divisible by p2 , contradicting to a0 6≡ 0 mod p2 . • Therefore, one of g(x) and h(x) must be a constant polynomial. That is, f (x) is irreducible over Q. Proof of the claim • Write g(x) = bk x k + · · · + b0 and h(x) = cm x m + · · · + c0 . • Let r be the smallest integer such that br 6≡ 0 mod p, and s be the smallest integer such that cs 6≡ 0 mod p. P • Now the `th coefficient a` of f (x) is equal to `i=0 bi c`−j . • For ` = r + s, we have a` = (b0 c` + · · · + br −1 cs+1 ) + br cs + (br +1 cs−1 + · · · + b` c0 ) ≡ br cs 6≡ 0 mod p. • Since a` ≡ 0 mod p for all ` < n, we conclude that r + s = n, which in turn implies r = k and s = m. Remark Remark In the proof above, the assumption that p is a prime is crucially used in the step br cs 6≡ 0 mod p. Without the assumption that p is a prime, the claim is not true at all. For example, in Z4 [x] we have x 2 = (x + 2)(x + 2). Cyclotomic polynomial Corollary 23.17 Let p be a prime. Then the polynomial Φp (x) = x p−1 + x p−2 + · · · + 1 = xp − 1 x −1 is irreducible over Q. Remark • Φp (x) is called the pth cyclotomic polynomial. • The zeros of Φp (x) are precisely the pth roots of unity, except for 1. • It plays the central role in Kummer’s approach to Fermat’s Last Theorem. He proved that X n + Y n = Z n has no non-trivial solutions if 3 ≤ n ≤ 100, with possible exceptions n = 37, 59, 67. Proof of Corollary 23.17 • In general, a polynomial f (x) ∈ F [x] is irreducible over F if and only if f (x + 1) is irreducible over F . Thus, it suffices to prove that Φp (x + 1) is irreducible over Q. • We have (x + 1)p − 1 = x p + p1 x p−1 + · · · + px. Thus, p p−2 p−1 Φp (x + 1) = x + x + · · · + p. 1 • The binomial coefficients 0 < k < p. p k are all multiples of p when • But the constant term is p, which is not divisible by p2 . • Thus, by the Eisenstein criterion, Φp (x) is irreducible over Q. In-class exercises Factors the following polynomials into products of irreducible polynomials in the given fields. 1. x 3 + x + 1 over Z3 . 2. x 4 + x + 1 over Z5 . 3. x 4 − 3x 3 − 3x 2 + 11x − 6 over Q. 4. x 4 + 3x 3 + 6x 2 − 3x + 12 over Q. Unique factorization in F [x] Theorem (23.18) Let p(x) be an irreducible polynomial in F [x]. If p(x)|r (x)s(x) for r (x), s(x) ∈ F [x], then p(x)|r (x) or p(x)|s(x)| in F [x]. Proof. Will be proved in Theorem 27.27. Remark In other words, irreducible polynomials in F [x] are in many ways similar to primes in Z. Unique factorization in F [x] Theorem (23.20) Every nonconstant polynomial f (x) ∈ F [x] can be factored in F [x] into a product of irreducible polynomials. The factorization is unique, except for order and for units. Remarks • The phrase “except for order” means that we consider the factorizations f (x) = p1 (x)p2 (x) and f (x) = p2 (x)p1 (x) as the same one. • The phrase “except for units” means that the factorizations p1 (x)p2 (x) and (cp1 (x))(c −1 p2 (x)) are considered as the same, where c 6= 0 ∈ F . (Note that the nonzero elements in F are the units in F [x].) Proof of Theorem 23.20 We first prove by induction that every nonconstant polynomial f (x) is a product of irreducible polynomials over F . • Polynomials of degree 1 are clearly irreducible polynomials. • Suppose that every polynomial of degree ≤ n is a product of irreducible polynomials. • Now let f (x) be a polynomial of degree n + 1. • If f (x) is irreducible, we are done. Otherwise, assume that f (x) = g(x)h(x), where deg g(x), h(x) ≤ deg f (x) − 1 = n. • By the induction hypothesis, g(x) and h(x) are products of irreducible polynomials, and thus so is f (x) = g(x)h(x). • We conclude that every nonconstant polynomial is a product of irreducible polynomials. Proof of uniqueness • Assume that f (x) = p1 (x) . . . pr (x) and f (x) = q1 (x) . . . qr (x) are two factorizations of f (x) into a product of irreducible polynomials. • By Theorem 23.18, p1 (x) divides one of qi (x). • By rearranging the indices, we assume that p1 (x)|q1 (x), i.e., q1 (x) = p1 (x)r1 (x) for some r1 (x) ∈ F [x]. • Since q1 (x) is irreducible, r1 (x) must be a unit, that is, r1 (x) = u1 is a constant polynomial in F [x]. • Then p1 (x) . . . pr (x) = (u1 p1 (x))q2 (x) . . . qs (x). • Canceling p1 (x), we get p2 (x) . . . pr (x) = u1 q2 (x) . . . qs (x). • Continuing this way, we get qi (x) = ui pi (x) for i = 1, 2 . . ., for some units ui ∈ F , and we have r = s. Homework Problems 4, 10, 14, 16, 20, 30, 34, 36, 37 of Section 23.