What factoring a trinomial actually means
Factoring rewrites a sum as a product. The trinomial 2x² + 7x + 3 and the product (2x + 1)(x + 3) are the same expression written two ways, and you can verify that by multiplying the brackets back out. Nothing has been solved and no value of x has been found; only the shape has changed.
The shape matters because a product is zero exactly when one of its factors is zero. That single fact — the zero-product property — is why factoring is taught before anything else in equation solving. Once you have (2x + 1)(x + 3) = 0 you can read the roots straight off: 2x + 1 = 0 gives x = −0.5, and x + 3 = 0 gives x = −3. No formula, no square roots.
Factoring also does work that root-finding cannot. Cancelling a common bracket simplifies a rational expression; recognising a repeated factor tells you a curve touches rather than crosses the axis; and in calculus a factored denominator is what partial fractions need. So it is worth being able to factor even when you already know the roots.
One limitation is built in. Most integer trinomials do not factor over the integers. Pick a, b and c at random and the discriminant is usually not a perfect square, which means the roots are irrational and no pair of integer binomials exists. Such a trinomial is called prime over the integers, and reporting that honestly is as much a correct answer as producing brackets.
The AC method, and why it works
The AC method turns factoring into a search for two numbers. To factor ax² + bx + c:
- Take out the greatest common factor of a, b and c first, together with the sign of a if it is negative.
- Multiply a by c.
- Find two integers m and n with m·n = ac and m + n = b.
- Split the middle term: ax² + mx + nx + c.
- Group the first two and last two terms and factor each pair. The same bracket appears twice; take it out.
Step 3 looks like guesswork, but it is a quadratic in disguise. Two numbers with a known sum b and known product ac are precisely the roots of t² − bt + ac = 0, whose discriminant is b² − 4ac — the discriminant of the original trinomial. So the pair exists as integers exactly when b² − 4ac is a perfect square, and when it is, m and n are (b + √Δ)/2 and (b − √Δ)/2. That is how this calculator finds them without trial and error, and it is why the discriminant is reported alongside the answer.
Step 5 always works once step 3 succeeds, and the reason is worth seeing. After splitting, the first pair is x(ax + m) and the second is (n/d)(dx + dc/n) for the right common factor d; because mn = ac, the two brackets are forced to agree. Gauss's lemma is the general statement behind this: a polynomial with integer coefficients that factors over the rationals also factors over the integers, once the content — the common factor — has been removed.
Two shortcuts sit inside the general method. When b = 0 and ac < 0 you have a difference of squares: a² − b² = (a + b)(a − b). When Δ = 0 you have a perfect square trinomial and the answer is a single bracket squared. Both fall out of the AC method automatically, but recognising them saves time by hand.
Worked example: factoring 6x² − 15x − 9 by hand
Start with 6x² − 15x − 9, so a = 6, b = −15, c = −9.
- Common factor first. gcd(6, 15, 9) = 3, and a is positive, so pull out 3: 6x² − 15x − 9 = 3(2x² − 5x − 3). Everything from here works on 2x² − 5x − 3.
- Multiply a by c. ac = 2 × (−3) = −6.
- Find the pair. You need two integers whose product is −6 and whose sum is −5. The candidate pairs are 1×(−6), (−1)×6, 2×(−3), (−2)×3, with sums −5, 5, −1, 1. The first one works: m = 1, n = −6.
- Split the middle term. 2x² + x − 6x − 3.
- Group and factor each pair. (2x² + x) + (−6x − 3) = x(2x + 1) − 3(2x + 1).
- Take out the shared bracket. (2x + 1)(x − 3).
- Restore the common factor. 6x² − 15x − 9 = 3(x − 3)(2x + 1).
Check by expanding: 3(x − 3)(2x + 1) = 3(2x² + x − 6x − 3) = 3(2x² − 5x − 3) = 6x² − 15x − 9 ✓.
Now confirm the discriminant shortcut. Δ = (−15)² − 4(6)(−9) = 225 + 216 = 441, and √441 = 21, a perfect square — which is exactly why an integer factorisation existed. The roots are (15 ± 21)/12, giving 3 and −0.5, and those are the numbers the brackets announce: x − 3 = 0 at 3, and 2x + 1 = 0 at −0.5.
Change the constant to −8 and watch it fail: 6x² − 15x − 8 has Δ = 225 + 192 = 417, which is not a perfect square (20² = 400, 21² = 441). No integer pair exists, and the trinomial is prime over the integers. Its roots are (15 ± √417)/12 ≈ 2.9518 and −0.4518.
How to read the result
The factorability line is the first thing to check. "Factors over the integers" means the brackets shown contain only whole numbers and you can hand them in as they are. "Prime over the integers" means no such brackets exist and the factorisation shown uses decimal roots — correct, but not what a factoring exercise is asking for. "Irreducible over the reals" means the discriminant is negative and the only factorisation involves complex numbers.
The greatest common factor output catches the error that costs the most marks. A factorisation is only complete when the common factor has been removed: (6x − 18)(2x + 1) is a true statement about 6x² − 15x − 9 but it is not fully factored, because 6x − 18 still has a 6 in it. If this output shows anything other than 1 or −1, the factor belongs out front.
The roots and the brackets are two views of the same information. A bracket (qx − p) corresponds to the root p/q, so a root of 1.5 means the bracket (2x − 3), and a root of −3 means (x + 3). If you prefer to go the other way — start from the roots and build the brackets — the quadratic equation calculator gives the roots and this page gives the brackets.
Finally, remember what a perfect-square discriminant does and does not tell you. It guarantees integer brackets exist for integer coefficients. It says nothing about whether the roots are integers: 2x² + 7x + 3 has Δ = 25 and factors cleanly, yet one root is −0.5.
Reference: common factoring patterns
| Pattern | Example | Δ | Factored form |
|---|---|---|---|
| Simple trinomial, a = 1 | x² − 5x + 6 | 1 | (x − 3)(x − 2) |
| Leading coefficient ≠ 1 | 2x² + 7x + 3 | 25 | (2x + 1)(x + 3) |
| Common factor first | 6x² − 15x − 9 | 441 | 3(x − 3)(2x + 1) |
| Difference of squares | 4x² − 9 | 144 | (2x − 3)(2x + 3) |
| Perfect square trinomial | x² + 6x + 9 | 0 | (x + 3)² |
| Perfect square, a ≠ 1 | 9x² − 12x + 4 | 0 | (3x − 2)² |
| No constant term | x² − 3x | 9 | x(x − 3) |
| Negative leading coefficient | −x² + 4x − 3 | 4 | −(x − 1)(x − 3) |
| Prime over the integers | x² + x − 1 | 5 | none with integers; roots (−1 ± √5)/2 |
| Irreducible over the reals | x² + x + 1 | −3 | none with reals; complex roots only |
Δ is a perfect square in every row that factors over the integers, and in no row that does not.
"Prime" means prime over a specific number system
Calling a trinomial prime is always relative to the coefficients you allow. x² − 2 is prime over the integers and over the rationals, but factors over the reals as (x − √2)(x + √2). x² + 1 is prime over the reals but factors over the complex numbers as (x − i)(x + i). School exercises almost always mean "over the integers" unless they say otherwise, which is the convention this calculator reports against. If you need the exact irrational form rather than a decimal, put the root through the radical simplifier.
Mistakes that break a factorisation
- Skipping the common factor. Always take out the GCF before anything else, or you will end up with brackets that still share a factor and a marker will call the answer incomplete.
- Multiplying only a and c but forgetting the sign. For 2x² − 5x − 3, ac = −6, not 6. The negative is what forces the pair to have opposite signs.
- Using a + c instead of a·c. The AC method needs the product for step 2 and the sum only for the pair.
- Grouping without checking the brackets match. If the two brackets after grouping are not identical, you split the middle term with the wrong pair, or you factored one group with the wrong sign.
- Leaving a negative leading coefficient inside. −x² + 4x − 3 should become −(x − 1)(x − 3), not (−x + 1)(x − 3), which is correct but non-standard.
- Declaring a trinomial prime after only trying a few pairs. Compute the discriminant instead: if it is not a perfect square, no pair exists and no amount of searching will find one.
- Confusing factoring with solving. (2x + 1)(x + 3) is a factorisation. The roots −0.5 and −3 come from setting each bracket to zero, which is a separate step.
When the AC method is not the right tool
The AC method factors quadratic trinomials in one variable. Outside that scope you need something else.
Four or more terms with no quadratic shape often yield to plain grouping: x³ + 2x² + 3x + 6 = x²(x + 2) + 3(x + 2) = (x + 2)(x² + 3). Look for a repeated bracket rather than a factor pair.
Cubics and above need the rational root theorem: any rational root p/q in lowest terms has p dividing the constant and q dividing the leading coefficient. Test those candidates, then divide out the factor you find with polynomial long division and factor the smaller quotient. The cubic equation solver handles the case where no rational root exists.
Sums and differences of cubes have their own identities: a³ − b³ = (a − b)(a² + ab + b²) and a³ + b³ = (a + b)(a² − ab + b²). Neither quadratic bracket factors further over the reals.
When you only need the roots, skip factoring altogether. The quadratic formula never fails, and completing the square gives the vertex form as a bonus. Factoring is the fast route only when the numbers cooperate.
If the coefficients themselves need reducing first, the greatest common factor calculator and the prime factorisation calculator do that part quickly.
Key terms
- Trinomial
- A polynomial with three terms. Here specifically ax² + bx + c with a ≠ 0.
- AC method
- Factoring by multiplying a and c, finding two integers with that product and with sum b, splitting the middle term and grouping.
- Content and primitive part
- The content is the greatest common factor of the coefficients; dividing it out leaves the primitive polynomial, which is what the AC search actually works on.
- Prime (irreducible) polynomial
- One that cannot be written as a product of two lower-degree polynomials with coefficients in the chosen number system.
- Zero-product property
- If a product equals zero then at least one factor equals zero. This is what turns a factorisation into a set of roots.
- Gauss's lemma
- A primitive polynomial with integer coefficients that factors over the rationals also factors over the integers — the reason the AC method never needs fractions.
