Evanalysis
8.2Estimated reading time: 24 min

8.2 Polynomial gcds and irreducibility

Use the Euclidean algorithm for polynomials, prove Bezout identities, and compare irreducibility over Q, R, and C.

Course contents

From integer gcds to polynomial gcds

Chapter 7 showed that integer divisibility is controlled by gcds, the Euclidean algorithm, Bezout identities, and prime factorization. Chapter 8 repeats the same architecture for polynomials. The analogy is powerful, but there is one new subtlety: multiplying a polynomial by a nonzero constant does not change its divisibility behavior.

For example, x−1x-1 and 5x−55x-5 divide exactly the same polynomials up to a constant factor. To make a gcd unique, we choose the monic representative.

Polynomial divisibility and associates

Definition

Polynomial divisibility

For f(x),g(x)∈R[x]f(x),g(x)\in \mathbb R[x], we say that g(x)g(x) divides f(x)f(x), written g(x)∣f(x)g(x)\mid f(x), if there exists q(x)∈R[x]q(x)\in \mathbb R[x] such that

f(x)=g(x)q(x).f(x)=g(x)q(x).

Two nonzero polynomials divide each other exactly when they differ by a nonzero constant factor.

Theorem

Mutual divisibility

For nonzero f(x),g(x)∈R[x]f(x),g(x)\in \mathbb R[x],

g∣f and f∣g⟺f(x)=kg(x)g\mid f\text{ and }f\mid g \quad\Longleftrightarrow\quad f(x)=kg(x)

for some nonzero constant k∈Rk\in \mathbb R.

The proof uses degrees. If f=d1gf=d_1g and g=d2fg=d_2f, then f=d1d2ff=d_1d_2f. Since f≠0f\ne0, the product d1d2d_1d_2 must be the constant polynomial 11, so both d1d_1 and d2d_2 are constant.

Greatest common divisors in R[x]

Definition

Greatest common divisor of polynomials

Let f(x),g(x)∈R[x]f(x),g(x)\in \mathbb R[x] not both be zero. A polynomial d(x)d(x) is a greatest common divisor of ff and gg if

  1. d(x)∣f(x)d(x)\mid f(x) and d(x)∣g(x)d(x)\mid g(x);
  2. every common divisor of ff and gg divides d(x)d(x).

The notation gcd⁡(f,g)\gcd(f,g) means the unique monic greatest common divisor.

The second condition is often more useful than the word "greatest." There is no natural ordering by size for polynomials, so the gcd is characterized by divisibility: it is the common divisor that absorbs every other common divisor.

Nonzero polynomials differing by a nonzero scalar are called associates. Nonzero constants are the units of a polynomial ring over a field: they have polynomial inverses. Conversely, if a product is 11, additivity of degree forces both factors to have degree zero. This explains why nonzero scalar factors are ignored in divisibility.

If d1,d2d_1,d_2 both satisfy the gcd definition, each divides the other, so d1=kd2d_1=kd_2 for a nonzero constant kk. If both are monic, comparison of leading coefficients gives k=1k=1. Any nonzero gcd becomes monic by division by its leading coefficient. This proves uniqueness of the normalized answer; existence will come from the Euclidean algorithm.

If h≠0h\ne0 has leading coefficient λ\lambda, then gcd⁡(h,0)=gcd⁡(0,h)=h/λ\gcd(h,0)=\gcd(0,h)=h/\lambda: every polynomial divides zero, so the common divisors are exactly the divisors of hh. The pair (0,0)(0,0) is excluded from our monic-gcd definition. No monic polynomial can absorb all its common divisors, since these include polynomials of arbitrarily large degree.

Common mistake

A gcd is monic by convention

If a Euclidean computation ends with −2x+2-2x+2, the gcd is not usually recorded as −2x+2-2x+2. Since −2x+2=−2(x−1)-2x+2=-2(x-1), the monic gcd is x−1x-1.

The Euclidean algorithm for polynomials

Proof: What the Euclidean algorithm preserves and normalizes

