Factor

Factor[poly]

factors a polynomial over the integers.

Factor[poly,Modulusp]

factors a polynomial modulo the prime p.

Factor[poly,Extension{a1,a2,}]

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.

Examples

open allclose all

Basic Examples  (3)

Factor univariate polynomials:

Factor multivariate polynomials:

Factor polynomials over the integers modulo 2:

Scope  (13)

Basic Uses  (6)

A univariate polynomial:

A multivariate polynomial:

A rational function:

A non-polynomial expression:

Factor threads over lists:

Factor threads over equations and inequalities:

Advanced Uses  (7)

Factor a polynomial over the Gaussian integers:

Factor a polynomial over an algebraic extension:

Factor a polynomial over the integers modulo 3:

Factor polynomials over a finite field:

Factor a polynomial over an extension of a finite field:

A polynomial irreducible over factors after embedding in a larger field :

Some non-polynomial expressions can be factored:

Factor a polynomial of degree :

Options  (7)

Extension  (4)

Factor over algebraic number fields:

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

Factor a polynomial with integer coefficients over a finite field:

Factor a polynomial with coefficients in a finite field:

Embedding in a larger field allows further factorization:

GaussianIntegers  (1)

Factor over Gaussian integers:

Modulus  (1)

Factor over finite fields:

Trig  (1)

Factor a trigonometric expression:

Applications  (3)

When modeling behavior with polynomials, it is important to determine when the polynomial evaluates to zero. For example, suppose the cost to produce a video game system is modeled by the following expression:

Also suppose the revenue can be modeled by the equation:

If we wish to know the number of units we must sell before making a profit, we calculate the difference:

Then we solve to find where the profit function is zero using Factor:

This reveals to us there is a zero for profit at :

Find a number which is equal to its square:

Subtract from both sides of the equation:

Use Factor to find when a polynomial is zero:

The only numbers that are equal to their square are thus and :

Compute the greatest common divisor of two polynomials:

We can see they share a common factor of . Confirm this result using PolynomialGCD:

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:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_factor, author="Wolfram Research", title="{Factor}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/Factor.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_factor, organization={Wolfram Research}, title={Factor}, year={2023}, url={https://reference.wolfram.com/language/ref/Factor.html}, note=[Accessed: 21-November-2024 ]}