Resultant
Details and Options
- The resultant of two polynomials p and q, both with leading coefficient 1, is the product of all the differences pi-qj between roots of the polynomials. The resultant is always a number or a polynomial.
- Resultant takes the following options:
-
Method Automatic method to use Modulus 0 modulus to assume for integers
Examples
open all close allBasic Examples (1)
Scope (6)
Resultant of polynomials with numeric coefficients:
Resultant[x ^ 2 - 2x + 7, x ^ 3 - x + 5, x]Resultant of polynomials with parametric coefficients:
Resultant[a x ^ 2 + b x + c, (a - b)x ^ 3 + (a - c)x ^ 2 + (b - c)x + 9, x]Resultant over integers modulo 3:
Resultant[x ^ 2 - 2x + 7, x ^ 3 - x + 5, x, Modulus -> 3]Resultant over a finite field:
ℱ = FiniteField[17, 3];Resultant[ℱ[1]x ^ 5 + ℱ[123]x y + ℱ[456], ℱ[789]x ^ 3 + ℱ[987]x + ℱ[654], x]The resultant reflects the multiplicities of roots:
Resultant[(x - a) ^ 2(x - b), (x - c) ^ 2(x - d)(x - e), x]Compute the resultant of two polynomials of degree
:
rpoly[n_] := RandomInteger[{-2 ^ 10, 2 ^ 10}, {n + 1}].x ^ Range[0, n]
SeedRandom[1234];
p = rpoly[1000]; q = rpoly[1000];Resultant[p, q, x]//Short//AbsoluteTimingGeneralizations & Extensions (1)
The resultant of rational functions is defined using the multiplicative property:
Subscript[f, 1] = 2 x + 3;Subscript[f, 2] = 3x ^ 2 - 7;Subscript[g, 1] = x ^ 2 - x + 5;Subscript[g, 2] = 2x ^ 3 - 3x + 8;r1 = Resultant[Subscript[f, 1]Subscript[f, 2] ^ 2, Subscript[g, 1]Subscript[g, 2] ^ 3, x]r2 = Resultant[Subscript[f, 1], Subscript[g, 1], x]Resultant[Subscript[f, 2], Subscript[g, 1], x] ^ 2Resultant[Subscript[f, 1], Subscript[g, 2], x] ^ 3Resultant[Subscript[f, 2], Subscript[g, 2], x] ^ 6r1 == r2r1 = Resultant[Subscript[f, 1] / Subscript[f, 2], Subscript[g, 1] / Subscript[g, 2] ^ 2, x]r2 = Resultant[Subscript[f, 1], Subscript[g, 1], x]Resultant[Subscript[f, 2], Subscript[g, 1], x] ^ -1Resultant[Subscript[f, 1], Subscript[g, 2], x] ^ -2Resultant[Subscript[f, 2], Subscript[g, 2], x] ^ 2r1 == r2Options (4)
Method (1)
This compares timings of the available methods of resultant computation:
Timing[Resultant[x ^ 100 - 2x ^ 77 + 3x + 4, x ^ 97 + 3x ^ 55 - 11x ^ 3 + 9, x, Method -> #]//Short]& /@ {Automatic, "Modular", "Subresultants", "BezoutMatrix", "SylvesterMatrix"}//ColumnTiming[Resultant[a x ^ 10 + b x ^ 5 + (a + b)x + a b c, c x ^ 5 - a x ^ 3 + (a - b)x + 7, x, Method -> #]//Short]& /@ {Automatic, "Modular", "Subresultants", "BezoutMatrix", "SylvesterMatrix"}//ColumnModulus (3)
By default the resultant is computed over the rational numbers:
Resultant[a x ^ 3 + b x ^ 2 + c x + d, d x ^ 3 + c x ^ 2 + b x + a, x]Compute the resultant of the same polynomials over the integers modulo 2:
Resultant[a x ^ 3 + b x ^ 2 + c x + d, d x ^ 3 + c x ^ 2 + b x + a, x, Modulus -> 2]Compute the resultant of the same polynomials over the integers modulo 3:
Resultant[a x ^ 3 + b x ^ 2 + c x + d, d x ^ 3 + c x ^ 2 + b x + a, x, Modulus -> 3]Applications (2)
Decide whether two polynomials have common roots:
Resultant[x ^ 3 - 5x ^ 2 - 7x + 3, x ^ 3 - 8x ^ 2 + 9x - 11, x]PolynomialGCD[x ^ 3 - 5x ^ 2 - 7x + 3, x ^ 3 - 8x ^ 2 + 9x - 11]Resultant[x ^ 3 - 5x ^ 2 - 7x + 14, x ^ 3 - 8x ^ 2 + 9x + 58, x]PolynomialGCD[x ^ 3 - 5x ^ 2 - 7x + 14, x ^ 3 - 8x ^ 2 + 9x + 58]Find conditions for two polynomials to have common roots:
Reduce[Resultant[x ^ 3 - 2a x ^ 2 + a ^ 2x - 1, x ^ 2 - 2a x + 3, x] == 0, a]Apply[PolynomialGCD[##, Extension -> Automatic]&, {x ^ 3 - 2a x ^ 2 + a ^ 2x - 1, x ^ 2 - 2a x + 3} /. {ToRules[%]}, {1}]Properties & Relations (6)
The resultant is zero if and only if the polynomials have a common root:
Resultant[(x - 1)(x - 2)(x - 3), (x - 4)(x - 5)(x - 6), x]Resultant[(x - 1)(x - 2)(x - 3), (x - 4)(x - 5)(x - 1), x]The polynomials have a zero resultant if and only if they have a nonconstant PolynomialGCD:
Resultant[x ^ 3 - 1, x ^ 3 + 2x ^ 2 + 2x - 1, x]PolynomialGCD[x ^ 3 - 1, x ^ 3 + 2x ^ 2 + 2x - 1]Resultant[x ^ 3 - 1, x ^ 3 + 2x ^ 2 + 2x + 1, x]PolynomialGCD[x ^ 3 - 1, x ^ 3 + 2x ^ 2 + 2x + 1]The resultant can be represented in terms of roots as
:
Resultant[Subscript[a, 3](x - Subscript[r, 1])(x - Subscript[r, 2])(x - Subscript[r, 3]), Subscript[b, 2](x - Subscript[s, 1])(x - Subscript[s, 2]), x]Equation
relates Discriminant and Resultant:
f = 3x ^ 7 - 5x + 4;
n = Exponent[f, x];Resultant[f, D[f, x], x](-1) ^ (n (n - 1) / 2)Coefficient[f, x, n]Discriminant[f, x]GroebnerBasis can also be used to find conditions for common roots:
Resultant[(x - a)(x - b), (x - c)(x - d)(x - e), x]Select[GroebnerBasis[{(x - a)(x - b), (x - c)(x - d)(x - e)}, x], FreeQ[#, x]&]//FactorThe same problem can also be solved using Reduce, Resolve, and Eliminate:
Reduce[Exists[x, (x - a)(x - b) == 0 && (x - c)(x - d)(x - e) == 0], {a, b, c, d, e}]Resolve[Exists[x, (x - a)(x - b) == 0 && (x - c)(x - d)(x - e) == 0]]Eliminate[{(x - a)(x - b) == 0, (x - c)(x - d)(x - e) == 0}, x]//SimplifyPossible Issues (1)
The following two polynomials have no common root:
Resultant[x - 1 + 10 ^ (-17), x - 1, x]Using approximate coefficients they will appear to have a common root:
Resultant[x - 1. + 10 ^ (-17), x - 1, x]Using higher precision shows they have no common root:
Resultant[x - 1`20 + 10 ^ (-17), x - 1, x]See Also
Subresultants Discriminant PolynomialGCD Eliminate
Function Repository: DixonResultant BezoutMatrix SylvesterMatrix
Tech Notes
Related Guides
Related Links
History
Introduced in 1988 (1.0) | Updated in 2022 (13.2) ▪ 2023 (13.3)
Text
Wolfram Research (1988), Resultant, Wolfram Language function, https://reference.wolfram.com/language/ref/Resultant.html (updated 2023).
CMS
Wolfram Language. 1988. "Resultant." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/Resultant.html.
APA
Wolfram Language. (1988). Resultant. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Resultant.html
BibTeX
@misc{reference.wolfram_2026_resultant, author="Wolfram Research", title="{Resultant}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/Resultant.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_resultant, organization={Wolfram Research}, title={Resultant}, year={2023}, url={https://reference.wolfram.com/language/ref/Resultant.html}, note=[Accessed: 13-June-2026]}