Starting conditions. Work with f,g∈R[x]f,g\in\mathbb R[x], not both zero. Handle a zero input by the convention above; otherwise divide by a nonzero polynomial. Each division has remainder zero or remainder degree strictly below the divisor's degree. No degree of the zero polynomial is needed.

Invariant. The equations r=f−qgr=f-qg and f=qg+rf=qg+r prove both directions: a polynomial divides f,gf,g exactly when it divides g,rg,r. Thus each step preserves the whole collection of common divisors, not merely their degrees.

Termination and target. Nonzero remainder degrees form a strictly decreasing sequence of nonnegative integers. It cannot continue forever. At the final pair (h,0)(h,0), every original common divisor divides hh, while hh itself divides both original inputs by the invariant. Hence hh is a gcd.

Normalization. If λ\lambda is the leading coefficient of hh, return h/λh/\lambda. This scaling preserves divisibility and makes the answer monic. In the example below, h=−x+1h=-x+1 and λ=−1\lambda=-1, so the result is x−1x-1. Any Bezout coefficients for hh must also be divided by λ\lambda; changing only the left side would invalidate the identity.

Worked example

A polynomial Euclidean algorithm

Let

f(x)=4x4−2x3−16x2+5x+9,g(x)=2x3−x2−5x+4.f(x)=4x^4-2x^3-16x^2+5x+9,\qquad g(x)=2x^3-x^2-5x+4.

Successive divisions give

f(x)=(2x)g(x)+(−6x2−3x+9),f(x)=(2x)g(x)+(-6x^2-3x+9),g(x)=(−13x+13)(−6x2−3x+9)+(−x+1),g(x)=\left(-\frac13x+\frac13\right)(-6x^2-3x+9)+(-x+1),

and

−6x2−3x+9=(6x+9)(−x+1)+0.-6x^2-3x+9=(6x+9)(-x+1)+0.

The last nonzero remainder is −x+1-x+1, so the monic gcd is

gcd⁡(f,g)=x−1.\gcd(f,g)=x-1.

Bezout identities

The extended Euclidean algorithm also survives in R[x]\mathbb R[x].

Theorem

Polynomial Bezout identity

If f(x),g(x)∈R[x]f(x),g(x)\in \mathbb R[x] are nonzero, then there exist a(x),b(x)∈R[x]a(x),b(x)\in \mathbb R[x] such that

gcd⁡(f,g)=a(x)f(x)+b(x)g(x).\gcd(f,g)=a(x)f(x)+b(x)g(x).

To prove existence, start with f=1f+0gf=1f+0g and g=0f+1gg=0f+1g. If two successive remainders have expressions ri=Aif+Bigr_i=A_if+B_ig, the next division gives

ri+1=ri−1−qiri=(Ai−1−qiAi)f+(Bi−1−qiBi)g.r_{i+1}=r_{i-1}-q_i r_i =(A_{i-1}-q_iA_i)f+(B_{i-1}-q_iB_i)g.

Thus every remainder has polynomial coefficients in a linear combination of f,gf,g. At termination, divide the final coefficients by the leading coefficient of the final nonzero remainder. This yields the monic gcd, proving Bezout's identity. If one input is zero, the formula still holds: for f≠0f\ne0 with leading coefficient λ\lambda, use coefficients 1/λ,01/\lambda,0 for (f,0)(f,0), and interchange them for (0,f)(0,f).

For the example, set r1=−6x2−3x+9r_1=-6x^2-3x+9 and q2=−x/3+1/3q_2=-x/3+1/3. The recorded second division gives −x+1=g−q2r1-x+1=g-q_2r_1. Negate first, then substitute r1=f−2xgr_1=f-2xg:

x−1=q2r1−g=q2(f−2xg)−g=q2f+(−2xq2−1)g.x-1=q_2r_1-g=q_2(f-2xg)-g=q_2f+(-2xq_2-1)g.

Consequently the explicit normalized identity is

x−1=(−13x+13)f(x)+(23x2−23x−1)g(x).x-1= \left(-\frac13x+\frac13\right)f(x) +\left(\frac23x^2-\frac23x-1\right)g(x).

