WOLFRAM

CoefficientRules[poly,{x1,x2,}]

gives the list {{e11,e12,}c1,{e21,}c2,} of exponent vectors and coefficients for the monomials in poly with respect to the xi.

CoefficientRules[poly,{x1,x2,},order]

gives the result with the monomial ordering specified by order.

Details and Options

Examples

open allclose all

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

Get exponents and coefficients of monomials:

Out[1]=1

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

Use "DegreeReverseLexicographic" monomial ordering:

Out[1]=1

Specify the same ordering using weight matrix:

Out[2]=2

Options  (1)Common values & functionality for each option

Modulus  (1)

Reduce the coefficients modulo 2:

Out[1]=1

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

FromCoefficientRules reconstructs the original polynomial:

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

MonomialList gives a different representation:

Out[3]=3

For two variables "DegreeLexicographic" and "DegreeReverseLexicographic" coincide:

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

Possible Issues  (1)Common pitfalls and unexpected behavior

The list given by Variables[poly] is not always sorted:

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

Neat Examples  (2)Surprising or curious use cases

Visualize monomial orderings in 2D:

The standard built-in orderings:

In 2D some orderings cannot be distinguished:

Out[3]=3

Visualize monomial orderings in 3D:

In 3D all orderings are distinct:

Out[3]=3
Wolfram Research (2008), CoefficientRules, Wolfram Language function, https://reference.wolfram.com/language/ref/CoefficientRules.html.
Wolfram Research (2008), CoefficientRules, Wolfram Language function, https://reference.wolfram.com/language/ref/CoefficientRules.html.

Text

Wolfram Research (2008), CoefficientRules, Wolfram Language function, https://reference.wolfram.com/language/ref/CoefficientRules.html.

Wolfram Research (2008), CoefficientRules, Wolfram Language function, https://reference.wolfram.com/language/ref/CoefficientRules.html.

CMS

Wolfram Language. 2008. "CoefficientRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CoefficientRules.html.

Wolfram Language. 2008. "CoefficientRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CoefficientRules.html.

APA

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

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

BibTeX

@misc{reference.wolfram_2025_coefficientrules, author="Wolfram Research", title="{CoefficientRules}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/CoefficientRules.html}", note=[Accessed: 15-March-2025 ]}

@misc{reference.wolfram_2025_coefficientrules, author="Wolfram Research", title="{CoefficientRules}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/CoefficientRules.html}", note=[Accessed: 15-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_coefficientrules, organization={Wolfram Research}, title={CoefficientRules}, year={2008}, url={https://reference.wolfram.com/language/ref/CoefficientRules.html}, note=[Accessed: 15-March-2025 ]}

@online{reference.wolfram_2025_coefficientrules, organization={Wolfram Research}, title={CoefficientRules}, year={2008}, url={https://reference.wolfram.com/language/ref/CoefficientRules.html}, note=[Accessed: 15-March-2025 ]}