FactorList[poly]
gives a list of the factors of a polynomial, together with their exponents.
FactorList
FactorList[poly]
gives a list of the factors of a polynomial, together with their exponents.
Details and Options
- The first element of the list is always the overall numerical factor. It is {1,1} if there is no overall numerical factor.
- FactorList takes the following options:
-
Extension None coefficient field to be used GaussianIntegers False whether to allow Gaussian integer coefficients Modulus 0 modulus to assume for integers Trig False whether to do trigonometric as well as algebraic transformations - FactorList[poly,Modulus->p] requires that p be prime.
- FactorList[poly,Extension->{a1,a2,…}] allows coefficients that are arbitrary rational combinations of the ai.
Examples
open all close allBasic Examples (2)
List the irreducible factors of polynomials:
FactorList[x ^ 2 - 1]FactorList[2x ^ 3 + 2x ^ 2 - 2x - 2]List the irreducible factors of multivariate polynomials:
FactorList[x ^ 3 + 2x ^ 2y + x y ^ 2 + x ^ 2z - y ^ 2z - x z ^ 2 - 2y z ^ 2 - z ^ 3]Scope (11)
Basic Uses (4)
FactorList[x ^ 3 - 6x ^ 2 + 11x - 6]FactorList[2x ^ 3 y - 2a ^ 2x y - 3a ^ 2x ^ 2 + 3a ^ 4]A polynomial with multiple factors:
FactorList[x ^ 8 + 11x ^ 7 + 43x ^ 6 + 59x ^ 5 - 35x ^ 4 - 151x ^ 3 - 63x ^ 2 + 81x + 54]FactorList[(x ^ 3 + 2x ^ 2) / (x ^ 2 - 4y ^ 2) - (x + 2) / (x ^ 2 - 4y ^ 2)]Advanced Uses (7)
The irreducible factors over the Gaussian integers:
FactorList[x ^ 2 + 1, GaussianIntegers -> True]The irreducible factors over an algebraic extension:
FactorList[x ^ 4 - 2, Extension -> Sqrt[2]]The irreducible factors over the integers modulo 2:
FactorList[x ^ 4 + 1, Modulus -> 2]The irreducible factors over a finite field:
ℱ = FiniteField[17, 3];FactorList[ℱ[3]x ^ 2 + ℱ[1771]]FactorList[x ^ 3 + 5x + 19, Extension -> ℱ]The irreducible factors over an extension of a finite field:
ℱ = FiniteField[29, 3];
𝒢 = FiniteField[29, 6];
ℰ = FiniteFieldEmbedding[ℱ, 𝒢];A polynomial irreducible over
factors after embedding
in a larger field
:
FactorList[ℱ[12]x ^ 2 + ℱ[34]x + ℱ[56]]FactorList[ℱ[12]x ^ 2 + ℱ[34]x + ℱ[56], Extension -> ℰ]List factors of non-polynomial expressions:
FactorList[E ^ (2 x) - 2E ^ x + 1]FactorList[x ^ 2 - Sqrt[x]]List factors of a polynomial of degree
:
rpoly[n_] := RandomInteger[{-2 ^ 10, 2 ^ 10}, {n + 1}].x ^ Range[0, n]
SeedRandom[1234];
p = rpoly[1000]; q = rpoly[1000];
r = Expand[p q];(facs = FactorList[r]);//AbsoluteTiming{Exponent[#[[1]], x], #[[2]]}& /@ facsOptions (7)
Extension (4)
Factor over algebraic number fields:
FactorList[1 + x ^ 4, Extension -> Sqrt[2]]FactorList[1 + x ^ 4, Extension -> {Sqrt[2], I}]Extension->Automatic automatically extends to a field that covers the coefficients:
FactorList[2 + 2Sqrt[2]x + x ^ 2]FactorList[2 + 2Sqrt[2]x + x ^ 2, Extension -> Automatic]Factor a polynomial with integer coefficients over a finite field:
ℱ = FiniteField[73, 3];FactorList[x ^ 3 + 21x + 3, Extension -> ℱ]Factor a polynomial with coefficients in a finite field:
ℱ = FiniteField[7, 2];FactorList[ℱ[1]x ^ 4 + ℱ[234]x + ℱ[567]]Embedding
in a larger field
allows further factorization:
𝒢 = FiniteField[7, 4];
ℰ = FiniteFieldEmbedding[ℱ, 𝒢];FactorList[ℱ[1]x ^ 4 + ℱ[234]x + ℱ[567], Extension -> ℰ]GaussianIntegers (1)
Modulus (1)
Applications (2)
FactorList can be useful in determining the behavior of functions:
f = x ^ 3 - x ^ 2 - 16x - 20;FactorList[f]
has roots at
and
, at
it does not cross the
axis, and at
it crosses the
axis:
Plot[-20 - 16 x - x^2 + x^3, {x, -4, 6}]Show that a polynomial is a perfect square:
f = 62500 - 112500 x + 15625 x^2 + 47500 x^3 - 3500 x^4 - 9380 x^5 - 1106 x^6 + 628 x^7 + 208 x^8 + 24 x^9 + x^10;Compute the factors and note that the constant factor is positive:
fac = FactorList[f]Extract the exponents of nonconstant factors:
exp = Transpose[Rest[fac]][[2]]Check that every factor has even exponent and thus
is a square:
AllTrue[exp, EvenQ]Properties & Relations (3)
FactorList gives a list of irreducible factors:
FactorList[x ^ 8 + 11x ^ 7 + 43x ^ 6 + 59x ^ 5 - 35x ^ 4 - 151x ^ 3 - 63x ^ 2 + 81x + 54]This multiplies the factors together:
Times@@Power@@@%Factor gives a product of factors:
Factor[x ^ 8 + 11x ^ 7 + 43x ^ 6 + 59x ^ 5 - 35x ^ 4 - 151x ^ 3 - 63x ^ 2 + 81x + 54]Expand combines all the factors back together:
Expand[%]FactorSquareFreeList gives a list of square-free factors:
FactorSquareFreeList[x ^ 8 + 11x ^ 7 + 43x ^ 6 + 59x ^ 5 - 35x ^ 4 - 151x ^ 3 - 63x ^ 2 + 81x + 54]FactorInteger gives a list of prime factors of an integer:
FactorInteger[1234567]Times@@Power@@@%Tech Notes
Related Guides
History
Introduced in 1988 (1.0) | Updated in 1996 (3.0) ▪ 2022 (13.2) ▪ 2023 (13.3)
Text
Wolfram Research (1988), FactorList, Wolfram Language function, https://reference.wolfram.com/language/ref/FactorList.html (updated 2023).
CMS
Wolfram Language. 1988. "FactorList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/FactorList.html.
APA
Wolfram Language. (1988). FactorList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FactorList.html
BibTeX
@misc{reference.wolfram_2026_factorlist, author="Wolfram Research", title="{FactorList}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/FactorList.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_factorlist, organization={Wolfram Research}, title={FactorList}, year={2023}, url={https://reference.wolfram.com/language/ref/FactorList.html}, note=[Accessed: 13-June-2026]}