Linear Algebra

Polynomial Resultant

Build a Sylvester matrix for two quadratics and test whether they share a complex root.

By Riano · Published · Updated · Report a correction

Polynomial Resultant

The resultant of two polynomials is an algebraic invariant built from their coefficients that vanishes if and only if the two polynomials share at least one common root over the complex numbers.

Concept Overview

Given two monic quadratic polynomials f(x) = x2 + ax + b and g(x) = x2 + cx + d, asking whether they share a complex root x0 is equivalent to asking whether there exist non-zero linear multipliers p(x) = p1x + p0 and q(x) = q1x + q0 such that p(x)f(x) + q(x)g(x) = 0.

Expanding this polynomial identity in the monomial basis {x^3, x^2, x, 1} produces a homogeneous 4×4 linear system whose coefficient matrix is the Sylvester matrix S(f, g).

Mathematical Formulation

For f(x) = x2 + ax + b and g(x) = x2 + cx + d, the 4×4 Sylvester matrix has rows [1, a, b, 0], [0, 1, a, b], [1, c, d, 0], and [0, 1, c, d]. Its determinant is the resultant Res(f, g) = det S(f, g).

By subtracting the two quadratics, any common root must satisfy g(x) - f(x) = (c - a)x + (d - b) = ux + v = 0, where u = c - a and v = d - b. Eliminating x yields the closed-form resultant formula Res(f, g) = v2 - auv + bu2.

Worked Example

Let us calculate the resultant for two distinct monic quadratics:
f(x) = x2 + x - 2
g(x) = x2 - 2x + 2

Here, the coefficients are a = 1, b = -2, c = -2, d = 2. We form the 4×4 Sylvester matrix:

[
  [1,  1, -2,  0],
  [0,  1,  1, -2],
  [1, -2,  2,  0],
  [0,  1, -2,  2]
]

We can calculate the determinant of this matrix, which is the resultant, by using the elimination relation:

  1. Find u = c - a = -2 - 1 = -3.
  2. Find v = d - b = 2 - (-2) = 4.
  3. Calculate the resultant: Resultant = v2 - auv + bu2.
  4. Resultant = (4)2 - (1)(-3)(4) + (-2)(-3)2 = 16 + 12 - 18 = 10.

Since the resultant is 10 (nonzero), the two polynomials do not share a common complex root.

Experiment

You can test the resultant interactively in the Polynomial Resultant module. Try the following steps:

  1. Set a to 1, b to 1, c to 1, and d to 1 to represent identical polynomials.
  2. Observe that the Resultant becomes exactly 0.
  3. The Common complex root indicator updates to true, as identical polynomials share all roots.
  4. Now change a to 0, b to -1, c to -2, and d to 1.
  5. The Resultant again evaluates to 0, showing that f(x) = x2 - 1 and g(x) = x2 - 2x + 1 share the real root x = 1.

Limitations

This module is specifically designed for monic quadratic polynomials (where the leading coefficient is 1). The formula and 4×4 Sylvester matrix shown are not generalizable to polynomials of higher or lower degrees without altering the matrix dimensions and elements. Furthermore, a resultant of zero indicates that the polynomials share at least one complex root, but it does not specify whether the shared root is real or non-real complex.

Common Pitfalls

Do not confuse the resultant Res(f, g) of two polynomials with the discriminant of a single polynomial. A polynomial such as f(x) = x2 has a repeated root at x = 0 (zero discriminant), and g(x) = (x - 1)2 has a repeated root at x = 1, yet their resultant is Res(f, g) = 1 ≠ 0 because they do not share a root with each other.

References

The following primary references provide algorithms for computing resultants over general rings using Sylvester matrices.

Experience it interactively

Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Polynomial Resultant module.

Try Polynomial Resultant on Riano →

More in Linear Algebra