PolynomialReduce[poly,{poly1,poly2,…},{x1,x2,…}]
yields a list representing a reduction of poly in terms of the polyi. The list has the form {{a1,a2,…},b}, where b is minimal and a1 poly1+a2 poly2+…+b is exactly poly.
PolynomialReduce
PolynomialReduce[poly,{poly1,poly2,…},{x1,x2,…}]
yields a list representing a reduction of poly in terms of the polyi. The list has the form {{a1,a2,…},b}, where b is minimal and a1 poly1+a2 poly2+…+b is exactly poly.
Details and Options
- The polynomial b has the property that none of its terms are divisible by leading terms of any of the polyi.
- If the polyi form a Gröbner basis with respect to the xi, then this property uniquely determines the remainder obtained from PolynomialReduce.
- The result of reducing a polynomial in general depends on the ordering assigned to monomials. This ordering is affected by the ordering of the xi.
- The following options can be given, as for GroebnerBasis:
-
MonomialOrder Lexicographic the criterion used for ordering monomials CoefficientDomain Rationals the types of objects assumed to be coefficients Modulus 0 the modulus for numerical coefficients - PolynomialReduction computes just the reduced polynomial b.
Examples
open all close allBasic Examples (1)
Reduce a polynomial f with respect to a list of polynomials p:
f = x ^ 3 + y ^ 3;
p = {x ^ 2 - y ^ 2 - 1, x + 2y - 7};{q, r} = PolynomialReduce[f, p, {x, y}]f is a linear combination of polynomials p and a remainder term r:
f == q.p + r//ExpandScope (1)
Reduce a polynomial modulo a list of polynomials that is not a Gröbner basis:
f = 2x ^ 3 + y ^ 3 + 3y;
polys = {x ^ 2 + y ^ 2 - 1, x y - 2};
gb = GroebnerBasis[polys, {x, y}]The remainder is not zero, even though f belongs to the ideal generated by polys:
PolynomialReduce[f, polys, {x, y}]When f belongs to the ideal generated by polys, the remainder modulo gb must be zero:
PolynomialReduce[f, gb, {x, y}]Options (4)
CoefficientDomain (1)
By default, PolynomialReduce works over the field of rational functions of parameters:
polys = {a x ^ 2 + 5 y - 1, 2 x + x y - y ^ 2};
poly = a ^ 2 x - x y + y ^ 2 - 3;Compute the Gröbner basis of polys over the field of rational functions
:
gb1 = GroebnerBasis[polys, {x, y}, CoefficientDomain -> RationalFunctions]Reduce poly modulo gb1 over the field of rational functions
:
PolynomialReduce[poly, gb1, {x, y}]Compute the Gröbner basis and reduce poly over the integers:
gb2 = GroebnerBasis[polys, {x, y}, CoefficientDomain -> Integers]PolynomialReduce[poly, gb2, {x, y}, CoefficientDomain -> Integers]Compute the Gröbner basis and reduce poly over the rationals:
gb3 = GroebnerBasis[polys, {x, y}, CoefficientDomain -> Rationals]PolynomialReduce[poly, gb3, {x, y}, CoefficientDomain -> Rationals]Compute the Gröbner basis and reduce poly using approximate arithmetic:
gb4 = GroebnerBasis[polys, {x, y}, CoefficientDomain -> InexactNumbers[20]]The precision used is chosen automatically, based on the precision of the Gröbner basis:
PolynomialReduce[poly, gb4, {x, y}, CoefficientDomain -> InexactNumbers]Modulus (1)
Compute a Gröbner basis and reduce a polynomial over the integers modulo 7:
polys = {3 x ^ 2 + y z - 5 x - 1, 2 x + 3 x y + y ^ 2, x - 3 y + x z - 2 z ^ 2};
poly = z ^ 9 - x ^ 2 y ^ 3 - 3 x y ^ 2 z + 11y z ^ 2 + x ^ 2 z ^ 2 - 5;
gb = GroebnerBasis[polys, {x, y, z}, Modulus -> 7];
PolynomialReduce[poly, gb, Modulus -> 7]MonomialOrder (1)
By default, PolynomialReduce uses the Lexicographic monomial order:
polys = {3 x ^ 2 + y - 5 x - 1, 2 x + 3 x y + y ^ 2};
poly = x y - 3 x y ^ 2 + 11y + x ^ 3;gb1 = GroebnerBasis[polys, {x, y}]PolynomialReduce[poly, gb1, {x, y}]Any MonomialOrder allowed by GroebnerBasis can be used:
gb2 = GroebnerBasis[polys, {x, y}, MonomialOrder -> DegreeReverseLexicographic]PolynomialReduce[poly, gb2, {x, y}, MonomialOrder -> DegreeReverseLexicographic]Tolerance (1)
Compute approximate quotients:
p = x ^ 14 + 3.00001 * x ^ 10 - 7.99998 * x ^ 7 - 25.00002 * x ^ 6 + 3.00001 * x ^ 13 + 9.00006 * x ^ 9 - 3.00001 * x ^ 5 - 2.00001 * x ^ 8 - 6.00005 * x ^ 4 + 16.00004 * x + 2.00001;d = -2.0001465223696937 + 3.0002401628321618 * x ^ 5 + 1. * x ^ 6;With the default zero tolerance, d does not divide p:
PolynomialReduce[p, {d}, x, CoefficientDomain -> InexactNumbers]Increase the tolerance to obtain an approximate quotient and a zero remainder:
PolynomialReduce[p, {d}, x, CoefficientDomain -> InexactNumbers, Tolerance -> 0.01]Applications (3)
Test whether polynomials belong to the ideal generated by a set of polynomials:
f = x ^ 6 - 14x ^ 3 - y ^ 4 + 49;
g = x ^ 5 - y ^ 5;
polys = {x ^ 2 - y ^ 3 - 5, y ^ 2 - x ^ 3 + 7};
gb = GroebnerBasis[polys, {x, y}]The remainder is zero, hence f belongs to the ideal generated by polys:
PolynomialReduce[f, gb, {x, y}][[2]]The remainder is not zero, hence g does not belong to the ideal generated by polys:
PolynomialReduce[g, gb, {x, y}][[2]]Replace variables in a polynomial using equations relating old and new variables:
poly = (x + y) ^ 2;
eqns = {a == x ^ 2 + y ^ 2, b == x y};
gb = GroebnerBasis[eqns, {x, y}]The remainder gives a representation of poly in terms of a and b:
{qs, r} = PolynomialReduce[(x + y) ^ 2, gb, {x, y}]This proves correctness of the representation:
poly == r /. ToRules[And@@eqns]//ExpandCompute the representation of a polynomial in an algebra
:
{p1, p2} = {x ^ 2 + y ^ 2, x y};Introduce tag variables and order them last in the monomial ordering:
gb = GroebnerBasis[{f1 - p1, f2 - p2}, {x, y}]Since the remainder is in
, this shows that
:
Last[PolynomialReduce[(x + y) ^ 4, gb, {x, y}]]% /. {f1 -> p1, f2 -> p2}//FactorProperties & Relations (4)
Reduce a polynomial with respect to a list of polynomials:
f = x ^ 2 - 2x y ^ 2 + y ^ 3 + 7;
polys = {x ^ 2 - y ^ 2 - 3, x y - 5};
{qs, r} = PolynomialReduce[f, polys, {x, y}]f is equal to the linear combination of polys with coefficients qs plus the remainder r:
f == qs.polys + r//ExpandUse PolynomialReduction to compute just the reduced polynomial r:
PolynomialReduction[f, polys, {x, y}]A polynomial belongs to the ideal generated by a Gröbner basis iff it reduces to zero:
{p1, p2} = {x ^ 2 + y ^ 2 + z ^ 2 - 1, x - 2y ^ 3 - 3};{g1, g2} = GroebnerBasis[{p1, p2}, {x, y, z}]This shows that p1 is in the ideal {g1,g2}:
PolynomialReduce[p1, {g1, g2}, {x, y, z}]Univariate PolynomialReduce is equivalent to PolynomialQuotientRemainder:
PolynomialReduce[x ^ 5 - 3x + 7, {2x ^ 3 - 5x + 11}, x]PolynomialQuotientRemainder[x ^ 5 - 3x + 7, 2x ^ 3 - 5x + 11, x]Reduce a noncommutative polynomial with respect to a list of noncommutative polynomials:
p = x**x**y**x**y + 2 y**x**y**x + 3 x**y;
qq = {2 x**y**x + 3 x**x + 4 y + 5, 3 y**x**x + 4 y**x - 5 x + 6};{fs, r} = NonCommutativePolynomialReduce[p, qq, {x, y}]p is a linear combination of polynomials qq and the remainder polynomial r:
NonCommutativeExpand[p - Plus@@MapThread[Construct, {fs, qq}] - r]Possible Issues (1)
PolynomialReduce can give different results for the same inputs but with variables ordered differently:
polys = {x ^ 2 - y ^ 3 - 5, y ^ 3 - x ^ 3 + 7};
newpoly = x ^ 5 + (x + y) ^ 2;
PolynomialReduce[newpoly, polys, {x, y}]Now change the ordering of the variables:
PolynomialReduce[newpoly, polys, {y, x}]Tech Notes
Related Guides
Related Links
History
Introduced in 1996 (3.0)
Text
Wolfram Research (1996), PolynomialReduce, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialReduce.html.
CMS
Wolfram Language. 1996. "PolynomialReduce." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PolynomialReduce.html.
APA
Wolfram Language. (1996). PolynomialReduce. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolynomialReduce.html
BibTeX
@misc{reference.wolfram_2026_polynomialreduce, author="Wolfram Research", title="{PolynomialReduce}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/PolynomialReduce.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_polynomialreduce, organization={Wolfram Research}, title={PolynomialReduce}, year={1996}, url={https://reference.wolfram.com/language/ref/PolynomialReduce.html}, note=[Accessed: 13-June-2026]}