Irreducible Polynomials

Irreducibles Are the Primes of a Polynomial Ring

Recall from Polynomial Rings that a polynomial is irreducible if is neither the zero polynomial nor a unit, and whenever we are forced to have or . Over a field the units of are exactly the nonzero constants, so irreducibility says that the only factorisations available are the trivial ones where you peel a constant off the front.

Now compare that with the definition of a prime from Divisibility and Primes: an integer whose only divisors are and , i.e. an integer whose only factorisations are the ones where you peel a unit of off the front. The two definitions are the same sentence with the ring swapped out, and this whole lecture is the payoff: essentially every result about primes has a polynomial twin.

in in
units units , the nonzero constants
primes irreducible polynomials
size size
Division Theorem Division Theorem in
Euclidean algorithm, Euclidean algorithm, monic
Bézout's identity Bézout's identity in
Fundamental Theorem of Arithmetic unique factorisation into irreducibles (Theorem 7.6)
trial division by primes up to trial division by irreducibles up to

Basically, "irreducible" is just the word "prime" wearing a different hat, and the job for this lecture is the polynomial version of a primality test: given , decide whether it factors. Everything we build below — degree bounds, root tests, reduction mod — is a translation of something we already did to integers.

There is one genuinely new wrinkle, and it is the thing students get wrong most often. An integer is prime or not, full stop; but a polynomial can be irreducible in one ring and split apart in a bigger one. For instance has no factorisation at all in , yet in . Irreducibility is never a property of a polynomial on its own; it is a property of the polynomial together with the ring its coefficients are allowed to live in, so always say "irreducible in " and never just "irreducible".

Roots and the Factor Theorem

The single most useful tool for spotting a factor is the observation that linear factors and roots are the same information. It falls straight out of the Division Theorem.

Note

Theorem 7.13 (Remainder Theorem)
For any ring , polynomial , and , the remainder when is divided by is .

Proof. The divisor is monic, so its leading coefficient is a unit of ; hence the Division Theorem applies over any ring (this is the Fact from Polynomial Rings). It gives unique with

A polynomial of degree less than is either the zero polynomial or a constant, so for some fixed . Now evaluate both sides at :

So the remainder is the constant .

Basically, dividing by and substituting are two ways of doing the same computation; the part is annihilated by the substitution and only the remainder survives. Setting the remainder to zero immediately gives the result we actually use.

Note

Corollary 7.14 (Factor Theorem)
For any ring , polynomial , and , we have if and only if .
Proof. By definition exactly when the remainder on division by is the zero polynomial, and by Theorem 7.13 that remainder is .

Note

Definition 7.15
Given any ring and polynomial , we say is a root (or zero) of to mean .

Example. Find the remainder when is divided by in , and decide whether is a factor.
By the Remainder Theorem the remainder is just ;

Therefore the remainder is , and since we have . Notice how much cheaper this was than actually running the long division; whenever the divisor is linear, evaluate instead of dividing.

Example. Find all such that in .
By the Factor Theorem this is asking for the roots of in , and since is finite we can simply substitute every element:

None of the five values is , so has no roots in . Therefore no linear polynomial divides in . This "just try everything" move is only available because the ring is finite, and it is the reason irreducibility questions over are so much easier than over .

How Many Roots a Polynomial Can Have

Over a positive integer only has finitely many divisors, and the polynomial version of that bound is a statement about roots.

Note

Theorem 7.16
Any polynomial in of degree has at most roots.

Proof. We induct on , using the Factor Theorem at every step. Throughout we use the fact that has no zero divisors, i.e. that forces or (see the warning below).

Base case (). Let with , and suppose and are both roots. Then

and since we must have , i.e. . So a degree polynomial has at most one root.

Inductive step. Suppose every polynomial of degree has at most roots, and let . If has no roots at all then it certainly has at most of them and we are done. Otherwise pick a root ; by the Factor Theorem,

