Introduction

Take two polynomials, say f(x)=x25x+6f(x) = x^2 - 5x + 6 and g(x)=x28x+15g(x) = x^2 - 8x + 15. Do they share a root? You could factor both: f(x)=(x2)(x3)f(x) = (x-2)(x-3) and g(x)=(x3)(x5)g(x) = (x-3)(x-5), and spot the common factor (x3)(x-3). That works fine for small, tidy examples.

But factoring is not always an option. What if the coefficients are symbolic, or the polynomials have degree 20? You need a way to answer "do they share a root?" using nothing but the coefficients themselves — arithmetic, not guesswork.

That is exactly what the resultant does. Build a certain matrix from the coefficients of ff and gg — the Sylvester matrix — take its determinant, and the result is a single number: the resultant Res(f,g)\operatorname{Res}(f,g). It is zero if and only if ff and gg share a root (over the complex numbers). No factoring, no root-finding — just arithmetic on the coefficients.

Try It

Fix g(x)=x25x+6=(x2)(x3)g(x) = x^2 - 5x + 6 = (x-2)(x-3). Now take a family f(x)=x2+bx+2bf(x) = x^2 + bx + 2b and slide bb. For most values of bb, ff and gg have no root in common. But the resultant Res(f,g)\operatorname{Res}(f,g), computed straight from the coefficients as a 4×44\times4 determinant, tells you exactly when a shared root appears — without ever solving for the roots themselves.

<p class="hint">{{hint_para}}</p>
<div class="controls">
  <label for="bslider">{{slider_label}}</label>
  <input type="range" id="bslider" min="-3" max="1" step="0.01" value="0.3">
  <span id="bval" class="bval">b = 0.30</span>
</div>
<div class="panels">
  <div class="panel">
    <canvas id="curves" width="320" height="220"></canvas>
    <div class="caption">{{curves_caption}}</div>
  </div>
  <div class="panel">
    <canvas id="reschart" width="320" height="220"></canvas>
    <div class="caption">{{res_caption}}</div>
  </div>
</div>
<div class="status" id="status">{{status_move}}</div>
<div class="btns">
  <button id="snap1" type="button">{{btn_snap1}}</button>
  <button id="snap2" type="button">{{btn_snap2}}</button>
  <button id="reset" type="button" class="ghost">{{btn_reset}}</button>
</div>
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; color: #222; margin: 0; }
.hint { font-size: .9rem; color: #444; margin: 0 0 .7rem; line-height: 1.45; }
.controls { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; flex-wrap: wrap; }
.controls label { font-size: .85rem; font-weight: 600; color: #1d3557; }
.controls input[type="range"] { flex: 1; min-width: 160px; accent-color: #1d3557; }
.bval { font: 700 14px ui-monospace, monospace; color: #1d3557; min-width: 80px; }
.panels { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.panel { flex: 1; min-width: 260px; }
canvas { width: 100%; max-width: 320px; height: auto; background: #f7f9fb; border: 1px solid #cdd9e3; border-radius: 8px; display: block; }
.caption { font-size: .78rem; color: #555; text-align: center; margin-top: .3rem; }
.status { font-size: 1rem; font-weight: 600; margin: .5rem 0; min-height: 1.4em; }
.status.ok { color: #0a7d33; }
.status.bad { color: #444; }
.btns { display: flex; gap: .5rem; flex-wrap: wrap; }
button { font: 600 14px system-ui, sans-serif; padding: .45rem .9rem; border: 1px solid #1d3557;
         background: #1d3557; color: #fff; border-radius: 8px; cursor: pointer; }
button.ghost { background: #fff; color: #1d3557; }
// Code not found

Drag the slider slowly. Watch the resultant curve and the two parabolas at the same time: every time the resultant crosses zero, the two curves are touching at a common point. The determinant "feels" the tangency algebraically, before you ever look at the picture.

The Real Complexity

The construction is completely mechanical. For f(x)=a0xm+a1xm1++amf(x) = a_0 x^m + a_1 x^{m-1} + \dots + a_m and g(x)=b0xn+b1xn1++bng(x) = b_0 x^n + b_1 x^{n-1} + \dots + b_n, the Sylvester matrix is an (m+n)×(m+n)(m+n)\times(m+n) matrix built from shifted copies of the coefficients of ff (n rows) stacked on shifted copies of the coefficients of gg (m rows). Its determinant is the resultant:

Res(f,g)=detS(f,g)\operatorname{Res}(f,g) = \det S(f,g)

  • Why it works: Res(f,g)=0\operatorname{Res}(f,g) = 0 exactly when ff and gg have a nontrivial common factor — equivalently, a common root in the complex numbers (or a shared root "at infinity" if leading coefficients vanish). This falls out of linear algebra: the rows of the Sylvester matrix encode the coefficients of xif(x)x^i f(x) and xjg(x)x^j g(x), and a common root forces a linear dependency among them, which is exactly what a zero determinant means.
  • It is a polynomial in the coefficients. Res(f,g)\operatorname{Res}(f,g) is itself a polynomial expression in the aia_i and bjb_j — no radicals, no case-splitting. That makes it exact and symbolic, unlike numerically hunting for roots.
  • It generalizes. Setting g=fg = f' (the derivative) gives the discriminant, which detects repeated roots of a single polynomial — the same determinant machine, one polynomial away from the resultant.
  • Cost: computing an (m+n)×(m+n)(m+n)\times(m+n) determinant directly costs O((m+n)3)O((m+n)^3) with standard methods, though faster resultant-specific algorithms exist. It is polynomial-time, symbolic, and exact — a very different profile from problems like P vs NP, where no such efficient exact recipe is known.

Where It Matters

"Eliminate a variable between two equations" sounds narrow, but it is one of the most-needed operations in computational mathematics:

  • Elimination theory: given two polynomial equations in xx and yy, treating them as polynomials in xx with coefficients in yy and taking the resultant produces a single equation in yy alone — describing exactly where two curves intersect.
  • Computer-aided design and robotics: solving for the configurations where two algebraic curves or surfaces meet (collision detection, linkage kinematics) routinely reduces to a resultant computation.
  • Computer algebra systems: resultants underlie variable-elimination routines that complement Gröbner bases for solving systems of polynomial equations exactly.
  • Number theory and cryptanalysis: resultants help detect common factors between polynomials over finite fields, relevant to constructing and attacking certain cryptographic schemes.

Any time "do these two algebraic conditions simultaneously hold" needs a symbolic, no-approximation answer, the resultant is often the tool that gets there fastest.

Conclusion

The resultant turns a question that looks like it needs solving — "do these two polynomials share a root?" — into a question about a determinant, answerable by pure arithmetic on the coefficients. Zero means yes, they touch; nonzero means no, they never do.

It is a small piece of a bigger idea: sometimes the fastest way to answer a hard-looking question is not to solve the problem in front of you, but to build the right algebraic object — a matrix, a determinant, an invariant — that already knows the answer. The same spirit shows up throughout Gröbner bases and the rest of computational algebraic geometry.

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/resultant-polynomials/Content licensed under CC BY-NC 4.0.