Polynomial Factoring Calculator

Factor a polynomial up to degree 4 into exact rational factors — greatest common monomial, rational root theorem, synthetic division and the discriminant — with every step shown.
Computed
The factored form and the full working are shown below.
Factored formexact

P(x) = x2−5x+6x^{2} - 5x + 6(x^2 - 5x + 6)

(x−2)(x−3)(x - 2)(x - 3)

Rational roots

x = 2 x = 3
Graph
x = 2x = 3123510 0
f(x) Rational roots

Step-by-step solution

  1. 1

    Identify the polynomial

    The coefficients describe the polynomial x^2 - 5x + 6 of degree 2.

    P(x)=x2−5x+6P(x) = x^{2} - 5x + 6
  2. 2

    Candidate rational roots

    By the rational root theorem, every rational root has the form p/q with p dividing 6 and q dividing 1.

    pq,p∣6,q∣1\frac{p}{q}, \quad p \mid 6, \quad q \mid 1
    • p ∣ 6: 1, 2, 3, 6
    • q ∣ 1: 1
    • ±p/q: ±1, ±2, ±3, ±6
  3. 3

    Root found

    Substituting x = 2 into x^2 - 5x + 6 gives 0, so 2 is a root.

    P(2)=0P\left(2\right) = 0
    • b₂ = 1
    • b₁ = 1·(2) + (−5) = −3
    • b₀ = −3·(2) + (6) = 0
  4. 4

    Synthetic division

    Divide by the linear factor of the root 2: synthetic division leaves the quotient x - 3.

    x2−5x+6=(x−2)⋅(x−3)x^{2} - 5x + 6 = \left(x - 2\right) \cdot \left(x - 3\right)
  5. 5

    Root found

    Substituting x = 3 into x - 3 gives 0, so 3 is a root.

    P(3)=0P\left(3\right) = 0
    • b₁ = 1
    • b₀ = 1·(3) + (−3) = 0
  6. 6

    Synthetic division

    Divide by the linear factor of the root 3: synthetic division leaves the quotient 1.

    x−3=(x−3)⋅1x - 3 = \left(x - 3\right) \cdot 1
  7. 7

    Factored form

    The complete factorization of the polynomial over the rational numbers.

    P(x)=(x−2)(x−3)P(x) = (x - 2)(x - 3)
  8. 8

    Verify by expansion

    Expanding the product gives x^2 - 5x + 6, exactly the original polynomial x^2 - 5x + 6.

    (x−2)(x−3)=x2−5x+6(x - 2)(x - 3) = x^{2} - 5x + 6
    • (x - 2) · (x - 3) = x^2 - 5x + 6

About polynomial factoring

Factoring rewrites a polynomial as a product of simpler polynomials. Over the rational numbers, every polynomial up to degree 4 splits into a scalar, powers of x, linear factors and irreducible quadratics — and the roots read straight off the factors: each factor (x − r) corresponds to the root r.

The calculator works exactly, with fractions instead of decimals. It first clears denominators and pulls out the greatest common monomial, then hunts for rational roots with the rational root theorem: every rational root p/q has p dividing the constant term and q dividing the leading coefficient. Each hit is divided out with synthetic division; a leftover quadratic is classified by its discriminant, and quartics also try the substitution u = x² and a Gauss-lemma quadratic-times-quadratic search.

Tips: a root found twice gives a squared factor (multiplicity 2); a negative discriminant means complex conjugate roots and an irreducible quadratic; and the last step always multiplies everything back out, so you can check the answer in one line.