and comparing degrees gives . Now let be any root of with . Then

and , so we are forced into . In other words every root of other than is a root of , and by the inductive hypothesis there are at most of those. Hence has at most roots.

Basically, each root you find lets you strip off one linear factor, and the degree only has layers to give away before it runs out.

The proof used " or " twice, and that is exactly the axiom a general ring does not have. A ring with no zero divisors is called an integral domain; , , , and for prime are all integral domains, and those are the only rings this course ever applies Theorem 7.16 to. If you drop that assumption the theorem is flat out false. The standard counterexample is over :

so a degree polynomial has four roots. There is no contradiction with the proof, because and at we get in from two nonzero factors; the zero divisors let a product vanish without either bracket vanishing. So before quoting the at-most--roots theorem, check that your ring has no zero divisors — in practice, that is a field, or , or with prime. Recall from Modular Rings and Units that has zero divisors precisely when is composite, which is the whole reason we insist on prime moduli in this topic.

Irreducibles over C and R

The complex numbers are the easiest case, because there is nowhere left for a root to hide.

Note

Theorem 7.17 (Fundamental Theorem of Algebra)
Every polynomial in has at least one root.

The proof of this is well beyond the course (every proof of it smuggles in some analysis or topology somewhere), so we just quote it. Read the statement as being about non-constant polynomials; a nonzero constant polynomial obviously never takes the value .

Note

Corollary 7.18
Any polynomial with has exactly roots, counting multiplicity.

Proof (sketch). Induct on . For , has the single root . For the step, Theorem 7.17 hands us a root of , and the Factor Theorem turns it into with ; by the inductive hypothesis has exactly roots with multiplicity, and has no zero divisors so the roots of are exactly together with the roots of . That is altogether.

Basically, over the process of stripping off linear factors never gets stuck; it keeps going until the degree is exhausted, so every complex polynomial splits completely into linear pieces.

Note

Theorem 7.19
A polynomial is irreducible if and only if is linear (that is, ).

Proof. () Suppose and . Degrees add over a field, so and one of the two factors has degree , i.e. is a nonzero constant. Since , that factor is a unit; so is irreducible.
() Suppose is irreducible, so is not a unit and hence . If , then by Theorem 7.17 there is a root , and by the Factor Theorem

Neither factor is a constant, so neither is a unit, contradicting irreducibility. Hence .

Over the story is only slightly longer, because a real polynomial can have complex roots — but those always come in conjugate pairs, and multiplying a pair back together lands you in the reals again.

Note

Theorem 7.20
Every irreducible polynomial is either linear or quadratic (that is, ).

Proof. Suppose ; we show is reducible in . Regard as an element of ; by Theorem 7.17 it has a root .

Case 1: . Then the Factor Theorem applies inside and gives with and . Neither factor is a constant, so is reducible.

Case 2: . Write with and . Writing with every , and using the fact that conjugation respects sums and products while fixing every real number,

so is also a root, and because . Hence and are two distinct linear factors of in , so their product divides . But that product is

which has real coefficients. Call it . Dividing by the monic real polynomial inside gives with and ; and since the Division Theorem in has a unique answer, which we already know has remainder , we get . Hence

and again is reducible. Either way makes reducible, so an irreducible real polynomial has degree or .

Basically, real irreducible quadratics are exactly the ones with a conjugate pair of complex roots — the ones with negative discriminant. So the complete factorisation of a real polynomial is a product of linear factors (one per real root) and irreducible quadratics (one per conjugate pair).

Factoring the Same Polynomial in Different Rings

The best way to feel how much the ambient ring matters is to factor one polynomial three times.

Example. Write as a product of irreducible polynomials in (a) , (b) , (c) .
Every case starts from the difference of two squares, :

(a) In we claim both brackets are already irreducible. Each has degree , so a nontrivial factorisation would have to be (linear)(linear), and by the Factor Theorem a linear factor exists exactly when there is a rational root. Testing the only candidates allowed by the rational root theorem (Theorem 7.25 below), namely and so :

