1.5 Factoring polynomials
The following results help in deciding whether a polynomial is reducible, and in finding its factors.
Let be a root of a polynomial
and write , , . Then and
It is clear from the equation
that , and therefore, Similarly, . □
The polynomial is irreducible in because its only possible roots are , and .
Let . If factors nontrivially in , then it factors nontrivially in .
Let in with nonconstant. For suitable integers and , and have coefficients in , and so we have a factorization
If a prime divides , then, looking modulo , we obtain an equation
Since is an integral domain, this implies that divides all the coefficients of at least one of the polynomials , say , so that for some . Thus, we have a factorization
Continuing in this fashion, we eventually remove all the prime factors of , and so obtain a nontrivial factorization of in . □
If is monic, then every monic factor of in lies in .
Let be a monic factor of in , so that with also monic. Let be the positive integers with the fewest prime factors such that . As in the proof of Gauss’s Lemma, if a prime divides , then it divides all the coefficients of at least one of the polynomials , say , in which case it divides because is monic. Now , which contradicts the definition of . □
We sketch an alternative proof of Proposition 1.14. A complex number is said to be an algebraic integer if it is a root of a monic polynomial in . Proposition 1.11 shows that every algebraic integer in lies in . The algebraic integers form a subring of — see Theorem 6.5 of my notes on Commutative Algebra. Now let be the roots of in . By definition, they are algebraic integers, and the coefficients of any monic factor of are polynomials in (certain of) the , and therefore are algebraic integers. If they lie in , then they lie in .
Let
suppose that there is a prime such that:
-
does not divide ,
-
divides ,
-
does not divide .
Then is irreducible in .
If factors nontrivially in , then it factors nontrivially in , say,
with and . Since , but not , divides , must divide exactly one of , , say, . Now from the equation
we see that and from the equation
that . By continuing in this way, we find that divides , which contradicts the condition that does not divide . □
The last three propositions hold mutatis mutandis with replaced by a unique factorization domain (replace with the field of fractions of and with a prime element of ).
There is an algorithm for factoring a polynomial in . To see this, consider . Multiply by a rational number so that it is monic, and then replace it by , with equal to a common denominator for the coefficients of , to obtain a monic polynomial with integer coefficients. Thus we need consider only polynomials
From the fundamental theorem of algebra (see LABEL:ag5 below), we know that splits completely in :
From the equation
it follows that is less than some bound depending only on the degree and coefficients of ; in fact,
Now if is a monic factor of , then its roots in are certain of the , and its coefficients are symmetric polynomials in its roots (see p. LABEL:sympol). Therefore, the absolute values of the coefficients of are bounded in terms of the degree and coefficients of . Since they are also integers (by 1.14), we see that there are only finitely many possibilities for . Thus, to find the factors of we (better PARI) have to do only a finite amount of checking.33 3 Of course, there are much faster methods than this. The Berlekamp–Zassenhaus algorithm factors the polynomial over certain suitable finite fields , lifts the factorizations to rings for some , and then searches for factorizations in with the correct form modulo .
Therefore, we need not concern ourselves with the problem of factoring
polynomials in the rings or since PARI
knows how to do it. For example, typing content(6*X^2+18*X-24) in PARI
returns 6, and factor(6*X^2+18*X-24) returns and , showing
that
in . Typing factormod(X^2+3*X+3,7) returns and
, showing that
in .
One other observation is useful. Let . If the leading coefficient of is not divisible by a prime , then a nontrivial factorization in will give a nontrivial factorization in . Thus, if is irreducible in for some prime not dividing its leading coefficient, then it is irreducible in . This test is very useful, but it is not always effective: for example, is irreducible in but it is reducible44 4 Here is a proof using only that the product of two nonsquares in is a square, which follows from the fact that is cyclic (see Exercise 1-3). If is a square in , then If is a square in , then If neither nor are squares, will be a square in , and The general study of such polynomials requires nonelementary methods. See, for example, the paper Brandl, AMM, 93 (1986), pp. 286–288, which proves that for every composite integer , there exists a polynomial in of degree that is irreducible over but reducible modulo all primes. modulo every prime .