Skip to main content

Resultant Calculator

Calculate polynomial resultants to determine common roots and eliminate variables

Category: Mathematics

Resultant Calculator Inputs

Enter values to calculate

Enter the First Polynomial P(x) text used by the Resultant Calculator.

Enter the Second Polynomial Q(x) text used by the Resultant Calculator.

Enable JavaScript for interactive calculation and step-by-step results.

Resultant Calculator Formula

Equation

Res(P,Q) = aₙᵐbₘⁿ∏∏(rᵢ-sⱼ)

Excel Formula

=Res(P,Q)=aₙᵐbₘⁿ∏∏(rᵢ-sⱼ)

Variables

  • First Polynomial P(x) — Enter the First Polynomial P(x) text used by the Resultant Calculator.
  • Second Polynomial Q(x) — Enter the Second Polynomial Q(x) text used by the Resultant Calculator.

How the Resultant Calculator Works

The resultant is a fundamental invariant in algebraic geometry and commutative algebra that determines whether two polynomials have a common root. For polynomials P(x) and Q(x), the resultant Res(P,Q) vanishes if and only if P and Q share a common root (or both have a root at infinity). The resultant can be computed as the determinant of the Sylvester matrix, a structured matrix built from the polynomial coefficients. This powerful tool eliminates variables in polynomial systems, enabling solutions to multi-variable polynomial equations. The resultant appears in elimination theory, algebraic curves (finding intersections), number theory (studying algebraic integers), and computer algebra systems. It generalizes the discriminant (resultant of a polynomial and its derivative) and connects to GCD algorithms, polynomial factorization, and the theory of algebraic varieties.

The core relationship is Res(P,Q) = aₙᵐbₘⁿ∏∏(rᵢ-sⱼ). Typical inputs include First Polynomial P(x), Second Polynomial Q(x).

Enter your values in the resultant calculator above, review the step-by-step solution, and compare against the worked examples below so you can see how each input changes the result. This free online mathematics tool is built for homework, design checks, and professional verification.

Resultant Calculator Theory & Explanation

Definition via Roots

For polynomials P(x) = a_n\prod_i=1^n(x-r_i) of degree n and Q(x) = b_m\prod_j=1^m(x-s_j) of degree m, the resultant is defined as: \textRes(P,Q) = a_n^m b_m^n \prod_i=1^n\prod_j=1^m(r_i - s_j) This product over all pairs of roots (one from P, one from Q) vanishes if any r_i = s_j, detecting common roots. The factors a_n^m b_m^n normalize for leading coefficients. For example, P(x)=x^2-1 (roots ±1) and Q(x)=x-1 (root 1): \textRes(P,Q) = 1·1·(1-1)·(-1-1) = 0, confirming common root x=1. This definition, while conceptually clear, isn't computational—we need the Sylvester matrix for actual calculation.

\textRes(P,Q) = a_n^m b_m^n \prod_i=1^n\prod_j=1^m(r_i - s_j)

Sylvester Matrix and Determinant Formula

The Sylvester matrix S(P,Q) is an (m+n) × (m+n) matrix constructed from coefficients of P(x) = a_nx^n + ·s + a_0 and Q(x) = b_mx^m + ·s + b_0. The first m rows contain coefficients of P shifted, the next n rows contain coefficients of Q shifted: S = \beginpmatrix a_n & a_n-1 & ·s & a_0 & 0 & ·s & 0 \\ 0 & a_n & a_n-1 & ·s & a_0 & 0 & ·s \\ \vdots & & \ddots & & & \ddots & \\ b_m & b_m-1 & ·s & b_0 & 0 & ·s & 0 \\ 0 & b_m & b_m-1 & ·s & b_0 & ·s & 0 \\ \vdots & & \ddots & & & \ddots & \endpmatrix The resultant equals \textRes(P,Q) = \det(S). This determinant formula provides a computational method that doesn't require finding roots.

\textRes(P,Q) = \det(S(P,Q))

Properties of the Resultant

The resultant has several important properties. Symmetry: \textRes(P,Q) = (-1)^nm\textRes(Q,P). Multiplicativity: \textRes(P,QR) = \textRes(P,Q)\textRes(P,R). Bézout identity: there exist polynomials U(x) and V(x) with \deg(U) < m, \deg(V) < n such that: U(x)P(x) + V(x)Q(x) = \textRes(P,Q) If the resultant is non-zero, this gives an explicit representation of it as a polynomial combination of P and Q. Homogeneity: \textRes(\lambda P, \mu Q) = \lambda^m\mu^n\textRes(P,Q). These properties make resultants powerful for algebraic manipulations and theoretical proofs.

