📘 CodingMarble Learn

Polynomial Division, Horner's Scheme and Roots

A polynomial is a sum of terms like a·xⁿ. You can add and multiply polynomials, and divide them with a remainder: p = q·d + r, where r has a smaller degree than d. Dividing by (x − a) is quick with Horner's scheme, and the remainder is exactly p(a) (Bézout's theorem). If p(a) = 0, then a is a root and (x − a) is a factor. Roots and coefficients are tied together by the Viète relations.

🎬 Step-by-step story

  1. Here is p(x) = x³ − 6x² + 11x − 6. The four blue and red bars are its coefficients: 1, −6, 11, −6. Red means negative.
  2. We test a = 1. Step one of Horner's scheme: bring the first coefficient down. The purple bar is 1.
  3. Multiply the last purple number by a, then add the next coefficient: 1 × 1 + (−6) = −5.
  4. Do it again: 1 × (−5) + 11 = 6.
  5. Last step: 1 × 6 + (−6) = 0. The remainder is 0, so p(1) = 0 and (x − 1) is a factor. The other purple numbers 1, −5, 6 are the quotient x² − 5x + 6.
  6. Free play: move the slider to try a = 0 to 5. The last purple number is always p(a). Which values give 0?

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

What do the bars mean?

Each bar is one number. Blue is positive, red is negative, and taller means bigger. The top row is the coefficients of the polynomial.

Why do we multiply by a and add in Horner's scheme?

It is the same as long division, written short. Each purple number is the previous one times a plus the next coefficient. Watch the second and third bars appear.

Why is the last number the remainder?

The chain ends by computing a·b + the constant term, which is exactly p(a). If it is 0 the division is exact.

How do I know which a to try?

For whole-number roots, a must divide the constant term. Here it is −6, so try ±1, ±2, ±3, ±6. Slide the bar and look for a last bar of zero.

What if the polynomial has a missing term?

Write a 0 for it in the coefficient row, or the answer will be wrong. For x³ − 4x + 1 use 1, 0, −4, 1.

Algebraic form and polynomial function

A polynomial in x is a sum like p(x) = aₙxⁿ + … + a₁x + a₀. The numbers a₀, a₁, … are the coefficients. The biggest power with a non-zero coefficient is the degree. For x³ − 6x² + 11x − 6 the degree is 3 and the coefficients are 1, −6, 11, −6.

You can see it two ways. As an algebraic form it is just a written sum. As a polynomial function it takes a number and gives a number: p(2) = 8 − 24 + 22 − 6 = 0. Two polynomials are equal when all their coefficients are equal. Polynomials can be added and multiplied, and the result is again a polynomial: that is why they form a ring. Division does not always stay inside the ring, so we use division with remainder.

Division with remainder and Horner's scheme

For any polynomial p and any non-zero divisor d there are unique polynomials q (quotient) and r (remainder) with

p = d · q + r, and degree of r < degree of d.

Like long division with numbers: 17 = 5 × 3 + 2.

Horner's scheme is the fast way to divide by (x − a). Write the coefficients in a row. Bring down the first one. Then repeat: multiply the number you just wrote by a, add the next coefficient, write the result. The numbers are b₀ = a₃, b₁ = a₂ + a·b₀, b₂ = a₁ + a·b₁, and the last one is the remainder. The others are the coefficients of the quotient.

Bézout's theorem, gcd, lcm and irreducible factors

Bézout's (remainder) theorem: when p(x) is divided by (x − a), the remainder is p(a). So (x − a) divides p if and only if p(a) = 0. Then a is called a root (or zero) of p. You can see this in the 3D: the last purple bar equals p(a).

The gcd of two polynomials is the common divisor of the highest degree. Find it by repeated division with remainder (the Euclid method), exactly like gcd of numbers. The lcm is p·q ÷ gcd(p, q) (up to a constant). Example: x² − 1 = (x − 1)(x + 1) and x² − 3x + 2 = (x − 1)(x − 2), so gcd = x − 1 and lcm = (x − 1)(x + 1)(x − 2).

A polynomial is irreducible if it cannot be written as a product of two polynomials of smaller degree. Over the reals every irreducible polynomial has degree 1, or degree 2 with a negative discriminant (like x² + 1). Over the rationals, x² − 2 is irreducible but over the reals it splits as (x − √2)(x + √2).

Roots and Viète relations