This identity is more than a computational trick. It proves that if gcd⁡(f,g)=1\gcd(f,g)=1, then polynomial combinations of ff and gg can produce the constant polynomial 11. That is the engine behind many divisibility theorems.

A Bezout pair is not unique. If Af+Bg=d=gcd⁡(f,g)Af+Bg=d=\gcd(f,g), then for any t∈R[x]t\in\mathbb R[x] in the same coefficient field,

(A+tgd)f+(B−tfd)g=d.\left(A+t\frac gd\right)f+\left(B-t\frac fd\right)g=d.

Both quotients are polynomials because dd divides f,gf,g; the two added terms cancel. Normalizing the gcd fixes its value, not a unique pair of coefficients.

Definition

Relatively prime polynomials

Nonzero polynomials f(x)f(x) and g(x)g(x) are relatively prime if

gcd⁡(f,g)=1.\gcd(f,g)=1.

Equivalently, there exist a(x),b(x)∈R[x]a(x),b(x)\in \mathbb R[x] such that

a(x)f(x)+b(x)g(x)=1.a(x)f(x)+b(x)g(x)=1.

Irreducible polynomials

Definition

Irreducible over a field

Let FF be a field. A nonconstant polynomial p(x)∈F[x]p(x)\in F[x] is irreducible over FF if it cannot be written as

p(x)=g(x)h(x)p(x)=g(x)h(x)

with g(x),h(x)∈F[x]g(x),h(x)\in F[x] and

0<deg⁡g,deg⁡h<deg⁡p.0\lt\deg g,\deg h\lt\deg p.

Irreducibility depends on the coefficient field.

Worked example

Changing the field can change irreducibility

The polynomial x2−2x^2-2 is irreducible over Q\mathbb Q, but reducible over R\mathbb R:

x2−2=(x−2)(x+2).x^2-2=(x-\sqrt2)(x+\sqrt2).

The polynomial x2+1x^2+1 is irreducible over R\mathbb R, but reducible over C\mathbb C:

x2+1=(x−i)(x+i).x^2+1=(x-i)(x+i).

Counterexample mode

No root in one field is not irreducibility in every field

The claim that irreducibility is unchanged when coefficients are enlarged is false. In the preceding examples, 2∉Q\sqrt2\notin\mathbb Q but 2∈R\sqrt2\in\mathbb R, and i∉Ri\notin\mathbb R but i∈Ci\in\mathbb C; the new coefficients make the displayed linear factors available.

The correct test for a quadratic over a field FF is that it is irreducible if and only if it has no root in FF. A nontrivial factorization must have degrees 1+11+1, and a linear factor gives a root; conversely, a root gives a linear factor by the factor theorem. Thus x2−2x^2-2 has no rational root, while x2+1x^2+1 has no real root because t2+1>0t^2+1\gt0 for real tt. The test's degree-two hypothesis matters; this argument does not establish a no-root criterion for arbitrary degrees.

Over C\mathbb C, every irreducible polynomial is linear, because the fundamental theorem of algebra gives a root for every nonconstant polynomial. Over R\mathbb R, the irreducible polynomials are exactly:

  • linear polynomials;
  • quadratic polynomials ax2+bx+cax^2+bx+c with discriminant b2−4ac<0b^2-4ac\lt0.

The quadratic case reflects complex conjugate roots. If α∉R\alpha\notin \mathbb R, then

(x−α)(x−αˉ)=x2−2Re⁡(α)x+∣α∣2(x-\alpha)(x-\bar\alpha)=x^2-2\operatorname{Re}(\alpha)x+|\alpha|^2

has real coefficients and no real linear factor.

For a real polynomial, nonreal roots occur with their conjugates. Pairing them gives these real quadratic factors; real roots give linear factors. A polynomial of higher degree therefore has a proper real factor. Conversely, linear polynomials are irreducible by degree, and a real quadratic with negative discriminant has no real root, so it is irreducible by the quadratic test. In the quadratic statement a≠0a\ne0 is understood.