none of which is . Therefore, in ,

(b) In the number is now available, so splits; but for every real , so it has no real roots and (being quadratic) stays irreducible. Therefore

(c) In Theorem 7.19 tells us in advance that the answer must be a product of four linear factors, and finishes the job. Therefore

Notice how each step is the previous factorisation with one more irreducible cracked open; enlarging the ring can only ever break factors further apart, never glue them back together.

Example. Show that is irreducible in .
The degree is , so the only possible nontrivial factorisation is into two linear factors, and by the Factor Theorem that happens if and only if has a root in . Since is finite we just check all three:

None of these is , so has no roots in and hence no linear factors. Therefore is irreducible in . (Contrast this with , where , so splits; same polynomial, different ring, opposite answer.)

"No roots" only proves irreducibility for degrees and . For those degrees any nontrivial factorisation is forced to include a linear factor, which is the same as a root; but from degree upwards a polynomial can factor into two quadratics without ever taking the value . The cleanest counterexample is the square of the polynomial we just did, over the same ring:

whose values at in are

so has no roots in at all, and yet it is visibly reducible. Never conclude "no roots, therefore irreducible" without first checking that the degree is or .

Example. Write as a product of irreducible polynomials in .
First reduce the coefficients: in , so we are factoring . The difference-of-squares split from before still works, and we may as well reuse it:

The two linear factors are irreducible automatically, and we showed just above that is irreducible in . Therefore

As a check, expanding gives , and reducing mod leaves as required. Notice how the factorisation over survived the reduction: became the irreducible , while (irreducible over ) cracked into . Reducing mod can break factors that were solid over , which is a hint of both the power and the danger of the mod tests later on.

Irreducibles over Q and Z

Deciding irreducibility over looks nastier than over , because is infinite and you cannot just try everything. The saving grace is that fractions never help you factor.

Note

Theorem 7.21
A polynomial with integer coefficients that altogether have a GCD of is irreducible in if and only if it is irreducible in .

Proof (sketch). One direction is easy: a factorisation in into two non-constant pieces is also a factorisation in . The content is the other direction, and it is due to a result called Gauss's lemma, which states that any whose coefficients have a GCD of can only be written as a product of polynomials which themselves have coefficients with a GCD of . Given a factorisation over , clear all the denominators to get a factorisation over scaled by some integer; Gauss's lemma says the scaling factor has nowhere to hide and must be , so the -factorisation was there all along.

A polynomial in whose coefficients have GCD is called primitive, and the assumption matters. If we allow a common factor then -irreducibility and -irreducibility genuinely disagree: is reducible in (because is not a unit of ) while it is irreducible in (because is a unit of ). From here to the end of the note, every is assumed primitive; if yours is not, divide out the GCD of the coefficients first and test what is left.

Note

Corollary 7.22
A polynomial is irreducible if and only if is irreducible in , where is the lowest common multiple of the denominators of the coefficients of .

Basically, this is the polynomial version of clearing denominators in an equation. Multiplying by the constant changes nothing about which factorisations exist over (constants are units there), but it drags the whole problem into where integer-flavoured tools like divisibility and reduction mod become available. So the working method for any question is always:

  • multiply through by the LCM of the denominators;
  • divide out the GCD of the resulting integer coefficients, so that the polynomial is primitive;
  • test the resulting integer polynomial with the tests below;
  • report the answer back in , unchanged.

Example. Show that is irreducible in .
The denominators are and , whose lowest common multiple is . By Corollary 7.22 it suffices to test

and since this is primitive, so by Theorem 7.21 irreducibility in and in are the same question. The degree is , so any nontrivial factorisation must contain a linear factor , which contributes the rational root ; so it is enough to show there are no rational roots.

