Skip to content

Factoring Trinomials Calculator (ac Method)

Factor ax² + bx + c over the integers with the GCF and the ac method, step by step, or prove it is prime.

Your details

Results update as you type

Factored form

(3x + 2)(2x + 1)

Discriminant b² − 4ac
1
Nature of the roots
Two rational roots
Roots (exact)
x₁ = −2/3, x₂ = −1/2

Step-by-step solution
  1. Expression: 6x² + 7x + 2
  2. The coefficients have no common factor other than 1.
  3. Multiply a × c: 6 × 2 = 12
  4. Find two integers whose product is a·c and whose sum is b: 3 × 4 = 12, 3 + 4 = 7
  5. Split the middle term: 6x² + 3x + 4x + 2
  6. Factor each group: 3x(2x + 1) + 2(2x + 1)
  7. Take out the common binomial: (3x + 2)(2x + 1)
  8. Discriminant: Δ = 7² − 4 × 6 × 2 = 1
  9. Δ is a perfect square, so the roots are rational — consistent with the factorisation.
  10. Roots (set the expression equal to 0): x₁ = −2/3, x₂ = −1/2

Factoring a trinomial means rewriting ax2+bx+cax^2 + bx + c as a product of simpler factors, such as 6x2+7x+2=(3x+2)(2x+1)6x^2 + 7x + 2 = (3x + 2)(2x + 1). This factoring trinomials calculator does it the way algebra courses teach it: it first takes out the greatest common factor, then applies the ac method — find two integers whose product is a⋅ca \cdot c and whose sum is bb, split the middle term and factor by grouping — and shows every line of the work.

It is honest about the cases where factoring is impossible. When no pair of integers works, the trinomial is prime over the integers, and the calculator says so instead of inventing decimal factors. It then uses the discriminant to tell you why: irrational roots such as 1±21 \pm \sqrt{2}, or complex roots when the discriminant is negative. It also recognises perfect square trinomials and differences of squares, and it copes with a=0a = 0 (a linear expression) or c=0c = 0 (where xx itself is a common factor).

Enter integer coefficients only. If your trinomial has fractions, multiply every term by the common denominator first; for decimal coefficients or to solve the equation, use the quadratic formula calculator.

How to use this calculator

  1. Write the trinomial in standard form ax2+bx+cax^2 + bx + c, highest power first. A missing term has coefficient 0.
  2. Enter the integers a, b and c, including their signs.
  3. Read the factored form. If it says "prime over the integers", no factorisation with integer coefficients exists.
  4. Open the steps to see the GCF, the product a⋅ca \cdot c, the pair of integers, the split middle term and the grouping.
  5. Check the discriminant and roots: each factor (px+q)(px + q) gives the root x=−q/px = -q/p.

The formula

ac method. For a primitive trinomial ax2+bx+cax^2 + bx + c (common factor already removed), look for integers mm and nn with

m⋅n=a⋅candm+n=bm \cdot n = a \cdot c \qquad\text{and}\qquad m + n = b

Then split the middle term and factor by grouping:

ax2+bx+c=ax2+mx+nx+c=(g1x+g2)(rx+s)ax^2 + bx + c = ax^2 + mx + nx + c = (g_1 x + g_2)(rx + s)

where g1=gcd⁡(a,m)g_1 = \gcd(a, m) and (rx+s)(rx + s) is the binomial left in both groups.

When does it work? A trinomial with integer coefficients factors over the integers exactly when its discriminant Δ=b2−4ac\Delta = b^2 - 4ac is a perfect square (0, 1, 4, 9, 16…). If Δ\Delta is positive but not a perfect square, the roots are irrational; if Δ<0\Delta < 0, they are complex.

Special patterns: a2x2+2abx+b2=(ax+b)2a^2x^2 + 2abx + b^2 = (ax + b)^2 (perfect square) and a2x2−b2=(ax−b)(ax+b)a^2x^2 - b^2 = (ax - b)(ax + b) (difference of squares).

Worked example

ac method. Factor 6x2+7x+26x^2 + 7x + 2. Here a⋅c=12a \cdot c = 12; the pair with product 12 and sum 7 is 3 and 4. Split: 6x2+3x+4x+2=3x(2x+1)+2(2x+1)6x^2 + 3x + 4x + 2 = 3x(2x + 1) + 2(2x + 1), so the answer is (3x+2)(2x+1)(3x + 2)(2x + 1).

With a common factor. 2x2+4x−62x^2 + 4x - 6: take out 2 to get 2(x2+2x−3)2(x^2 + 2x - 3); the pair −1 and 3 gives 2(x+3)(x−1)2(x + 3)(x - 1).

Perfect square. 4x2−12x+94x^2 - 12x + 9: a⋅c=36a \cdot c = 36, pair −6 and −6, so it is (2x−3)2(2x - 3)^2 and the discriminant is 0.

Prime trinomials. x2−2x−1x^2 - 2x - 1 has Δ=8\Delta = 8, not a perfect square: it is prime over the integers and its roots are x=1±2x = 1 \pm \sqrt{2} ≈ -0.414 and 2.414. And x2+x+1x^2 + x + 1 has Δ=−3\Delta = -3: complex roots x=(−1±i3)/2x = (-1 \pm i\sqrt{3})/2.

Choosing a method

Situation Fastest method
a=1a = 1: x2+bx+cx^2 + bx + c Find two numbers with product cc and sum bb: (x+m)(x+n)(x + m)(x + n)
a≠1a \neq 1 ac method and grouping, or trial and error with the factors of aa and cc
First and last terms are squares Check for a perfect square (px±q)2(px \pm q)^2
No xx term, c<0c < 0 Difference of squares
Discriminant not a perfect square Not factorable over the integers: use the quadratic formula

Always look for a greatest common factor first: it makes the numbers smaller and the remaining trinomial easier to factor. To find the GCF of large coefficients, the GCD calculator helps.

Frequently asked questions

What does "prime over the integers" mean?

It means the trinomial cannot be written as a product of two binomials with integer coefficients. It may still factor over the real numbers with square roots, for example x² − 2 = (x − √2)(x + √2), or only over the complex numbers.

How do I know quickly whether a trinomial factors?

Compute the discriminant b² − 4ac (after removing any common factor). If it is a perfect square such as 0, 1, 4, 9 or 25, the trinomial factors over the integers; otherwise it is prime.

Why take out the greatest common factor first?

It keeps the numbers small and is required for a complete factorisation. For 2x² + 4x − 6, stopping at (2x + 6)(x − 1) is not fully factored, because 2x + 6 still contains the factor 2.

What if the leading coefficient is negative?

Factor out −1 (or the negative GCF) first, so the trinomial left inside starts with a positive x² term. The calculator does this automatically and shows the minus sign in front of the factored form.

Can I factor trinomials with fractions or decimals?

Multiply every term by the least common denominator to get integer coefficients, factor, then divide the constant back out. For decimal coefficients that are not exact fractions, use the quadratic formula to find the roots instead.

Sources

Last updated:

More Math calculators

People also use