Divisibility and factorization proofs

The following arguments work over a field FF, including Q\mathbb Q, R\mathbb R, and C\mathbb C: polynomial division requires division by a nonzero leading coefficient, which is available in every field. The preceding gcd and Bezout proofs therefore apply in F[x]F[x] as well.

Theorem

An irreducible polynomial divides a product as a prime does

Let FF be a field, let p∈F[x]p\in F[x] be irreducible, and let a,b∈F[x]a,b\in F[x]. If p∤ap\nmid a, then gcd⁡(a,p)=1\gcd(a,p)=1. If p∣abp\mid ab, then p∣ap\mid a or p∣bp\mid b.

Put d=gcd⁡(a,p)d=\gcd(a,p). Since d∣pd\mid p, write p=dep=de. Irreducibility forces dd or ee to be constant. If ee is constant, it is nonzero and dd is an associate of pp; then d∣ad\mid a forces p∣ap\mid a. When p∤ap\nmid a, this is impossible, so dd is constant, and its monic normalization is 11.

Now suppose p∣abp\mid ab. If p∣ap\mid a, the desired conclusion already holds. Otherwise Bezout gives ua+vp=1ua+vp=1. Multiplication by bb yields b=uab+vpbb=uab+vpb. Both terms on the right are divisible by pp, so p∣bp\mid b. This proves the prime property rather than assuming it in the definition of irreducibility.

Theorem

Solvability of a polynomial linear combination

Let FF be a field and a,b,c∈F[x]a,b,c\in F[x], with a,ba,b not both zero. Put d=gcd⁡(a,b)d=\gcd(a,b). There exist u,v∈F[x]u,v\in F[x] satisfying au+bv=cau+bv=c if and only if d∣cd\mid c.

For necessity, d∣a,bd\mid a,b implies d∣au+bvd\mid au+bv, so any solution forces d∣cd\mid c. For sufficiency, if c=dhc=dh, choose Bezout coefficients A,BA,B with Aa+Bb=dAa+Bb=d. Multiplying by hh gives a solution u=hAu=hA, v=hBv=hB. This constructs a solution for every divisible right-hand side, rather than only ruling out impossible ones. If a=b=0a=b=0, treat the equation separately: it is solvable exactly when c=0c=0, independently of a gcd convention.

Theorem

Existence and uniqueness of irreducible factorization

Let FF be a field and f∈F[x]f\in F[x] be nonconstant. Then f=c p1⋯prf=c\,p_1\cdots p_r, where c∈Fc\in F is nonzero and each pjp_j is monic and irreducible. The scalar cc and the multiset of monic factors are unique; factors may be repeated, and their order is irrelevant.

Existence. Use induction on the positive degree of ff. Degree-one polynomials are irreducible. If ff is already irreducible, normalize it and keep its leading coefficient as the scalar. Otherwise f=ghf=gh with both factors of positive degree strictly below deg⁡f\deg f. Induction factors gg and hh into irreducibles, so multiplying gives a factorization of ff. Normalizing every factor collects all nonzero scalar factors into cc. Strict degree decrease supplies termination; repeated factors are allowed.

Uniqueness. Suppose c p1⋯pr=d q1⋯qsc\,p_1\cdots p_r=d\,q_1\cdots q_s are two such factorizations. The prime property applied repeatedly shows that p1p_1 divides some qjq_j: it cannot divide the nonzero constant dd, since it has positive degree. Irreducibility of qjq_j makes the quotient constant, and monicity forces p1=qjp_1=q_j. Reorder and cancel this common nonzero factor; cancellation is valid because a polynomial ring over a field has no zero divisors. Repeat. If one list ended before the other, a nonzero constant would equal a positive-degree product, impossible by degree. Hence the lists match, including multiplicities, and the remaining equality is c=dc=d.

Polynomial gcds, Bezout, and irreducibility