By the rational root theorem (Theorem 7.25 below), every rational root is in simplest form with and ; that is

which after discarding pairs with leaves candidates. Grinding through all is possible but miserable, so we filter them first. Multiplying through by turns it into a Diophantine equation:

Reducing that equation mod kills the first three terms and leaves

so must be even, i.e. . Reducing the same equation mod kills the first, third and fourth terms and leaves

so , and since is prime this means or . Combining: if then , so we need , giving ; if then already, but forces . Only eight candidates survive, and we test them in the integer form :

For instance the , entry unpacks as

Not one of the eight gives , so has no rational roots, hence no linear factor, hence (being cubic) no nontrivial factorisation at all. Therefore is irreducible in . Notice how two one-line congruences threw away two thirds of the candidate list before we did any real arithmetic; when the rational root theorem hands you a long candidate list, reduce the Diophantine relation modulo the small primes dividing and first.

Testing by the Degrees of the Factors

When we test an integer for primality we only trial-divide up to , because in any factorisation the smaller factor is at most . Degrees add where integer sizes multiply, so the polynomial version replaces with "half".

Note

Theorem 7.23
If is not irreducible, then has a factor with .

Proof. Let and suppose is not irreducible, so we can write where neither nor is a unit. Over a field the units are exactly the nonzero constants, so and ; and since degrees add,

Relabel if necessary so that . Then

and as noted.

Note

Corollary 7.24
To test if is irreducible where , we only have to confirm that for all irreducible monic with .

We can restrict to irreducible because any factor in that degree range itself has an irreducible factor of no larger degree (by unique factorisation, Theorem 7.6), and that irreducible one divides too; and we can restrict to monic because multiplying a factor by a unit does not change what it divides. When is finite — for example — there are only finitely many monic polynomials of each degree, so this is a genuinely finite test that a computer (or a patient student) can just run.

This corollary is also where the degree and rule finally gets its proper justification: if then , so the only candidate divisors are the monic linear ones , and exactly when is a root. Hence

For or you additionally have to try every monic irreducible quadratic, for or every monic irreducible cubic as well, and so on.

Example. Show that is irreducible in .
Here , so and the finite test only asks about monic linear divisors with ; equivalently, about roots. Substituting each of the three elements of :

None of the values is , so has no roots in and therefore no linear factor. Therefore is irreducible in . Note that we were entitled to stop after checking roots only because the degree is ; had the degree been we would also have had to divide by each of the monic irreducible quadratics , and .

The Rational Root Theorem

Over we can hunt for roots by brute force. Over there are infinitely many candidates, so we need a theorem that cuts the search down to a finite list — and it is the same divisibility argument you would use on any Diophantine equation.

Note

Theorem 7.25 (Rational root theorem)
Suppose that is a polynomial with and . Then in , each rational root of can be written as a fraction in simplest form (that is, with , and ) where and .

Proof. Let be a rational root in simplest form, so and . Multiplying through by clears every denominator:

which is now an equation between integers. Isolating the last term,

so . Since we also have , so shares no factor with and therefore . Symmetrically, isolating the first term,

so , and forces .

Basically, the denominator of a rational root can only be built out of the leading coefficient and the numerator only out of the constant term; everything in the middle is irrelevant. The hypothesis matters — if the constant term is then is a factor and is a root, which the theorem would otherwise miss (every integer divides , so the candidate list would be infinite). Factor out the largest power of first. A very common special case worth remembering separately:

Example. Show that is irreducible in .
The coefficients are integers with , so is primitive and by Theorem 7.21 we may work in . The degree is , so is reducible if and only if it has a rational root. By the rational root theorem with and we need and , so and the only candidates are the integers :

None of these is , so has no rational roots and hence no linear factor. Therefore is irreducible in (and, being primitive, in ). Notice that we have now proved this same polynomial irreducible over both and ; the next section explains why the first of those facts was already enough on its own.

Reducing Modulo a Prime

