WOLFRAM

gives the remainder from dividing p by q, treated as polynomials in x.

Details and Options

  • The degree of the result in x is guaranteed to be smaller than the degree of q.
  • Unlike PolynomialMod, PolynomialRemainder performs divisions in generating its results.
  • With the option Modulus->n, the remainder is computed modulo n.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Find the remainder after dividing one polynomial by another:

Out[1]=1

The difference of the dividend and the remainder is a polynomial multiple of the divisor:

Out[2]=2

If the dividend is a multiple of the divisor, then the remainder is zero:

Out[1]=1

Find the remainder of division for polynomials with symbolic coefficients:

Out[1]=1

Coefficients of the quotient are rational functions of the input coefficients:

Out[2]=2

Scope  (4)Survey of the scope of standard use cases

The resulting polynomial will have coefficients that are rational expressions of input coefficients:

Out[1]=1
Out[2]=2
Out[3]=3

Polynomial remainder over the integers modulo :

Out[1]=1

Polynomial remainder over a finite field:

Out[2]=2

PolynomialRemainder also works for rational functions:

Out[1]=1

The quotient and remainder of division of by are and , where :

Out[2]=2

and are uniquely determined by the condition that the degree of is less than the degree of :

Out[3]=3

Options  (1)Common values & functionality for each option

Modulus  (1)

Use a prime modulus:

Out[1]=1
Out[2]=2

Applications  (1)Sample problems that can be solved with this function

Euclid's algorithm for the greatest common divisor:

Out[4]=4

Divide by the leading coefficient:

Out[5]=5
Out[6]=6

Properties & Relations  (3)Properties of the function, and connections to other functions

For a polynomial , , where is given by PolynomialQuotient:

Out[2]=2
Out[3]=3

Use Expand to verify identity:

Out[4]=4

To get both quotient and remainder use PolynomialQuotientRemainder:

Out[5]=5

PolynomialReduce generalizes PolynomialRemainder for multivariate polynomials:

Out[1]=1
Out[1]=1
Out[2]=2

Possible Issues  (1)Common pitfalls and unexpected behavior

The variable assumed for the polynomials matters:

Out[1]=1
Wolfram Research (1988), PolynomialRemainder, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialRemainder.html (updated 2023).
Wolfram Research (1988), PolynomialRemainder, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialRemainder.html (updated 2023).

Text

Wolfram Research (1988), PolynomialRemainder, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialRemainder.html (updated 2023).

Wolfram Research (1988), PolynomialRemainder, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialRemainder.html (updated 2023).

CMS

Wolfram Language. 1988. "PolynomialRemainder." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/PolynomialRemainder.html.

Wolfram Language. 1988. "PolynomialRemainder." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/PolynomialRemainder.html.

APA

Wolfram Language. (1988). PolynomialRemainder. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolynomialRemainder.html

Wolfram Language. (1988). PolynomialRemainder. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolynomialRemainder.html

BibTeX

@misc{reference.wolfram_2025_polynomialremainder, author="Wolfram Research", title="{PolynomialRemainder}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/PolynomialRemainder.html}", note=[Accessed: 16-April-2025 ]}

@misc{reference.wolfram_2025_polynomialremainder, author="Wolfram Research", title="{PolynomialRemainder}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/PolynomialRemainder.html}", note=[Accessed: 16-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_polynomialremainder, organization={Wolfram Research}, title={PolynomialRemainder}, year={2023}, url={https://reference.wolfram.com/language/ref/PolynomialRemainder.html}, note=[Accessed: 16-April-2025 ]}

@online{reference.wolfram_2025_polynomialremainder, organization={Wolfram Research}, title={PolynomialRemainder}, year={2023}, url={https://reference.wolfram.com/language/ref/PolynomialRemainder.html}, note=[Accessed: 16-April-2025 ]}