Follow the polynomial Euclidean algorithm produce a monic gcd, reverse into a Bezout identity, and support field-dependent irreducibility tests.

  1. Monic gcd

    Scalar multiples such as x-1, 5x-5, and -2x+2 have the same divisibility behavior, so gcds are recorded using the monic representative.

  2. Euclidean invariant

    From f=gq+r, the common divisors of f and g are exactly the common divisors of g and r; hence gcd(f,g)=gcd(g,r).

  3. Example chain

    For the chapter example, the remainders are r1=-6x^2-3x+9, r2=-x+1, and then 0.

  4. Back-substitution

    The last nonzero remainder -x+1 is normalized to x-1, then reversed into x-1=(-1/3x+1/3)f+(2/3x^2-2/3x-1)g.

  5. Field dependence

    Irreducibility depends on the field: x^2-2 changes between Q and R, while x^2+1 changes between R and C.

  6. Prime-like role

    If p is irreducible and p does not divide a, Bezout gives ua+vp=1; multiplying by b explains why p|ab forces p|b.

Polynomial gcd work has three linked layers: normalize associates to a monic gcd, preserve common divisors through the Euclidean remainder chain, and use Bezout to prove irreducible-polynomial divisibility tests.

Worked example: the solvability criterion

Worked example

Use gcd to decide a polynomial equation

Determine whether there exist u(x),v(x)∈R[x]u(x),v(x)\in \mathbb R[x] such that

(x2−1)u(x)+(x−1)v(x)=x+1.(x^2-1)u(x)+(x-1)v(x)=x+1.

The left side is a polynomial combination of x2−1x^2-1 and x−1x-1. Since

x2−1=(x−1)(x+1),x^2-1=(x-1)(x+1),

we have

gcd⁡(x2−1,x−1)=x−1.\gcd(x^2-1,x-1)=x-1.

By the polynomial Bezout-solvability criterion, the equation has a solution only if x−1x-1 divides x+1x+1. It does not, because substituting x=1x=1 gives 2≠02\ne0. Therefore no such polynomials uu and vv exist.

Common mistakes

Common mistake

Treating scalar multiples as different gcd answers

In R[x]\mathbb R[x], x−1x-1, 2x−22x-2, and −7x+7-7x+7 have the same divisibility content. Only x−1x-1 is the monic representative, so it is the standard value of the gcd.

Common mistake

Saying irreducible without naming the field

The phrase "x2−2x^2-2 is irreducible" is incomplete. It is irreducible over Q\mathbb Q, but reducible over R\mathbb R. Always state the coefficient field when irreducibility is the issue.

Summary

Polynomial gcd theory copies the structure of integer gcd theory, with degree replacing size and monic normalization replacing positivity. The Euclidean algorithm computes a gcd by preserving common divisors while lowering degree. The extended algorithm gives Bezout identities. Irreducible polynomials play the role of primes, but irreducibility depends on the field: over C\mathbb C only linear polynomials are irreducible, while over R\mathbb R irreducibles are linear polynomials and quadratics with negative discriminant.

Study guide for the exercises

When a problem asks for a Bezout identity, keep a record of each division equation. The gcd is found by running the Euclidean algorithm downward, but the Bezout expression is found by running the equations backward. Students often make errors by changing a remainder without updating the earlier equation it came from. A useful check is to expand the final a(x)f(x)+b(x)g(x)a(x)f(x)+b(x)g(x) and verify that every higher-degree term cancels.

For irreducibility questions, the coefficient field is part of the problem. A quadratic with no rational root may still factor over R\mathbb R; a quadratic with no real root will factor over C\mathbb C. Over R\mathbb R, the discriminant test is enough for quadratics. Over Q\mathbb Q, rational-root and number-system information matters. For example, x2−5x^2-5 is irreducible over Q\mathbb Q because 5\sqrt5 is not rational, but it is reducible over R\mathbb R.

Quick checks

Checkpoint

Why do we choose the monic gcd in R[x]\mathbb R[x]?

Think about multiplying a common divisor by a nonzero constant.

Solution · Answer

Greatest common divisors are unique only up to a nonzero constant factor, so choosing the monic representative makes the notation unique.

Checkpoint

What is the monic gcd of −x+1-x+1 and 00?

