Skip to content
StudyCloak
Math

Solving Quadratic Equations: Factoring, the Formula, and When to Use Each

When to factor and when to use the quadratic formula, how the discriminant predicts your solutions, and quick ways to check your answers.

StudyCloak Team

4 min read

On this page

In short

  • Rewrite the equation in standard form, with zero on one side, before solving.
  • Factor when the numbers are small and the discriminant is a perfect square.
  • Use the quadratic formula when factoring isn't obvious; it works on every quadratic.
  • Compute b2−4acb^2 - 4ac first to know whether to expect two, one, or no real solutions.
  • Check by substitution, or with the sum and product of the solutions.

A quadratic equation is any equation that can be written in the standard form ax2+bx+c=0ax^2 + bx + c = 0, where a≠0a \neq 0. Quadratics show up in everything from projectile motion to area problems, and they can have two real solutions, one, or none. There are several ways to solve them, and the hardest part is often deciding which one to use.

This guide covers factoring, the quadratic formula, and the discriminant, a quick calculation that tells you what to expect before you start. Whichever method you choose, the first step is always the same: move every term to one side so the other side is zero.

Method 1: Factoring

Factoring relies on the zero product property: if two numbers multiply to zero, at least one of them must be zero. So once the quadratic is written as a product of two factors, you can set each factor equal to zero.

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

Look for two numbers that multiply to c=6c = 6 and add to b=−5b = -5. Those are −2-2 and −3-3:

x2−5x+6=(x−2)(x−3)=0x^2 - 5x + 6 = (x - 2)(x - 3) = 0

Set each factor to zero: x=2x = 2 or x=3x = 3.

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

When a≠1a \neq 1, try the "ac method": find two numbers that multiply to ac=2⋅3=6ac = 2 \cdot 3 = 6 and add to b=7b = 7. That's 6 and 1. Split the middle term into 6x+x6x + x and factor by grouping:

2x2+6x+x+3=02x(x+3)+1(x+3)=0(2x+1)(x+3)=0\begin{aligned} 2x^2 + 6x + x + 3 &= 0 \\ 2x(x + 3) + 1(x + 3) &= 0 \\ (2x + 1)(x + 3) &= 0 \end{aligned}

So x=−12x = -\frac{1}{2} or x=−3x = -3.

One warning: the zero product property only works when the other side is zero. If you have x2−5x=−6x^2 - 5x = -6, you can't factor the left side and set each factor equal to −6-6. Add 6 to both sides first.

Method 2: The quadratic formula

The quadratic formula solves every quadratic, whether or not it factors nicely. It comes from completing the square on the general form:

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Example 3. Solve x2+4x−1=0x^2 + 4x - 1 = 0.

Here a=1a = 1, b=4b = 4, and c=−1c = -1. Substitute carefully, keeping the sign of cc:

x=−4±42−4(1)(−1)2(1)=−4±202x = \frac{-4 \pm \sqrt{4^2 - 4(1)(-1)}}{2(1)} = \frac{-4 \pm \sqrt{20}}{2}

Because 20=25\sqrt{20} = 2\sqrt{5}, this simplifies to

x=−4±252=−2±5x = \frac{-4 \pm 2\sqrt{5}}{2} = -2 \pm \sqrt{5}

So x≈0.236x \approx 0.236 or x≈−4.236x \approx -4.236. This equation doesn't factor over the integers, which is when the formula earns its keep.

Two common slips: forgetting that −b-b flips the sign of bb, and dividing only part of the numerator by 2a2a.

The discriminant: how many solutions to expect

The expression under the square root, b2−4acb^2 - 4ac, is called the discriminant. Working it out first tells you what to expect. With integer coefficients, the four cases are:

DiscriminantSolutionsExample
Positive perfect squareTwo rational solutions (try factoring)x2−5x+6=0x^2 - 5x + 6 = 0: 25−24=125 - 24 = 1
Positive, not a perfect squareTwo irrational solutionsx2+4x−1=0x^2 + 4x - 1 = 0: 16+4=2016 + 4 = 20
ZeroOne repeated solutionx2−6x+9=0x^2 - 6x + 9 = 0: 36−36=036 - 36 = 0
NegativeNo real solutionsx2+2x+5=0x^2 + 2x + 5 = 0: 4−20=−164 - 20 = -16

In the zero case, x2−6x+9=(x−3)2x^2 - 6x + 9 = (x - 3)^2, so the only solution is x=3x = 3. Its graph just touches the xx-axis there.

In the negative case, the formula asks for the square root of −16-16. No real number squares to a negative, so there are no real solutions, and the parabola never crosses the xx-axis. (If your course covers complex numbers, the solutions are x=−1±2ix = -1 \pm 2i.)

Which method when

With your equation in standard form, look for these patterns:

What you seeBest first moveExample
No xx term (b=0b = 0)Isolate x2x^2 and take square roots4x2−36=04x^2 - 36 = 0 gives x=±3x = \pm 3
No constant term (c=0c = 0)Factor out xxx2−7x=0x^2 - 7x = 0 gives x=0x = 0 or x=7x = 7
Small integers, perfect-square discriminantFactorx2−5x+6=0x^2 - 5x + 6 = 0
Large or decimal coefficients, or a non-square discriminantQuadratic formulax2+4x−1=0x^2 + 4x - 1 = 0
Asked for vertex form, or a=1a = 1 with an even bbComplete the squarex2+6x+2=0x^2 + 6x + 2 = 0 becomes (x+3)2=7(x + 3)^2 = 7

When c=0c = 0, never divide both sides by xx; that throws away the solution x=0x = 0. And when in doubt, use the formula. It always works.

Check your answers

Substitution is the most reliable check. For Example 2, try x=−3x = -3:

2(−3)2+7(−3)+3=18−21+3=0✓2(-3)^2 + 7(-3) + 3 = 18 - 21 + 3 = 0 \checkmark

You can also check both solutions at once, since the solutions x1x_1 and x2x_2 of any quadratic always satisfy

x1+x2=−ba,x1x2=cax_1 + x_2 = -\frac{b}{a}, \qquad x_1 x_2 = \frac{c}{a}

For Example 2, the solutions should add to −72-\frac{7}{2} and multiply to 32\frac{3}{2}, and they do.

Our framework for showing your work on multi-step math problems covers checking in more detail. When you practice, attempt each problem first, then compare your work with a full solution, as described in how to learn from step-by-step solutions. And if your homework lives online, the StudyCloak Chrome extension lets you highlight a quadratic and read the explanation in a popup, without leaving the page.

When a tricky quadratic has you stuck, StudyCloak can walk you through every step.

All articles