High school

How to solve quadratic equations by factoring

· 4 min read

Quick answerMove everything to one side so the equation equals zero, factor the expression into two brackets, set each bracket equal to zero, and solve the two small equations. For x² − 5x + 6 = 0 that gives (x − 2)(x − 3) = 0, so x = 2 or x = 3.

Factoring is the fastest way to solve a quadratic equation when the numbers are friendly. It works because of one simple fact: if two things multiply to zero, at least one of them must be zero.

The four steps

  1. Get zero on one side. Write the equation as ax2+bx+c=0ax^2 + bx + c = 0.
  2. Factor the left side into two brackets.
  3. Set each bracket equal to zero.
  4. Solve each small equation, then check your answers in the original.

Example 1: the basic case

Solve x2−5x+6=0x^2 - 5x + 6 = 0.

We need two numbers that multiply to 6 (the last number) and add to −5 (the middle number). Those are −2 and −3, because (−2)(−3)=6(-2)(-3) = 6 and (−2)+(−3)=−5(-2) + (-3) = -5.

(x−2)(x−3)=0(x - 2)(x - 3) = 0

Now set each bracket to zero:

x−2=0orx−3=0x - 2 = 0 \quad \text{or} \quad x - 3 = 0

So x=2x = 2 or x=3x = 3.

Check: 22−5(2)+6=4−10+6=02^2 - 5(2) + 6 = 4 - 10 + 6 = 0 ✓ and 32−5(3)+6=9−15+6=03^2 - 5(3) + 6 = 9 - 15 + 6 = 0 ✓

Example 2: a negative last number

Solve x2+2x−15=0x^2 + 2x - 15 = 0.

The numbers must multiply to −15, so one is positive and one is negative. They must add to +2, so the bigger one is positive: 5 and −3.

(x+5)(x−3)=0(x + 5)(x - 3) = 0

So x=−5x = -5 or x=3x = 3.

Sign shortcut. If the last number is positive, both numbers have the same sign as the middle term. If the last number is negative, the signs are different.

Example 3: when the first number is not 1

Solve 2x2+7x+3=02x^2 + 7x + 3 = 0.

Here the trick changes slightly. Multiply the first and last numbers: 2×3=62 \times 3 = 6. Find two numbers that multiply to 6 and add to 7: those are 6 and 1. Use them to split the middle term:

2x2+6x+x+3=02x^2 + 6x + x + 3 = 0

Factor in pairs:

2x(x+3)+1(x+3)=02x(x + 3) + 1(x + 3) = 0 (2x+1)(x+3)=0(2x + 1)(x + 3) = 0

So 2x+1=02x + 1 = 0 gives x=−12x = -\tfrac{1}{2}, and x+3=0x + 3 = 0 gives x=−3x = -3.

Example 4: zero is not on one side yet

Solve x2=4xx^2 = 4x.

Do not divide both sides by xx. Move everything to one side first:

x2−4x=0x^2 - 4x = 0 x(x−4)=0x(x - 4) = 0

So x=0x = 0 or x=4x = 4. Dividing by xx would have thrown away the solution x=0x = 0.

Common mistakes

  • Factoring before the equation equals zero. (x−2)(x−3)=5(x - 2)(x - 3) = 5 does not mean x−2=5x - 2 = 5. The rule only works with zero.
  • Flipping the signs at the end. From (x+5)=0(x + 5) = 0 the solution is x=−5x = -5, not 5.
  • Dividing by the variable. This loses the solution x=0x = 0, as in Example 4.
  • Stopping after one solution. Most quadratics have two.

When factoring does not work

Not every quadratic factors nicely. x2−4x−1=0x^2 - 4x - 1 = 0 has no pair of whole numbers that multiply to −1 and add to −4. In that case use the quadratic formula. Our quadratic equation solver shows that method step by step for any numbers.

Practice problems

Try these, then open the answer.

1. x2+7x+12=0x^2 + 7x + 12 = 0

Answer

(x+3)(x+4)=0(x + 3)(x + 4) = 0, so x=−3x = -3 or x=−4x = -4.

2. x2−x−20=0x^2 - x - 20 = 0

Answer

(x−5)(x+4)=0(x - 5)(x + 4) = 0, so x=5x = 5 or x=−4x = -4.

3. 3x2−10x+8=03x^2 - 10x + 8 = 0

Answer

3×8=243 \times 8 = 24; the numbers −6 and −4 multiply to 24 and add to −10. Then 3x2−6x−4x+8=3x(x−2)−4(x−2)=(3x−4)(x−2)3x^2 - 6x - 4x + 8 = 3x(x - 2) - 4(x - 2) = (3x - 4)(x - 2), so x=43x = \tfrac{4}{3} or x=2x = 2.

4. x2−49=0x^2 - 49 = 0

Answer

This is a difference of squares: (x−7)(x+7)=0(x - 7)(x + 7) = 0, so x=7x = 7 or x=−7x = -7.

More on algebra