Normalize the nonzero polynomial.

Solution · Answer

The gcd is x−1x-1, because −x+1=−(x−1)-x+1=-(x-1) and the monic representative is x−1x-1.

Checkpoint

Is x2+1x^2+1 irreducible over R\mathbb R? Is it irreducible over C\mathbb C?

Use the available roots in each field.

Solution · Answer

It is irreducible over R\mathbb R because it has no real root, but it is reducible over C\mathbb C since x2+1=(x−i)(x+i)x^2+1=(x-i)(x+i).

Exercises

In Exercises 4 and 5, fix a field FF; all polynomials belong to F[x]F[x], and irreducibility is over FF.

  1. Use the Euclidean algorithm to compute gcd⁡(x3−1,x2−1)\gcd(x^3-1,x^2-1) in R[x]\mathbb R[x].
  2. In the worked example, verify the Bezout identity for x−1x-1 by expanding the right-hand side.
  3. Decide whether x2−5x^2-5 is irreducible over Q\mathbb Q, R\mathbb R, and C\mathbb C.
  4. Prove: if p(x)p(x) is irreducible and p∤a(x)p\nmid a(x), then gcd⁡(a,p)=1\gcd(a,p)=1.
  5. Prove: if p(x)p(x) is irreducible and p∣a(x)b(x)p\mid a(x)b(x), then p∣a(x)p\mid a(x) or p∣b(x)p\mid b(x).
  6. Determine whether there exist u(x),v(x)∈R[x]u(x),v(x)\in \mathbb R[x] such that (x2−1)u(x)+(x−1)v(x)=x+1(x^2-1)u(x)+(x-1)v(x)=x+1.
Solution · Model solution 1

Divide x3−1=x(x2−1)+(x−1)x^3-1=x(x^2-1)+(x-1), then x2−1=(x+1)(x−1)+0x^2-1=(x+1)(x-1)+0. The last nonzero remainder x−1x-1 is already monic, so it is the gcd.

Solution · Model solution 2

Write A=−x/3+1/3A=-x/3+1/3 and B=2x2/3−2x/3−1B=2x^2/3-2x/3-1. Expanding the two products gives

Af=−43x5+2x4+143x3−7x2−43x+3,Af=-\frac43x^5+2x^4+\frac{14}{3}x^3-7x^2-\frac43x+3,Bg=43x5−2x4−143x3+7x2+73x−4.Bg=\frac43x^5-2x^4-\frac{14}{3}x^3+7x^2+\frac73x-4.

The coefficients of x5,x4,x3,x2x^5,x^4,x^3,x^2 cancel in pairs. The remaining terms give

Af+Bg=(−43+73)x+(3−4)=x−1.Af+Bg=\left(-\frac43+\frac73\right)x+(3-4)=x-1.

The last nonzero remainder was −x+1-x+1. Making it monic divides both the remainder and its two Bezout coefficients by −1-1; the A,BA,B used here already include that normalization.

Solution · Model solution 3

x2−5x^2-5 is irreducible over Q\mathbb Q because 5∉Q\sqrt5\notin \mathbb Q; reducible over R\mathbb R as (x−5)(x+5)(x-\sqrt5)(x+\sqrt5); and therefore reducible over C\mathbb C.

Solution · Model solution 4

Since pp is irreducible, its only divisors up to constants are 11 and pp. If p∤ap\nmid a, the gcd cannot have degree deg⁡p\deg p, so it must be 11.

Solution · Model solution 5

From part 4, if p∤ap\nmid a, then gcd⁡(a,p)=1\gcd(a,p)=1. Choose u,vu,v with ua+vp=1ua+vp=1. Multiplying by bb gives uab+vpb=buab+vpb=b; both terms on the left are divisible by pp, so p∣bp\mid b.

Solution · Model solution 6

The gcd of x2−1x^2-1 and x−1x-1 is x−1x-1. Since x−1x-1 does not divide x+1x+1, no such u,vu,v exist.

Practice

Work out your answer, then check it. You can revise and try again.

Loading…

Key terms in this unit