CoefficientList

CoefficientList[poly,var]

gives a list of coefficients of powers of var in poly, starting with power 0.

CoefficientList[poly,{var1,var2,}]

gives an array of coefficients of the vari.

CoefficientList[poly,{var1,var2,},{dim1,dim2,}]

gives an array of dimensions {dim1,dim2,}, truncating or padding with zeros as needed.

Details and Options

  • The dimensions of the array returned by CoefficientList are determined by the values of the Exponent[poly,vari].
  • Terms that do not contain positive integer powers of a particular variable are included in the first element of the list for that variable.
  • CoefficientList always returns a full rectangular array. Combinations of powers that do not appear in poly give zeros in the array.
  • CoefficientList[0,var] gives {}.
  • CoefficientList works whether or not poly is explicitly given in expanded form.

Examples

open allclose all

Basic Examples  (3)

Find the coefficients in a polynomial:

CoefficientList works even when the polynomial has not been expanded out:

Matrix of coefficients for a quadratic function:

Scope  (2)

Univariate polynomial coefficient lists:

Multivariate polynomial coefficient lists:

Options  (1)

Modulus  (1)

Coefficient list over the integers modulo 2:

Properties & Relations  (4)

Use Coefficient to get a coefficient at a specified power of the variable:

The list of coefficients can be obtained using Coefficient and Exponent:

FromDigits can reconstruct a univariate polynomial from the list of its coefficients:

Fold the operation for multivariate polynomials:

Polynomial multiplication is convolution as performed by ListConvolve:

For multivariate polynomials, CoefficientList gives a tensor of the coefficients:

CoefficientArrays gives the list of arrays of polynomial coefficients ordered by total degrees:

The coefficient of :

In cl, the coefficient of x^a y^b is the element at position {a+1,b+1}:

In ca, the position of this coefficient is a+b+1 followed by a 1s and b 2s (1 and 2 indicate the first and second variables):

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_coefficientlist, author="Wolfram Research", title="{CoefficientList}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/CoefficientList.html}", note=[Accessed: 19-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_coefficientlist, organization={Wolfram Research}, title={CoefficientList}, year={2015}, url={https://reference.wolfram.com/language/ref/CoefficientList.html}, note=[Accessed: 19-December-2024 ]}