Advanced maths

Polynomial resultant calculator using the Sylvester matrix

Calculate the exact resultant of two rational polynomials, show the Sylvester matrix and interpret the common-complex-root criterion under explicit conventions.

Your numbers

Coefficients in descending powers, including zero placeholders. Use rational fractions or decimals with at most six places; coefficients within ±10⁶. Degree at most six.
Coefficients in descending powers, including zero placeholders. Use rational fractions or decimals with at most six places; coefficients within ±10⁶. Degree at most six.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

The resultant turns two polynomial coefficient lists into one exact scalar. For nonzero positive-degree polynomials, it vanishes precisely when they share a root over the complex numbers. This calculator builds the Sylvester matrix with shifted rows of the first polynomial followed by shifted rows of the second, then evaluates its determinant using rational elimination. The displayed matrix fixes the row and sign convention so another implementation can be compared consistently.

THE FORMULARes(A,B)=det Syl(A,B)=a_m^n ∏ B(α), with roots α of A counted with multiplicity.

A worked example

Let A=x²−2 and B=x−1. The Sylvester matrix is [[1,0,−2],[1,−1,0],[0,1,−1]], whose determinant is −1. The product-over-roots check gives (√2−1)(−√2−1)=−1. The nonzero value proves there is no common complex root; it does not mean either polynomial lacks roots of its own. If A is changed to x²−1, the resultant with x−1 becomes zero.

Good to know

Each rational polynomial has degree at most six and input coefficients within ±10⁶. The matrix has order at most twelve, and exact coefficient-growth limits apply. No approximate determinant or root search is substituted. The ordinary common-root criterion assumes nonzero polynomials of positive degree. Nonzero constants use the power and empty-determinant conventions; a zero input uses resultant zero with a separate interpretation. The tool does not locate roots or eliminate parameters from multivariate expressions.

Polynomial order determines the resultant sign

For degrees m and n, swapping A and B multiplies the resultant by (−1)^(m*n). A linear polynomial and a cubic therefore change sign when exchanged, while two quadratics do not. For A=x−2 and B=x³−3, the convention here gives B(2)=5; swapping their positions gives −5. This sign rule is a useful cross-check when two software outputs appear to disagree.

The first n matrix rows contain the descending coefficients of A, shifted successively to the right. The next m rows do the same with B. Zero coefficients keep their positions, so entering x²−2 as 1,−2 would instead specify x−2 and change both the matrix dimension and the problem. The explicit row table helps expose such input-order mistakes before a determinant is interpreted.

The default three by three Sylvester determinant is negative oneSylvester matrix10-21-1001-1det = −1No common rootA = x²−2; B = x−1
For A=x²−2 and B=x−1, the first row contains A and the next two contain shifted B coefficients. The determinant is −1, agreeing with the product of B over the two roots of A. The inputs have no common complex root.

The Polynomial extended Euclidean algorithm calculator returns the shared polynomial factor when a resultant indicates that one exists.

A vanishing scalar is an existence statement about a shared root

A zero resultant for two nonzero positive-degree inputs detects a common complex root, which may be real or nonreal. It does not count how many common roots exist or identify their multiplicities. For example, sharing x²+1 already makes a resultant vanish even though that factor has no real root. A polynomial GCD can reveal the shared factor more directly, while a root-isolation method answers a different question about real roots in an interval.

Constant inputs need their own conventions. A nonzero constant c paired with a degree-n polynomial gives c^n in the corresponding position, and two nonzero constants give one through the empty determinant. The zero polynomial is assigned resultant zero here, but treating that special case as an ordinary common-root certificate can be misleading when the other input is a nonzero constant. The page therefore states the interpretation for the actual degrees instead of attaching one generic message to every zero output.

A few questions, answered

Does a small nonzero resultant imply nearly equal roots?

Not by itself. Scaling a polynomial scales the resultant, and numerical conditioning depends on the coefficients and root geometry. This exact scalar is not a normalized root-distance estimate.

Is the Sylvester matrix the same as the Sylvester equation solver?

No. This matrix encodes shifted polynomial coefficients for an elimination determinant. A Sylvester matrix equation such as A*X+X*B=C solves for an unknown matrix and is a different operation.

Find your calculator

Start typing to explore the library.