Algebra 1 · Algebra 2 · Grades 8, 9, 10

The Quadratic Formula: How and Why It Works

Quick answer

The quadratic formula solves any equation of the form ax² + bx + c = 0 with a ≠ 0. The solutions are x = (−b ± √(b² − 4ac)) / (2a). The expression under the radical, b² − 4ac, is the discriminant: if it is positive there are two real solutions, if it is zero there is one, and if it is negative there are no real solutions.

What you'll learn

  • Use the quadratic formula to solve any quadratic equation
  • Explain where the quadratic formula comes from
  • Use the discriminant to predict how many real solutions an equation has

What the quadratic formula is

A quadratic equation is any equation you can write in the form

ax2+bx+c=0,a0ax^2 + bx + c = 0, \qquad a \neq 0

The quadratic formula gives you both solutions directly from aa, bb, and cc:

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

That ±\pm is doing real work. It is shorthand for two separate solutions:

x1=b+b24ac2aandx2=bb24ac2ax_1 = \frac{-b + \sqrt{b^2 - 4ac}}{2a} \qquad\text{and}\qquad x_2 = \frac{-b - \sqrt{b^2 - 4ac}}{2a}

Why it works

Most courses hand you the formula and move on. It is worth seeing where it comes from, because the derivation is completing the square done once with letters instead of numbers. Doing it once with letters is what saves you from doing it every time with numbers.

Start with the general equation and divide through by aa (allowed, since a0a \neq 0):

x2+bax+ca=0x^2 + \frac{b}{a}x + \frac{c}{a} = 0

Move the constant across:

x2+bax=cax^2 + \frac{b}{a}x = -\frac{c}{a}

Now complete the square. Take half of the xx-coefficient, b2a\tfrac{b}{2a}, square it, and add it to both sides:

x2+bax+(b2a)2=ca+(b2a)2x^2 + \frac{b}{a}x + \left(\frac{b}{2a}\right)^{2} = -\frac{c}{a} + \left(\frac{b}{2a}\right)^{2}

The left side is now a perfect square, and the right side combines over a common denominator:

(x+b2a)2=b24ac4a2\left(x + \frac{b}{2a}\right)^{2} = \frac{b^2 - 4ac}{4a^2}

Take the square root of both sides — and this is exactly where the ±\pm enters, because a positive number has two square roots:

x+b2a=±b24ac2ax + \frac{b}{2a} = \pm\,\frac{\sqrt{b^2 - 4ac}}{2a}

Finally, isolate xx:

x=b2a±b24ac2a=b±b24ac2ax = -\frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

That is the whole derivation. Nothing in it is a trick you have not already seen.

How to use it

  1. Rearrange the equation so that one side is 00.
  2. Identify aa, bb, and cc, keeping their signs.
  3. Compute the discriminant b24acb^2 - 4ac first, on its own.
  4. Substitute into the formula and simplify.
  5. Check at least one solution by substituting it back in.

Worked examples

The discriminant

The quantity Δ=b24ac\Delta = b^2 - 4ac tells you how many real solutions exist before you finish solving:

