Skip to content
Tutorials Center
My learning

Topics

Lesson 25 of 37 · Factoring

Factoring Trinomials

Factor trinomials of the form x² + bx + c and ax² + bx + c step by step, using sum-and-product pairs and the grouping method, with a code search.

A trinomial such as x² + 7x + 12 is the result of multiplying two binomials. Factoring it means finding those binomials: (x + 3)(x + 4). Once you see the pattern, this takes seconds.

First you need to see where the pattern comes from.

Trinomials with leading coefficient 1

Multiply (x + p)(x + q):

(x + p)(x + q) = x² + (p + q)x + pq

So in x² + bx + c you need two numbers p and q with

  • p · q = c (they multiply to the constant term), and
  • p + q = b (they add to the middle coefficient).

Example 1. Factor x² + 7x + 12.

List the pairs that multiply to 12: 1·12, 2·6, 3·4. Which pair adds to 7? 3 + 4. So x² + 7x + 12 = (x + 3)(x + 4).

Example 2. Factor x² − 5x + 6. Product +6, sum −5. Both numbers must be negative (a positive product with a negative sum): −2 and −3. Result: (x − 2)(x − 3).

Example 3. Factor x² + 2x − 15. Product −15 means the numbers have opposite signs. The sum is +2, so the larger number is positive: 5 and −3. Result: (x + 5)(x − 3).

This sign guide helps:

c b The two numbers
positive positive both positive
positive negative both negative
negative any one of each; the larger in size has the sign of b
Python Search for the sum-and-product pair

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Trinomials with leading coefficient other than 1

For ax² + bx + c with a ≠ 1, use the ac method, which uses grouping from the previous lesson.

Example 4. Factor 6x² + 11x + 3.

  1. Multiply a · c = 6 · 3 = 18.
  2. Find two numbers that multiply to 18 and add to b = 11: 9 and 2.
  3. Split the middle term: 6x² + 9x + 2x + 3.
  4. Group: 3x(2x + 3) + 1(2x + 3).
  5. Factor: (2x + 3)(3x + 1).

Check: (2x + 3)(3x + 1) = 6x² + 2x + 9x + 3 = 6x² + 11x + 3. Correct.

Example 5. Factor 4x² − 4x − 15. Here ac = −60. Numbers with product −60 and sum −4: −10 and 6. Split: 4x² − 10x + 6x − 15. Group: 2x(2x − 5) + 3(2x − 5) = (2x − 5)(2x + 3).

First take out any GCF. 6x² + 18x + 12 has GCF 6, leaving 6(x² + 3x + 2) = 6(x + 1)(x + 2). This makes the numbers smaller and the ac method easier.

If no pair of integers works, the trinomial is prime (not factorable over the integers). x² + x + 1 is an example: no two integers multiply to 1 and add to 1.

Python The ac method in code

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Factor x² + 9x + 20.

    4 · 5 = 20 and 4 + 5 = 9.
  2. 2. Factor x² − 3x − 10.

    The numbers must multiply to −10 and add to −3: −5 and 2.
  3. 3. In the ac method for 2x² + 7x + 3, which two numbers split the middle term?

    ac = 6, and 1 · 6 = 6 with 1 + 6 = 7. The split is 2x² + x + 6x + 3 = (2x + 1)(x + 3).
  4. 4. Which trinomial is prime over the integers?

    No two integers multiply to 5 and add to 2, so x² + 2x + 5 cannot be factored.

Summary

  • For x² + bx + c, find two numbers with product c and sum b.
  • For ax² + bx + c, find two numbers with product ac and sum b, split the middle term and group.
  • Take out a GCF first, and check every answer by multiplying back.
  • If no integer pair works, the trinomial is prime.

Next: Factoring Special Patterns