AI Math Tutor

Blog · Quadratic equations

Quadratic Factoring: How to Factor and Solve

Quadratic factoring turns an equation like x2+5x+6=0x^2 + 5x + 6 = 0 into a product of two simpler pieces, (x+2)(x+3)=0(x+2)(x+3) = 0, which is usually the fastest way to solve it once you spot the pattern. The core idea is always the same: find two numbers with a particular product and a particular sum, then use them to rewrite the equation. This guide covers quadratic factoring for the basic case, for a leading coefficient other than 1, and for the difference of squares pattern, with three worked examples, including one that does not factor at all.

Key takeaways

Finding two numbers that multiply to c and add to b

For a quadratic in the form x2+bx+c=0x^2 + bx + c = 0, with a leading coefficient of 1, factoring starts by finding two numbers that multiply to give c and add to give b. Once you find them, they become the constants in two binomials: x2+bx+c=(x+p)(x+q)x^2 + bx + c = (x + p)(x + q), where pp and qq are the two numbers you found.

Take x2+7x+12=0x^2 + 7x + 12 = 0. You need two numbers that multiply to 12 and add to 7. Checking the factor pairs of 12, 3 and 4 fit, since 3×4=123 \times 4 = 12 and 3+4=73 + 4 = 7. That gives x2+7x+12=(x+3)(x+4)x^2 + 7x + 12 = (x+3)(x+4), and setting each factor equal to 0 gives x=−3x = -3 or x=−4x = -4. The sign of b and c tells you what kind of pair to look for: a positive c with a positive b means both numbers are positive, a positive c with a negative b means both numbers are negative, and a negative c means the two numbers have opposite signs.

Factoring when the leading coefficient is not 1

When the equation looks like ax2+bx+c=0ax^2 + bx + c = 0 with a≠1a \ne 1, the number pair you need changes: multiply a and c together first, then find two numbers that multiply to that product, acac, and add to b. Once you have them, rewrite the middle term, bxbx, as the sum of two terms using those numbers, and factor the resulting four-term expression by grouping.

For 2x2+7x+3=02x^2 + 7x + 3 = 0, multiply aa and cc: 2×3=62 \times 3 = 6. You need two numbers that multiply to 6 and add to 7, which are 6 and 1. Rewrite the middle term using those numbers: 2x2+6x+x+3=02x^2 + 6x + x + 3 = 0. Group the first two terms and the last two terms, factor each group, and factor out the common binomial: 2x(x+3)+1(x+3)=(2x+1)(x+3)2x(x+3) + 1(x+3) = (2x+1)(x+3). Setting each factor to 0 gives x=−12x = -\frac{1}{2} or x=−3x = -3.

Recognizing a difference of squares

A difference of squares is an expression where one perfect square is subtracted from another, such as x2−9x^2 - 9 or 4x2−254x^2 - 25. This pattern always factors the same way: a2−b2=(a−b)(a+b)a^2 - b^2 = (a-b)(a+b). For x2−9x^2 - 9, since 9=329 = 3^2, the factored form is (x−3)(x+3)(x-3)(x+3).

This pattern is worth spotting on sight because it skips the usual search for a number pair entirely: as soon as you recognize two perfect squares connected by subtraction, you already know the two factors. It only applies to a difference, never a sum: x2+9x^2 + 9 does not factor this way, and in fact does not factor over real numbers at all. For more on identifying a, b, and c and recognizing patterns like this one directly from an equation's form, see Quadratic Standard Form: What a, b and c Tell You.

What to do when a quadratic does not factor

Not every quadratic factors over whole numbers. If you cannot find a pair of whole numbers that multiplies to the right product and adds to the right sum, stop searching and switch to the quadratic formula instead, which solves any quadratic equation in standard form. A quadratic that does not factor neatly usually has solutions involving a square root that does not simplify to a whole number, which is exactly what the quadratic formula is built to handle. For the full method and more worked examples, see Quadratic Equations: Every Way to Solve One, Explained and Solve a Quadratic Equation by Factoring: 5 Worked Examples for further factoring practice.

Worked examples

Example 1: factor and solve x2−x−12=0x^2 - x - 12 = 0

  1. Find two numbers that multiply to −12-12 and add to −1-1. The numbers are −4-4 and 33, since −4×3=−12-4 \times 3 = -12 and −4+3=−1-4 + 3 = -1.
  2. Write the factored form using those numbers.
    x2−x−12=(x−4)(x+3)x^2 - x - 12 = (x - 4)(x + 3)
  3. Set each factor equal to 0 and solve.
    x−4=0⇒x=4,x+3=0⇒x=−3x - 4 = 0 \Rightarrow x = 4, \quad x + 3 = 0 \Rightarrow x = -3