Checking four candidate roots was fine, but for larger coefficients the candidate list explodes. The fix is the same one we used all through Polynomial Congruences: push the problem into , where there are only finitely many things to try.

Note

Theorem 7.26
If a polynomial has no roots in for some positive integer , then it has no roots in .

Proof. We prove the contrapositive. Suppose has an integer root , so . Reduction mod respects both addition and multiplication (this is exactly the point of Modular Arithmetic), so writing for the class of in ,

So is a root of the reduced polynomial in . Hence if there is no root in , there can be no root in .

Basically, a root survives reduction; so if the shadow has no roots, neither does the original. The same idea upgrades from roots to whole factorisations, provided the leading coefficient survives.

Note

Theorem 7.27
Suppose , and that is any prime number such that does not divide the leading coefficient of . If is irreducible in , then is also irreducible in .

Proof. Again we prove the contrapositive: if is reducible in then it is reducible in . Suppose with , neither a unit of . Since is primitive, neither factor can be a constant (a constant factor would divide every coefficient of , forcing ), so and .

Let be the leading coefficient of , and the leading coefficients of ; then . Since and is prime, and , so neither leading coefficient dies when we reduce mod :

Reduction respects multiplication, so ; and since the units of are just the nonzero constants, neither nor is a unit. Hence is reducible in .

The condition is not decoration. If kills the leading coefficient then the degree collapses on reduction and the argument breaks: for example reduces mod to the linear polynomial , which is irreducible in , yet is obviously reducible in .

The converse of Theorem 7.27 is false, and this is the trap. A polynomial can be perfectly irreducible over and still factor modulo some prime; we saw exactly this above, where is irreducible in but in . So a reduction that factors proves absolutely nothing — you have learned only that this particular prime was a bad choice, and you must go and try another one. A reduction that is irreducible is the only outcome that settles the question.

Example. Show that is irreducible in .
The coefficients have GCD , so is primitive, and the leading coefficient is . Straight away is off the table, since . We work through the remaining small primes.

Try . Reducing coefficients mod gives , , , , so

But , so is a factor; in fact in . The reduction is reducible, so this prime tells us nothing.

Try . Here , , , , so

The leading coefficient did survive (), but the constant term vanished and handed us the root . Reducible again; still nothing learned.

Try . Now , , and , so

and so the degree is still . Being cubic, it is irreducible exactly when it has no roots, and is small enough to check exhaustively. Building the table from the powers of first keeps the numbers tiny:

For instance the column is in . No entry in the bottom row is , so has no roots in and is therefore irreducible in . Since , Theorem 7.27 applies. Therefore is irreducible in , and by Theorem 7.21 also in .

It is worth dwelling on the fact that we needed three attempts. There is no way to know in advance which prime will work, so treat "reducible mod " as no information at all and just move on to the next prime; only "irreducible mod " ever concludes the argument. As a rule of thumb, take the primes in increasing order, skipping any that divide the leading coefficient, and stop the moment one of them gives an irreducible reduction. (For this particular the rational root theorem would also have worked — the candidates are and none is a root — but that is eight evaluations with awkward fractions against seven tiny ones mod .)

Eisenstein's Criterion

Sometimes you can read irreducibility straight off the coefficients without testing anything. The pattern to look for is "one prime divides everything except the leading coefficient, and only just divides the constant term".

Note

