This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Algebraic Computation / Polynomial Functions  /
CoefficientList

  • CoefficientList[ poly , var ] gives a list of coefficients of powers of var in poly, starting with power 0.
  • CoefficientList[ poly , , , ... ] gives an array of coefficients of the .
  • Example: CoefficientList[x^2 + 2 x y - y, x, y ].
  • The dimensions of the array returned by CoefficientList are determined by the values of the Exponent[ poly , ].
  • 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 works whether or not poly is explicitly given in expanded form.
  • See the Mathematica book: Section 3.3.2.
  • See also: Series, SeriesCoefficient, Collect, FactorList.

    Further Examples

    This gives the coefficients in the polynomial first in the variable x.

    In[1]:=

    Out[1]=

    On the other hand this gives the coefficients in the polynomial first in the variable y.

    In[2]:=

    Out[2]=

    We can also get the list of coefficients over the integers modulo 3 and 4.

    In[3]:=

    Out[3]=

    CoefficientList can handle powers of variables in the second argument as long as the first argument is a polynomial in those powers.

    In[4]:=

    Out[4]=

    The coefficients of a polynomial in two variables are given as an array.

    In[5]:=

    Out[5]=

    Here are the coefficients of some polynomials in three variables.

    In[6]:=

    Out[6]//MatrixForm=