U(x)P(x) + V(x)Q(x) = \textRes(P,Q)

Connection to GCD and Factorization

The resultant is zero if and only if P and Q have a non-constant common factor: \textRes(P,Q) = 0 \Leftrightarrow \gcd(P,Q) ≠ 1. This connection makes resultants useful for detecting polynomial factorizations. If P(x) = R(x)S(x), then \textRes(P,R) = 0 and \textRes(P,S) = 0. The Euclidean algorithm for polynomials can be understood through resultants: each step reduces resultant magnitude. For polynomial factorization algorithms, checking \textRes(P,Q) = 0 for potential factors Q is faster than trial division in some cases. The resultant also relates to polynomial discriminant: Δ(P) = (-1)^n(n-1)/2(1)/(a_n)\textRes(P,P'), connecting roots' separation to differentiation.

\textRes(P,Q) = 0 \Leftrightarrow \gcd(P,Q) ≠ 1

Elimination Theory and Systems of Equations

Resultants eliminate variables from polynomial systems. For system P(x,y)=0, Q(x,y)=0 where P,Q are polynomials in two variables, treat them as polynomials in y with coefficients in x: P(x,y) = Σ p_i(x)y^i, Q(x,y) = Σ q_j(x)y^j. The resultant R(x) = \textRes_y(P,Q) eliminates y, giving a univariate polynomial in x alone. The roots of R(x) are the x-coordinates of common solutions to the system. This classical elimination method predates Gröbner bases and remains computationally efficient for many problems. It's fundamental to computer-aided geometric design (curve intersections), robotics (kinematic equations), and computational algebraic geometry.

P(x,y) = 0, Q(x,y) = 0 \xrightarrow\textRes_y R(x) = 0

Computational Complexity and Algorithms

Computing the resultant via Sylvester determinant naively takes O((m+n)^3) time using Gaussian elimination. However, specialized algorithms exploit polynomial structure for efficiency. The subresultant algorithm (pseudo-division chain) computes resultants in O(mn\min(m,n)) time. For dense polynomials with integer coefficients, modular methods compute \textRes(P,Q) \mod p for several primes p, then use Chinese Remainder Theorem to reconstruct the exact resultant—this parallelizes well. For sparse polynomials, specialized techniques avoid filling in zero structure. Modern computer algebra systems (Mathematica, Maple) use optimized resultant algorithms. Understanding computational complexity guides algorithm selection for different polynomial types and sizes.

\textComplexity: O((m+n)^3) \text (naive), O(mn\min(m,n)) \text (optimized)

Applications Across Mathematics

Resultants appear throughout mathematics. In number theory, they study algebraic integers—resultant of minimal polynomials determines if algebraic numbers are related. In algebraic geometry, resultants find curve intersections (implicitization converts parametric to implicit using resultants). In robotics, kinematic equations (polynomial systems) solve using resultants for forward/inverse kinematics. In computer algebra, resultants implement GCD algorithms over polynomial rings. In coding theory, resultants analyze linear recurring sequences. In optimization, elimination of variables in polynomial constraints uses resultants. The ubiquity of resultants reflects the fundamental importance of detecting common roots and eliminating variables—central tasks in algebra and its applications.

\textApplications: algebraic geometry, number theory, robotics, computer algebra, coding theory

Resultant Calculator Worked Examples

Worked Example

Inputs

  • poly1: 1, 0, -1
  • poly2: 1, -1

Result: Res(P,Q) = 0 (common root exists)

Explanation

P(x)=x²-1 and Q(x)=x-1 share root x=1, so resultant = 0

No Common Root

Inputs

  • poly1: 1, 0, -1
  • poly2: 1, -2

Result: Res(P,Q) = 3

Explanation

P(x)=x²-1 (roots ±1) and Q(x)=x-2 (root 2) have no common root, resultant ≠ 0

Common Resultant Calculator Use Cases

  • Homework and exam practice
  • Engineering and science coursework
  • Quick verification of hand calculations
  • Resultant homework and study
  • Resultant design and analysis

Resultant Calculator FAQs

What is the resultant and why is it important?

The resultant Res(P,Q) of two polynomials is a value (polynomial expression in the coefficients) that equals zero if and only if P and Q have a common root. It's important because it detects common roots without finding them explicitly—just compute a determinant. This makes it valuable for solving polynomial systems (eliminate variables), detecting polynomial factorizations (common factors), and analyzing algebraic curves (finding intersections). The resultant is a fundamental tool in elimination theory, computer algebra, and algebraic geometry.

How do I calculate the resultant?

Build the Sylvester matrix from polynomial coefficients and compute its determinant. For P(x)=ax²+bx+c and Q(x)=dx+e, the 3×3 Sylvester matrix has rows [a,b,c,0], [0,a,b,c], [d,e,0,0], [0,d,e,0]... wait, for degree 2 and 1, it's 3×3: rows from P shifted, rows from Q shifted. Compute det(S). This determinant gives Res(P,Q). For small degrees, formulas exist: Res(ax²+bx+c, dx+e) = a e² - b de + c d². For larger degrees, use numerical determinant computation or specialized algorithms.

When is the resultant zero?

Res(P,Q)=0 if and only if P and Q have a common root. This includes: (1) literally the same root (like P and Q both vanishing at x=2), (2) P and Q have a common factor (like both divisible by (x-2)), or (3) one polynomial is a constant multiple of the other. Geometrically, zero resultant means the curves y=P(x) and y=Q(x) intersect the x-axis at the same point. For polynomial systems in multiple variables, zero resultant of eliminated variable means the system has solutions.

What is the Sylvester matrix?

The Sylvester matrix is an (m+n)×(m+n) matrix constructed from coefficients of polynomials P (degree n) and Q (degree m). It has m rows containing shifted coefficients of P and n rows containing shifted coefficients of Q. Each row shifts one position right from the previous. The matrix is designed so that its determinant equals the resultant. This construction converts the algebraic problem of detecting common roots into a linear algebra problem of computing a determinant. The Sylvester matrix is sparse (many zeros), allowing efficient computation.

How does the resultant relate to the discriminant?

The discriminant is a special case of the resultant! For polynomial P(x), the discriminant Δ(P) equals (up to sign and leading coefficient factor) Res(P, P'), the resultant of P and its derivative. Since P and P' share a root if and only if P has a repeated root, Δ(P)=0 detects repeated roots. For quadratic ax²+bx+c: Δ=b²-4ac equals Res(P,P') (up to factors). The resultant generalizes this idea: instead of P and P' (detecting self-intersection of roots), consider any two polynomials (detecting mutual intersection).

Can the resultant help solve polynomial systems?

Yes! Consider system P(x,y)=0, Q(x,y)=0. Treat as polynomials in y: compute Res_y(P,Q) to get R(x), a polynomial in x only. Solving R(x)=0 gives x-coordinates of solutions. For each x-value, substitute back to find corresponding y. Example: circle x²+y²=1 and line y=x+1. Eliminate y using resultant: get equation in x only, solve for intersection x-coordinates. This classical elimination method (before Gröbner bases) remains efficient for many problems, especially when one polynomial is linear in the eliminated variable.

What are applications of resultants in computer graphics?

Curve intersection: find where two parametric curves intersect by eliminating parameters using resultants. Ray tracing: determine where a ray intersects an algebraic surface by eliminating two variables. Implicitization: convert parametric curves x=f(t), y=g(t) to implicit form F(x,y)=0 using resultants to eliminate t. For example, circle parametrization x=cos(t), y=sin(t) implicitizes to x²+y²=1 via resultant. Computer-aided design (CAD) uses resultants for surface intersections, trimming, and boolean operations on geometric objects defined by polynomials.

How do computer algebra systems compute resultants efficiently?

Modern systems use multiple strategies: (1) Subresultant PRS (Polynomial Remainder Sequence) avoids determinant computation, using polynomial GCD-like chain. (2) Modular methods: compute Res(P,Q) mod p for several primes, reconstruct using CRT (Chinese Remainder Theorem). (3) Sparse techniques: exploit zero structure in Sylvester matrix. (4) Divide-and-conquer: recursive formulas for resultants. For dense integer polynomials, modular methods dominate. For symbolic coefficients, subresultant methods are better. Choice depends on polynomial type, size, and coefficient structure. These optimizations make resultants tractable for high-degree polynomials (degree 100+) arising in applications.