Theorem 7.28 (Eisenstein's criterion)
Suppose that and that for some prime number ,

  • for all ,
  • , and
  • .

Then is irreducible in .

Proof. Suppose for contradiction that is reducible. As is primitive, no constant factor is possible, so we can write

with and . Comparing constant terms gives . Now but , so divides exactly one of ; relabelling if necessary, say

Comparing leading coefficients gives , and , so in particular . Therefore the list starts with a multiple of and ends with a non-multiple; let be the smallest index with . Then , and since we get .

Now compare the coefficients of on both sides (using the convention for and for ):

Since , the hypothesis gives . Every term after the first involves some with , and by minimality of every such is divisible by ; so divides the entire tail. Subtracting, . But is prime and and , so — a contradiction. Therefore no such factorisation exists and is irreducible.

Basically, Eisenstein works by watching where the single prime can go. It has to divide the constant term of one factor but not the other, and then it runs out of room as you climb the coefficients. All three conditions are needed: drop and the criterion collapses, since passes the first two conditions with .

Example. Show that is irreducible in .
Try and check the three conditions against , , , :

All three hold, so by Eisenstein's criterion is irreducible in , and hence also in . Notice how little work that was compared with the mod hunt of the last section; whenever you meet a polynomial whose non-leading coefficients share a prime factor, try Eisenstein before anything else.

Shifting the Variable

Eisenstein is fast but fragile; a polynomial can fail it outright and still be irreducible. The rescue is that irreducibility does not notice a horizontal shift, so if is not in Eisenstein shape you may be able to move it into shape.

Note

Theorem 7.29
For any , the polynomial is irreducible if and only if the polynomial is irreducible.

Proof. Substituting is a map that respects sums and products, since evaluating a sum or product at is the same as summing or multiplying the evaluations:

It also preserves degree (the leading term becomes , whose only term is ), and it is undone by the substitution .

(, contrapositive) Suppose is reducible, say with . Substituting into both sides gives

and both factors still have degree at least , so is reducible.
() Identical, running the substitution the other way: if nontrivially then nontrivially.

Basically, sliding the graph left or right cannot create or destroy a factorisation; it just relabels one. But the shift does change the coefficients completely, and that is the whole point — Eisenstein looks at coefficients, so a shift can turn an untestable polynomial into a testable one. The usual trick is to try first, then .

Example. Show that is irreducible in .
Eisenstein fails as written: the only prime dividing is , but is false — no wait, is fine — the failure is at , since . So no prime works directly. Instead substitute and expand:

That is exactly the polynomial from the previous section, which Eisenstein at showed to be irreducible. Therefore by Theorem 7.29, is irreducible in as well, and hence in .

As a sanity check on the expansion, compare constant terms: , which matches the constant term of . Checking against the constant term of catches almost every algebra slip in these expansions, and they are easy slips to make.

Which Test Do I Reach For

There are now six or seven tools in the box and they are not interchangeable, so here is the order to run down when a polynomial is put in front of you. As always, the first question is which ring you are in.

  • Is it over ? Multiply by the LCM of the denominators and divide out the GCD of the resulting coefficients (Corollary 7.22); you are now over with a primitive polynomial, and Theorem 7.21 says the answer is the same.
  • Is the degree or ? Degree is a unit or zero, so never irreducible; degree over a field is always irreducible. Done.
  • Is the degree or ? Then irreducible no roots. Over substitute all elements; over or use the rational root theorem to get a finite candidate list, shrinking it first with congruences mod the small primes if the list is long.
  • Is the degree ? No roots is no longer enough. Either run the finite test against every monic irreducible of degree up to (realistic only over a small ), or find a smarter argument below.
  • Do the non-leading coefficients share a prime factor , with and ? Use Eisenstein; it is instant and works in any degree.
  • Almost Eisenstein but not quite? Substitute for small and look again (Theorem 7.29). Try first.
  • Nothing else working, over ? Reduce mod a prime not dividing the leading coefficient and test there (Theorem 7.27). Small primes first; if the reduction factors, you have learned nothing, so try the next prime.
  • Over or ? Don't test anything: the answer is already known. In the irreducibles are exactly the linear polynomials (Theorem 7.19), and in exactly the linear polynomials together with the quadratics of negative discriminant (Theorem 7.20).

And the two things most likely to cost you marks, one more time: irreducibility always depends on the ring, so name the ring in every answer; and "no roots" only settles the question in degrees and .