# Factor a polynomial (factor)

Factor a polynomial into irreducible factors.

With this function, the solver shows the steps whenever it finds them.

## How to write it

### factor(expr)

**expr**

Any expression: a number, a formula, a list or a matrix. Takes a polynomial.

## Examples

- $\displaystyle x^{2}-1 = (x-1) (x+1)$

  `factor(x^2 - 1)`

  In the solver, `factor(x^2 - 1)` gives `(x - 1)(x + 1)`.

  [Open in the solver](https://hilberon.com/?q=factor%28x%5E2%20-%201%29)
- $\displaystyle x^{3}-6 x^{2}+11 x-6 = (x-1) (x-2) (x-3)$

  `factor(x^3 - 6x^2 + 11x - 6)`

  In the solver, `factor(x^3 - 6x^2 + 11x - 6)` gives `(x - 1)(x - 2)(x - 3)`.

  [Open in the solver](https://hilberon.com/?q=factor%28x%5E3%20-%206x%5E2%20%2B%2011x%20-%206%29)

## Related functions

- [full_simplify](https://hilberon.com/library/full_simplify)

  Search harder than simplify for a simpler form, under assumptions.
- [expand](https://hilberon.com/library/expand)

  Multiply out products and powers into a sum.
- [function_expand](https://hilberon.com/library/function_expand)

  Rewrite special functions of shifted arguments in terms of simpler ones.
- [discriminant](https://hilberon.com/library/discriminant)

  Discriminant of a polynomial in a variable.
- [groebner_basis](https://hilberon.com/library/groebner_basis)

  Groebner basis of a list of polynomials.
- [denominator](https://hilberon.com/library/denominator)

  Denominator of a fraction.

---
Source: https://hilberon.com/library/factor