Δ=b24ac{>0two distinct real solutions=0exactly one real solution<0no real solutions\Delta = b^2 - 4ac \quad \begin{cases} > 0 & \text{two distinct real solutions} \\[2pt] = 0 & \text{exactly one real solution} \\[2pt] < 0 & \text{no real solutions} \end{cases}

The three cases are three things a parabola can do against the xx-axis, and the discriminant is how the algebra sees them coming:

Two solutions, one, or none Three upward parabolas. The first dips well below the x-axis and crosses it twice. The second touches the axis at a single point. The third sits entirely above the axis and never reaches it. -4-224-22468xy
  • two crossings
  • one touch
  • no crossing
Two solutions, one, or none

Reading the curves against the formula: a positive discriminant leaves a real square root to add and subtract, which pulls the two crossings apart. Zero leaves nothing to add or subtract, so the two crossings land on the same point. A negative one asks for the square root of a negative, and the curve never reaches the axis to be found.

Practice problems

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

    Hint

    Compute the discriminant first. It is a perfect square, so the solutions are rational.

    Answer

    x=3x = -3 or x=4x = -4

    Full solution

    a=1a = 1, b=7b = 7, c=12c = 12.

    b24ac=4948=1b^2 - 4ac = 49 - 48 = 1

    x=7±12x = \tfrac{-7 \pm 1}{2}, giving x=3x = -3 or x=4x = -4.

    Check: (3)2+7(3)+12=921+12=0(-3)^2 + 7(-3) + 12 = 9 - 21 + 12 = 0

  2. Solve 3x22x5=03x^2 - 2x - 5 = 0.

    Answer

    x=53x = \tfrac{5}{3} or x=1x = -1

    Full solution

    a=3a = 3, b=2b = -2, c=5c = -5.

    b24ac=4+60=64b^2 - 4ac = 4 + 60 = 64

    x=2±86x = \tfrac{2 \pm 8}{6}, giving x=106=53x = \tfrac{10}{6} = \tfrac{5}{3} or x=66=1x = \tfrac{-6}{6} = -1.

  3. How many real solutions does x2+2x+5=0x^2 + 2x + 5 = 0 have?

    Answer

    None.

    Full solution

    b24ac=420=16b^2 - 4ac = 4 - 20 = -16, which is negative, so there are no real solutions. The parabola sits entirely above the xx-axis.

  4. Solve x26x+9=0x^2 - 6x + 9 = 0.

    Hint

    Compute the discriminant before doing anything else.

    Answer

    x=3x = 3, a single repeated solution.

    Full solution

    a=1a = 1, b=6b = -6, c=9c = 9.

    b24ac=3636=0b^2 - 4ac = 36 - 36 = 0, so there is exactly one solution.

    x=6±02=3x = \tfrac{6 \pm 0}{2} = 3.

    The parabola touches the xx-axis at (3,0)(3, 0) without crossing it.

  5. Solve x2+4x+1=0x^2 + 4x + 1 = 0, leaving the answer in exact form.

    Hint

    The discriminant is not a perfect square, so a square root will stay in the answer.

    Answer

    x=2+3x = -2 + \sqrt{3} or x=23x = -2 - \sqrt{3}

    Full solution

    b24ac=164=12b^2 - 4ac = 16 - 4 = 12.

    x=4±122x = \tfrac{-4 \pm \sqrt{12}}{2}. Since 12=23\sqrt{12} = 2\sqrt{3}, this becomes 4±232=2±3\tfrac{-4 \pm 2\sqrt{3}}{2} = -2 \pm \sqrt{3}.

    Both parts of the numerator were divided by 22, not only the root.

  6. Solve 3x2=7x23x^2 = 7x - 2.

    Hint

    It is not equal to zero yet.

    Answer

    x=2x = 2 or x=13x = \tfrac{1}{3}

    Full solution

    Move everything to one side: 3x27x+2=03x^2 - 7x + 2 = 0, so a=3a = 3, b=7b = -7, c=2c = 2.

    b24ac=4924=25b^2 - 4ac = 49 - 24 = 25.

    x=7±56x = \tfrac{7 \pm 5}{6}, giving x=2x = 2 or x=26=13x = \tfrac{2}{6} = \tfrac{1}{3}.

  7. Without solving, say how many real solutions 4x212x+9=04x^2 - 12x + 9 = 0 has.

    Answer

    One.

    Full solution

    b24ac=1444(4)(9)=144144=0b^2 - 4ac = 144 - 4(4)(9) = 144 - 144 = 0, so there is exactly one repeated solution.

    The discriminant answers “how many” without any need to answer “which”.

  8. Solve 2x2+4x+6=0-2x^2 + 4x + 6 = 0.

    Hint

    Dividing through by 2-2 first makes the arithmetic easier and changes nothing.

    Answer

    x=3x = 3 or x=1x = -1

    Full solution

    Divide every term by 2-2: x22x3=0x^2 - 2x - 3 = 0.

    b24ac=4+12=16b^2 - 4ac = 4 + 12 = 16, so x=2±42x = \tfrac{2 \pm 4}{2}, giving x=3x = 3 or x=1x = -1.

    Using a=2a = -2, b=4b = 4, c=6c = 6 directly gives the same pair, with a division by 4-4 along the way.

  9. A ball is thrown upward. Its height in metres after tt seconds is h=5t2+20th = -5t^2 + 20t. When does it hit the ground?

    Hint

    Ground level means h=0h = 0. Two answers will appear — decide what each one means.

    Answer

    After 44 seconds.

    Full solution

    Set h=0h = 0: 5t2+20t=0-5t^2 + 20t = 0, so a=5a = -5, b=20b = 20, c=0c = 0.

    b24ac=4000=400b^2 - 4ac = 400 - 0 = 400, and x=20±2010x = \tfrac{-20 \pm 20}{-10}, giving t=0t = 0 or t=4t = 4.

    Both are real, and both mean something: t=0t = 0 is the moment of the throw, when the ball was also at ground level, and t=4t = 4 is the landing. The question asks for the landing, so the answer is 44 seconds.

  10. Sofia solves x24x5=0x^2 - 4x - 5 = 0 and writes b24ac=1620=4b^2 - 4ac = 16 - 20 = -4, then concludes there are no real solutions. Find her error.

    Hint

    Check the sign of cc.

    Answer

    She used c=5c = 5 instead of c=5c = -5. The solutions are x=5x = 5 and x=1x = -1.

    Full solution

    With c=5c = -5, the calculation is b24ac=164(1)(5)=16+20=36b^2 - 4ac = 16 - 4(1)(-5) = 16 + 20 = 36.

    x=4±62x = \tfrac{4 \pm 6}{2}, giving x=5x = 5 or x=1x = -1.

    Checking: 524(5)5=25205=05^2 - 4(5) - 5 = 25 - 20 - 5 = 0

    A dropped minus sign in cc flips 4ac-4ac from adding to subtracting, which is why it so often turns a solvable equation into an apparently unsolvable one.

Frequently asked questions

When should I use the quadratic formula instead of factoring?

Try factoring first if you can spot two whole numbers that work. Use the quadratic formula when you cannot find that pair, when the solutions are irrational, or when you want a method that always works. The formula never fails; factoring only works for some equations.

What does it mean when the discriminant is negative?

A negative discriminant means the parabola never crosses the x-axis, so the equation has no real solutions. It does have two complex solutions, which you study in Algebra 2.

Do I have to set the equation to zero first?

Yes, always. The formula reads a, b and c off the arrangement ax² + bx + c = 0. Reading them off 2x² + 5x = 12 gives c = 12 instead of c = −12, and both answers come out wrong.

What is a if there is no number in front of x squared?

It is 1. A bare x² means one of them, so in x² − 5x + 6 = 0 the value of a is 1, not 0. Using a = 0 makes the formula divide by zero.

Can the quadratic formula be used on any equation?

Only on quadratics — equations whose highest power is x². It does not apply to x³ or to equations with x in a denominator until those are rearranged into quadratic form first.

What to learn next

Formulas on this page

Key terms in this lesson

Discriminant
The discriminant is the expression b squared minus 4ac inside the quadratic formula. Its sign tells you how many real solutions a quadratic has before you finish solving.
Irrational number
An irrational number cannot be written as a fraction of two whole numbers, and its decimal never ends and never repeats. The square root of 2 and pi are the two you meet first.
Quadratic equation
A quadratic equation is one that can be written as ax squared plus bx plus c = 0, with a not equal to zero. The squared term is what makes it quadratic rather than linear.

Standards alignment

This lesson covers the following Common Core State Standards for Mathematics.

  • CCSS.MATH.CONTENT.HSA.REI.B.4bReasoning with Equations and InequalitiesSolve quadratic equations by inspection (e.g., for x² = 49), taking square roots, completing the square, the quadratic formula and factoring, as appropriate to the initial form of the equation. Recognize when the quadratic formula gives complex solutions and write them as a ± bi for real numbers a and b.
  • CCSS.MATH.CONTENT.HSA.REI.B.4aReasoning with Equations and InequalitiesUse the method of completing the square to transform any quadratic equation in x into an equation of the form (x - p)² = q that has the same solutions. Derive the quadratic formula from this form.