PolynomialMod[poly,m]
gives the polynomial poly reduced modulo m.
PolynomialMod[poly,{m1,m2,…}]
reduces modulo all of the mi.
PolynomialMod
PolynomialMod[poly,m]
gives the polynomial poly reduced modulo m.
PolynomialMod[poly,{m1,m2,…}]
reduces modulo all of the mi.
Details and Options
- PolynomialMod[poly,m] for integer m gives a polynomial in which all coefficients are reduced modulo m.
- When m is a polynomial, PolynomialMod[poly,m] reduces poly by subtracting polynomial multiples of m, to give a result with minimal degree and leading coefficient.
- PolynomialMod gives results according to a definite convention; other conventions could yield results differing by multiples of m.
- Unlike PolynomialRemainder, PolynomialMod never performs divisions in generating its results.
- PolynomialMod takes the following options:
-
CoefficientDomain 
the type of objects assumed to be coefficients Modulus 0 modulus to assume for integers Trig False whether to do trigonometric as well as algebraic transformations
Examples
open all close allBasic Examples (2)
Scope (6)
Reduce a polynomial modulo an integer:
PolynomialMod[3x ^ 3 + 21x ^ 2 - 7x + 55, 9]Reduce a multivariate polynomial modulo an integer:
PolynomialMod[35x ^ 3 + 21x ^ 2y ^ 2 - 17x y ^ 3 + 55z - 123, 19]Reduce a polynomial modulo a polynomial:
PolynomialMod[3x ^ 3 + 21x ^ 2 - 7x + 55, 2x ^ 2 - 7]The difference of the original polynomial and the result is divisible by the modulus:
Cancel[(3x ^ 3 + 21x ^ 2 - 7x + 55 - %) / (2x ^ 2 - 7)]Reduce a polynomial modulo a polynomial with complex coefficients:
PolynomialMod[3x ^ 3 + 21x ^ 2 - 7x + 55, x ^ 2 + I]Reduce a polynomial modulo a polynomial and an integer:
PolynomialMod[3x ^ 3 + 21x ^ 2 - 7x + 55, {2x ^ 2 - 7, 9}]Reduce a polynomial modulo two polynomials and an integer:
PolynomialMod[3x ^ 3 + 21x ^ 2y ^ 2 - 7x y ^ 3 + 55, {2x ^ 2 - 7, x y - 3, 9}]Options (3)
CoefficientDomain (2)
With the default CoefficientDomain->Rationals, integer coefficients can be inverted:
PolynomialMod[x ^ 2, 2x - 1]With CoefficientDomain->Integers, PolynomialMod does not invert integer coefficients:
PolynomialMod[x ^ 2, 2x - 1, CoefficientDomain -> Integers]Applications (1)
Properties & Relations (5)
For univariate rational polynomials, PolynomialRemainder is the same as PolynomialMod:
PolynomialMod[2x ^ 3 + 3x ^ 2 + 4x + 5, 6x ^ 2 - 7]PolynomialRemainder[2x ^ 3 + 3x ^ 2 + 4x + 5, 6x ^ 2 - 7, x]PolynomialRemainder considers all polynomials to be univariate in the specified variable:
PolynomialRemainder[x ^ 2, x + a, x]For multivariate polynomials, PolynomialMod picks its own variable order:
PolynomialMod[x ^ 2, x + a]PolynomialMod[a ^ 2, x + a]PolynomialRemainder considers parameters to be invertible:
PolynomialRemainder[x ^ 2 + a ^ 2, a x - 1, x]PolynomialMod does not invert symbolic expressions:
PolynomialMod[x ^ 2 + a ^ 2, a x - 1]Tech Notes
Related Guides
Related Links
History
Introduced in 1991 (2.0) | Updated in 2003 (5.0)
Text
Wolfram Research (1991), PolynomialMod, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialMod.html (updated 2003).
CMS
Wolfram Language. 1991. "PolynomialMod." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003. https://reference.wolfram.com/language/ref/PolynomialMod.html.
APA
Wolfram Language. (1991). PolynomialMod. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolynomialMod.html
BibTeX
@misc{reference.wolfram_2026_polynomialmod, author="Wolfram Research", title="{PolynomialMod}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/PolynomialMod.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_polynomialmod, organization={Wolfram Research}, title={PolynomialMod}, year={2003}, url={https://reference.wolfram.com/language/ref/PolynomialMod.html}, note=[Accessed: 13-June-2026]}