So x=4x = 4 or x=−3x = -3. Check by substituting back: 42−4−12=16−4−12=04^2 - 4 - 12 = 16 - 4 - 12 = 0, and (−3)2−(−3)−12=9+3−12=0(-3)^2 - (-3) - 12 = 9 + 3 - 12 = 0, both correct.

Example 2: factor and solve 2x2+7x+3=02x^2 + 7x + 3 = 0

  1. Multiply aa and cc: 2×3=62 \times 3 = 6. Find two numbers that multiply to 6 and add to 7, which are 6 and 1.
  2. Rewrite the middle term using those two numbers, then factor by grouping.
    2x2+6x+x+3=2x(x+3)+1(x+3)=(2x+1)(x+3)2x^2 + 6x + x + 3 = 2x(x+3) + 1(x+3) = (2x+1)(x+3)
  3. Set each factor equal to 0 and solve.
    2x+1=0⇒x=−12,x+3=0⇒x=−32x + 1 = 0 \Rightarrow x = -\frac{1}{2}, \quad x + 3 = 0 \Rightarrow x = -3

So x=−12x = -\frac{1}{2} or x=−3x = -3. Check by substituting back: 2(14)+7(−12)+3=0.5−3.5+3=02\left(\frac{1}{4}\right) + 7\left(-\frac{1}{2}\right) + 3 = 0.5 - 3.5 + 3 = 0, and 2(9)+7(−3)+3=18−21+3=02(9) + 7(-3) + 3 = 18 - 21 + 3 = 0, both correct.

Example 3: try to factor x2+4x+2=0x^2 + 4x + 2 = 0

  1. Look for two numbers that multiply to 2 and add to 4. The only whole-number pairs that multiply to 2 are 11 and 22, or −1-1 and −2-2, and neither pair adds to 4.
  2. Since no whole-number pair works, this quadratic does not factor over whole numbers. Switch to the quadratic formula with a=1a = 1, b=4b = 4, c=2c = 2.
    x=−4±42−4(1)(2)2(1)=−4±16−82=−4±82x = \frac{-4 \pm \sqrt{4^2 - 4(1)(2)}}{2(1)} = \frac{-4 \pm \sqrt{16-8}}{2} = \frac{-4 \pm \sqrt{8}}{2}
  3. Simplify 8\sqrt{8} as 222\sqrt{2} and reduce the fraction.
    x=−4±222=−2±2x = \frac{-4 \pm 2\sqrt{2}}{2} = -2 \pm \sqrt{2}

So x=−2+2x = -2 + \sqrt{2} or x=−2−2x = -2 - \sqrt{2}. Check by approximating: 2≈1.414\sqrt{2} \approx 1.414, so x≈−0.586x \approx -0.586 or x≈−3.414x \approx -3.414; substituting x≈−0.586x \approx -0.586 gives about 0.343−2.343+2≈00.343 - 2.343 + 2 \approx 0, confirming the answer.

Common mistakes

Once factoring feels comfortable, Solve a Quadratic Equation by Factoring: 5 Worked Examples gives you more practice with the pattern, and Quadratic Equations by the Square Root Method covers the fastest method for equations with no middle term at all. For every method side by side, including when to reach for each one, see Quadratic Equations: Every Way to Solve One, Explained. When you want a quadratic factored and checked line by line, scan it and read every step in AI Math Tutor.

AI Math Tutor is a study aid, not a substitute for a teacher, and it can make mistakes: check every step, not just the answer.

Questions

What two numbers do you look for when factoring a quadratic?

For a quadratic in the form x2+bx+cx^2 + bx + c, look for two numbers that multiply to c and add to b. Those two numbers become the constants in the two factored binomials.

How does factoring change when the leading coefficient is not 1?

Multiply the leading coefficient a by the constant c first, then find two numbers that multiply to that product and add to b. Use those numbers to rewrite the middle term and factor by grouping.

What is a difference of squares?

A difference of squares is an expression like x2−9x^2 - 9, where a perfect square is subtracted from another perfect square. It always factors as (x−n)(x+n)(x - n)(x + n), where n is the square root of the constant term.

What do you do if a quadratic will not factor over whole numbers?

Switch to the quadratic formula, which solves any quadratic equation whether or not it factors neatly. A quadratic that does not factor with whole numbers often has an answer that includes a square root.

Does every quadratic equation factor?

No. Many quadratic equations have solutions that are not whole numbers or simple fractions, which means they will not factor over whole numbers at all. The quadratic formula is the reliable method for those cases.

Read next