If a polynomial has roots x₁, x₂, … then p(x) = aₙ(x − x₁)(x − x₂)… Multiplying out links the roots to the coefficients. These are the Viète relations.

For ax² + bx + c = 0: x₁ + x₂ = −b/a and x₁x₂ = c/a.

For ax³ + bx² + cx + d = 0: x₁ + x₂ + x₃ = −b/a, x₁x₂ + x₂x₃ + x₁x₃ = c/a, x₁x₂x₃ = −d/a.

Tip for whole-number roots: any whole-number root must divide the constant term. For x³ − 6x² + 11x − 6 try ±1, ±2, ±3, ±6. Test each with Horner. More on roots: Roots of polynomials and identities.

Special equations: binomial, reciprocal and biquadratic

Algebraic equation: p(x) = 0. Find a root by Horner, divide it out, and repeat on the smaller quotient.

Binomial equation: xⁿ = c. Example x⁴ = 16 gives x = ±2 over the reals.

Biquadratic: ax⁴ + bx² + c = 0. Put t = x², solve the quadratic in t, then x = ±√t. Example x⁴ − 5x² + 4 = 0: t = 1 or 4, so x = ±1, ±2.

Reciprocal equation: the coefficients read the same forwards and backwards, like x⁴ + 2x³ − 6x² + 2x + 1 = 0. Divide by x² and put t = x + 1/x. Then x² + 1/x² = t² − 2 and you get a quadratic in t.

Try it: find the roots yourself

In the 3D, go to the last step and slide a from 0 to 5. First guess which values will give remainder 0 (look at the constant term −6: whole-number roots must divide 6). Then check. You should find 1, 2 and 3. Add them: 6. That equals −b/a = 6, the Viète sum. Multiply them: 6. That equals −d/a = 6.

Key formulas and definitions

Worked examples

1. Divide x³ − 6x² + 11x − 6 by x − 2 with Horner's scheme.

Coefficients 1, −6, 11, −6 and a = 2. Bring down 1. Next: 2×1 + (−6) = −4. Next: 2×(−4) + 11 = 3. Last: 2×3 + (−6) = 0. Quotient x² − 4x + 3, remainder 0, so (x − 2) is a factor.

2. Find the remainder when x³ + 2x² − 5x + 1 is divided by x − 2.

By Bézout the remainder is p(2) = 8 + 8 − 10 + 1 = 7.

3. For which m is x − 3 a factor of x³ − m x² + 2x + 3?

We need p(3) = 0: 27 − 9m + 6 + 3 = 36 − 9m = 0, so m = 4.

4. Solve x³ − 6x² + 11x − 6 = 0.

Try 1: Horner gives remainder 0 and quotient x² − 5x + 6. Factor: (x − 2)(x − 3). Roots are 1, 2, 3.

5. The roots of 2x² − 7x + 3 = 0 are α and β. Find α² + β².

α + β = 7/2, αβ = 3/2. α² + β² = (α + β)² − 2αβ = 49/4 − 3 = 37/4 = 9.25.

6. Solve x⁴ − 5x² + 4 = 0, and find gcd(x² − 1, x² − 3x + 2).

Put t = x²: t² − 5t + 4 = 0, so t = 1 or 4, giving x = ±1, ±2. For the gcd, x² − 1 = (x − 1)(x + 1) and x² − 3x + 2 = (x − 1)(x − 2), so the gcd is x − 1.

Common mistakes

Practice quiz

1. The remainder when p(x) is divided by (x − 4) is:
2. The degree of 5x⁴ − x² + 7 is:
3. The sum of the roots of x² − 9x + 20 is:
4. To solve x⁴ − 13x² + 36 = 0 we put:
5. If p(2) = 0 then:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is Horner's scheme in simple words?

It is a short table to divide a polynomial by (x − a). You repeat multiply-by-a and add. It also gives the value p(a) as the last number.

What is the difference between a root and a factor?

If a is a root then (x − a) is a factor, and the other way round. A root is a number; a factor is a polynomial.

Where is this taught?

Polynomial division, Horner's scheme, Bézout's theorem, gcd and Viète relations appear in upper-secondary and pre-university algebra courses in several countries, for example in Romanian Grade 12 mathematics.

Where this is taught

RomaniaClasa a XII-aElements of algebra
RomaniaClasa a XII-aElements of algebra

Learn first

Learn next

Related lessons

All Maths lessons