factors a polynomial over the integers.


factors a polynomial modulo a prime p.


factors a polynomial allowing coefficients that are rational combinations of the algebraic numbers ai.

Details and Options

  • Factor applies only to the top algebraic level in an expression. You may have to use Map, or apply Factor again, to reach other levels.
  • Factor[poly,GaussianIntegers->True] factors allowing Gaussian integer coefficients.
  • If any coefficients in poly are complex numbers, factoring is done allowing Gaussian integer coefficients.
  • The exponents of variables need not be positive integers. Factor can deal with exponents that are linear combinations of symbolic expressions.
  • When given a rational expression, Factor effectively first calls Together, then factors numerator and denominator.
  • With the default setting Extension->None, Factor[poly] will treat algebraic number coefficients in poly like independent variables.
  • Factor[poly,Extension->Automatic] will extend the domain of coefficients to include any algebraic numbers that appear in poly. »
  • Factor automatically threads over lists, as well as equations, inequalities and logic functions.


open allclose all

Basic Examples  (2)

Factor polynomials:

Factor modulo 2:

Scope  (3)

A univariate polynomial:

A multivariate polynomial:

A rational function:

Generalizations & Extensions  (1)

Some non-polynomial expressions can be factored:

Options  (5)

Extension  (2)

Factor over algebraic number fields:

Extension->Automatic automatically extends to a field that covers the coefficients:

GaussianIntegers  (1)

Factor over Gaussian integers:

Modulus  (1)

Factor over finite fields:

Trig  (1)

Factor a trigonometric expression:

Properties & Relations  (3)

Expand is effectively the inverse of Factor:

FactorList gives a list of factors:

FactorSquareFree only pulls out multiple factors:

Neat Examples  (2)

The first factoring of where a 2 appears as a coefficient:

Introduced in 1988
Updated in 1996