Skip to content

Polynomial Greatest Common Divisor

Definition

A greatest common divisor (GCD) of two polynomials a(x)a(x) and b(x)b(x), not both zero, is a polynomial of greatest possible degree that divides both a(x)a(x) and b(x)b(x).


Interpretation

A greatest common divisor of a(x)a(x) and b(x)b(x) is a common factor that is as large as possible, with size measured by degree, just as the GCD of two integers is the largest integer that divides both.

The polynomial GCD can be found with the Euclidean algorithm. Polynomial long division gives a=qb+ra=qb+r with r=0r=0 or deg⁡r<deg⁡b\deg r<\deg b. Every common divisor of aa and bb divides r=a−qbr=a-qb, and every common divisor of bb and rr divides a=qb+ra=qb+r, so the pairs (a,b)(a,b) and (b,r)(b,r) have the same common divisors. The algorithm keeps replacing the pair by divisor and remainder. The degrees of the remainders strictly decrease, so the remainder eventually becomes zero, and the pair is then (g,0)(g,0), whose common divisors are exactly the divisors of gg. Hence the last nonzero remainder gg is a GCD, and every common divisor of aa and bb divides it.

Since only the degree counts, a nonzero constant multiple of a GCD is again a GCD: both x−1x-1 and 2x−22x-2 are GCDs of x2−1x^2-1 and x−1x-1. Choosing the monic one makes the answer unique.

Because λ\lambda is a root of a polynomial exactly when x−λx-\lambda divides it, the common roots of aa and bb are the roots of their GCD. In the Examples, x3−1x^3-1 and x2−1x^2-1 have the GCD x−1x-1, and 11 is their only common root.


Key Results

  • The last nonzero remainder is a GCD.
  • The GCD is often normalized to be monic (leading coefficient 11), which makes it unique.

Examples

  • The GCD of x2−1x^2-1 and x−1x-1 is x−1x-1.
  • Euclidean algorithm: x3−1=x (x2−1)+(x−1)x^3-1=x\,(x^2-1)+(x-1) and x2−1=(x+1)(x−1)+0x^2-1=(x+1)(x-1)+0, so the last nonzero remainder x−1x-1 is the GCD of x3−1x^3-1 and x2−1x^2-1.

Prerequisites

Sources

Aliases: polynomial GCD, greatest common divisor of polynomials Symbols: lambda

Last updated: 20 October 2026 03:02