How to | Factor a Polynomial

The Wolfram Language includes functionality to factor polynomials symbolically.

If you are concerned with factoring a polynomial, Factor is the appropriate command:

In[1]:=
Click for copyable input
Out[1]=

If you would like to specify an extension in which to factor, say one with , use the Extension option:

In[2]:=
Click for copyable input
Out[2]=

If you would like to specify a modulus for the factorization, like 3, use the Modulus option:

In[3]:=
Click for copyable input
Out[3]=

For a polynomial of multiple variables, Factor will still try to decompose it:

In[4]:=
Click for copyable input
Out[4]=

Sometimes, it is more important to find whether the polynomial is irreducible than to try to find its factors explicitly. You can find out with IrreduciblePolynomialQ; for example, this checks if is irreducible:

In[5]:=
Click for copyable input
Out[5]=

To get the largest factor of a collection of polynomials, say , use the PolynomialGCD command:

In[6]:=
Click for copyable input
Out[6]=
    

A univariate polynomial can always be factored into linear factors by finding all of its roots:

In[1]:=
Click for copyable input
Out[1]=