Skip to content
EN - Language: English
MathematicsHigh school

Quadratic equations - the discriminant and the quadratic formula, step by step

· 15 min read

In short

The solutions of ax² + bx + c = 0 are the points where the parabola y = ax² + bx + c meets the x axis. The discriminant Δ = b² − 4ac tells you how many there are - two when Δ > 0, one when Δ = 0, none when Δ < 0 - and the quadratic formula x = (−b ± √Δ)/(2a) gives them. Both come from completing the square.

Words to know

Quadratic equation
An equation ax² + bx + c = 0 in which a is not 0.
Roots (solutions)
The values of x that make the equation true - where the parabola y = ax² + bx + c meets the x axis.
Discriminant
The number Δ = b² − 4ac. Its sign decides whether there are two real roots, one repeated root or none.
Quadratic formula
x = (−b ± √Δ)/(2a), the roots of any quadratic equation with Δ ≥ 0.
Axis of symmetry
The vertical line x = −b/(2a) through the vertex. The two roots lie the same distance either side of it.

What do you think?

The equation x2−4x+3=0x^2 - 4x + 3 = 0 has two solutions, 11 and 33. How many solutions does x2−4x+5=0x^2 - 4x + 5 = 0 have? The only change is a constant term that is 22 bigger.

The idea: where the parabola meets the x axis

Solving ax2+bx+c=0ax^2 + bx + c = 0 means finding the xx that make ax2+bx+cax^2 + bx + c equal to zero. On the graph of y=ax2+bx+cy = ax^2 + bx + c, those are the points where the parabola meets the xx axis. A parabola can cross the axis twice, touch it once at its vertex, or miss it altogether. So a quadratic equation has two solutions, one or none.

Two facts do the rest:

  • the parabola is symmetric, so the two solutions lie the same distance either side of its axis of symmetry x=−b2ax = -\frac{b}{2a},
  • that distance depends on one number, the discriminant Δ=b2−4ac\Delta = b^2 - 4ac. A negative Δ\Delta means there is nothing to measure: no solutions.

Put together, they give the quadratic formula: start at the axis and go the same distance left and right.

Solving x² − 4x + 3 = 0, step by step

Below is the parabola of the equation x2−4x+3=0x^2 - 4x + 3 = 0. Step through the animation with the buttons or the arrow keys. In the last steps the same parabola is lifted, and the number of solutions changes.

0.511.522.533.54-22411(2, −1)

x² − 4x + 3 = 0 · x = 1 or x = 3

Step 1 of 7
Steps of the animation. Arrow keys move between steps.

The solutions of x² − 4x + 3 = 0 are where the parabola y = x² − 4x + 3 meets the x axis: x = 1 and x = 3. Check: 1 − 4 + 3 = 0 and 9 − 12 + 3 = 0.

Step 3 is the heart of the method. Once the left side is a square plus a number, the equation says “a square equals something”. A square can equal a positive number in two ways, zero in one way, and a negative number in no way at all.

Try it yourself: change a, b and c

Set the three numbers of the equation ax2+bx+c=0ax^2 + bx + c = 0. Below the picture you can see the discriminant with your numbers put in, how many solutions it gives and what they are. The amber segments go from the axis of symmetry to each solution.

-6-4-2246-55
a = 1
b = −4
c = 3
Equation
x² − 4x + 3 = 0
Discriminant
Δ = (−4)² − 4 · 1 · 3 = 4
Number of solutions
two - Δ > 0
Solutions
x₁ = 1, x₂ = 3
Axis of symmetry
x = −b/(2a) = 2

Things to try:

  • change only cc: the parabola goes up and down, and Δ\Delta changes with it,
  • make aa negative: the parabola opens downwards, and now it has solutions when its vertex is above the axis,
  • with Δ<0\Delta < 0 the dashed amber line shows how far the vertex is from the axis,
  • set a=0a = 0: the x2x^2 disappears, and the equation is no longer quadratic.

The definition and the formula

A quadratic equation is an equation ax2+bx+c=0ax^2 + bx + c = 0, where aa, bb, cc are real numbers and a≠0a \neq 0. Its discriminant is

Δ=b2−4ac\Delta = b^2 - 4ac
  • if Δ>0\Delta > 0, the equation has two different real solutions:
x1,2=−b±Δ2ax_{1,2} = \frac{-b \pm \sqrt{\Delta}}{2a}
  • if Δ=0\Delta = 0, it has one solution (a repeated root): x=−b2ax = -\frac{b}{2a},
  • if Δ<0\Delta < 0, it has no real solutions.

Where the formula comes from. Divide the equation by aa and move ca\frac{c}{a} to the right. Then complete the square: add (b2a)2\left(\frac{b}{2a}\right)^2 to both sides, so that the left side becomes a square.

x2+bax=−ca(x+b2a)2=b24a2−ca(x+b2a)2=b2−4ac4a2\begin{aligned} x^2 + \tfrac{b}{a}x &= -\tfrac{c}{a} \\ \left(x + \tfrac{b}{2a}\right)^2 &= \tfrac{b^2}{4a^2} - \tfrac{c}{a} \\ \left(x + \tfrac{b}{2a}\right)^2 &= \tfrac{b^2 - 4ac}{4a^2} \end{aligned}

The right side is Δ4a2\frac{\Delta}{4a^2}, and 4a24a^2 is positive. So everything depends on the sign of Δ\Delta. When Δ≥0\Delta \geq 0, take the square root of both sides:

x+b2a=±Δ2ax=−b±Δ2a\begin{aligned} x + \tfrac{b}{2a} &= \pm\tfrac{\sqrt{\Delta}}{2a} \\ x &= \tfrac{-b \pm \sqrt{\Delta}}{2a} \end{aligned}

The two solutions are Δ2∣a∣\frac{\sqrt{\Delta}}{2|a|} either side of the axis x=−b2ax = -\frac{b}{2a}, just like the amber segments in the lab. When there are solutions, the left side factorises as ax2+bx+c=a(x−x1)(x−x2)ax^2 + bx + c = a(x - x_1)(x - x_2).

When b=0b = 0 or c=0c = 0 you do not need the formula. For x2−9=0x^2 - 9 = 0 write x2=9x^2 = 9, so x=3x = 3 or x=−3x = -3. For x2−5x=0x^2 - 5x = 0 take xx out: x(x−5)=0x(x - 5) = 0, so x=0x = 0 or x=5x = 5.

Example 1: the quadratic formula

Solve 2x2+3x−2=02x^2 + 3x - 2 = 0.

Step 1. Read off a, b and c

We compare the equation with ax2+bx+c=0ax^2 + bx + c = 0, keeping the signs.

a=2,b=3,c=−2a = 2, \quad b = 3, \quad c = -2

Step 2. Work out the discriminant

We put the numbers into Δ=b2−4ac\Delta = b^2 - 4ac. Minus times minus gives a plus.

Δ=32−4⋅2⋅(−2)=9+16=25\begin{aligned} \Delta &= 3^2 - 4 \cdot 2 \cdot (-2) \\ &= 9 + 16 \\ &= \boxed{25} \end{aligned}

Step 3. Take the square root

Δ>0\Delta > 0, so there are two solutions. We need Δ\sqrt{\Delta} for the formula.

Δ=25=5\sqrt{\Delta} = \sqrt{25} = \boxed{5}

Step 4. Use the formula

We put −b=−3-b = -3, Δ=5\sqrt{\Delta} = 5 and 2a=42a = 4 into the formula, once with minus and once with plus.

x1=−3−54=−84=−2x2=−3+54=24=12\begin{aligned} x_1 &= \frac{-3 - 5}{4} = \frac{-8}{4} = -2 \\ x_2 &= \frac{-3 + 5}{4} = \frac{2}{4} = \frac{1}{2} \end{aligned}

Answer

x=−2x = -2 or x=12x = \frac{1}{2}. The parabola y=2x2+3x−2y = 2x^2 + 3x - 2 crosses the xx axis at these two points.

Example 2: a garden bed

A rectangular bed is 3 m longer than it is wide, and its area is 40 m². How wide and how long is it?

Step 1. Write the equation

We call the width xx (in metres). Then the length is x+3x + 3, and the area is width times length.

x(x+3)=40x(x + 3) = 40

Step 2. Bring it to the form with zero on one side

We multiply out the bracket and subtract 4040 from both sides.

x2+3x=40x2+3x−40=0\begin{aligned} x^2 + 3x &= 40 \\ x^2 + 3x - 40 &= 0 \end{aligned}

Step 3. Work out the discriminant

Here a=1a = 1, b=3b = 3 and c=−40c = -40.

Δ=32−4⋅1⋅(−40)=9+160=169\begin{aligned} \Delta &= 3^2 - 4 \cdot 1 \cdot (-40) \\ &= 9 + 160 \\ &= \boxed{169} \end{aligned}

Step 4. Use the formula

169=13\sqrt{169} = 13, and 2a=22a = 2.

x1=−3−132=−8x2=−3+132=5\begin{aligned} x_1 &= \frac{-3 - 13}{2} = -8 \\ x_2 &= \frac{-3 + 13}{2} = 5 \end{aligned}

Step 5. Keep the solution that makes sense

A width cannot be negative, so we reject −8-8. The width is 55 m, and we add 33 to get the length.

x=5x+3=8\begin{aligned} x &= 5 \\ x + 3 &= 8 \end{aligned}

Answer

The bed is 55 m wide and 88 m long. The equation has two solutions, but only one of them fits the problem.

Your turn

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

Hintshow

Here a=−1a = -1, b=2b = 2, c=8c = 8. Work out Δ\Delta first. In the formula the denominator is 2a=−22a = -2, a negative number. You can also multiply the whole equation by −1-1 first: the solutions stay the same.

Solutiontry it on your own first

Step 1. Work out the discriminant

We put a=−1a = -1, b=2b = 2 and c=8c = 8 into Δ=b2−4ac\Delta = b^2 - 4ac.

Δ=22−4⋅(−1)⋅8=4+32=36\begin{aligned} \Delta &= 2^2 - 4 \cdot (-1) \cdot 8 \\ &= 4 + 32 \\ &= \boxed{36} \end{aligned}

Step 2. Take the square root

Δ>0\Delta > 0, so there are two solutions, and the square root of Δ\Delta is a whole number.

Δ=36=6\sqrt{\Delta} = \sqrt{36} = 6

Step 3. Use the formula

The denominator is 2a=−22a = -2. Dividing by a negative number changes the sign.

x1=−2−6−2=−8−2=4x2=−2+6−2=4−2=−2\begin{aligned} x_1 &= \frac{-2 - 6}{-2} = \frac{-8}{-2} = 4 \\ x_2 &= \frac{-2 + 6}{-2} = \frac{4}{-2} = -2 \end{aligned}

Step 4. Check both solutions

We put x=4x = 4 (first line) and x=−2x = -2 (second line) into the left side of the equation.

−16+8+8=0−4−4+8=0\begin{aligned} -16 + 8 + 8 &= 0 \\ -4 - 4 + 8 &= 0 \end{aligned}

Answer

x=4x = 4 or x=−2x = -2. Multiplied by −1-1, the equation is x2−2x−8=0x^2 - 2x - 8 = 0, which is (x−4)(x+2)=0(x - 4)(x + 2) = 0 - the same two solutions.

Common mistakes

  • The sign of −b-b. In x2−4x+3=0x^2 - 4x + 3 = 0, b=−4b = -4, so −b=4-b = 4, not −4-4.
  • Squaring a negative bb. (−4)2=16(-4)^2 = 16, not −16-16. With −16-16 the discriminant of x2−4x+3=0x^2 - 4x + 3 = 0 would come out as −16−12=−28-16 - 12 = -28, and you would wrongly say there are no solutions.
  • Dividing only the square root by 2a2a. The fraction bar covers the whole −b±Δ-b \pm \sqrt{\Delta}. For x2−4x+3=0x^2 - 4x + 3 = 0 the formula gives 4±22\frac{4 \pm 2}{2}, that is 11 and 33. Writing 4±224 \pm \frac{2}{2} gives 33 and 55 instead.
  • Dividing by xx. From x2=5xx^2 = 5x you might divide by xx and get only x=5x = 5. That loses x=0x = 0, because you cannot divide by a number that might be zero. Write x2−5x=0x^2 - 5x = 0, so x(x−5)=0x(x - 5) = 0: the solutions are 00 and 55.
  • Only one square root. x2=9x^2 = 9 has two solutions, 33 and −3-3, because (−3)2=9(-3)^2 = 9 as well.

At GCSE and A-level

In England, GCSE Mathematics asks you to solve quadratic equations algebraically by factorising, by completing the square and by using the quadratic formula. You are expected to know the formula: it is not given in the exam.

A-level Mathematics adds the discriminant of a quadratic function, including the conditions for real and repeated roots - exactly the three cases in the animation. Completing the square is part of the same topic.

In the open textbook Illustrative Mathematics Algebra 1, written for US high schools, the formula is derived by completing the square, as in the definition above.

Check yourself

Test yourself

How many solutions does x2−6x+9=0x^2 - 6x + 9 = 0 have?

What is the discriminant of 2x2+5x−3=02x^2 + 5x - 3 = 0?

What are the solutions of x2−5x=0x^2 - 5x = 0?

For which cc does x2−4x+c=0x^2 - 4x + c = 0 have exactly one solution?

What are the solutions of x2−2x−1=0x^2 - 2x - 1 = 0?

Flashcards for review

Flip a card and say whether you knew the answer. The ones you did not know come back at the end of the deck. Why it pays to come back to them in a few days is explained in the guide Spaced repetition.

Flashcards

  1. What is a quadratic equation?

    An equation ax2+bx+c=0ax^2 + bx + c = 0 in which a≠0a \neq 0.
  2. What does solving ax2+bx+c=0ax^2 + bx + c = 0 mean on the graph?

    Finding where the parabola y=ax2+bx+cy = ax^2 + bx + c meets the xx axis.
  3. What is the discriminant?

    Δ=b2−4ac\Delta = b^2 - 4ac.
  4. How many solutions are there when Δ>0\Delta > 0, Δ=0\Delta = 0 and Δ<0\Delta < 0?

    Two, one and none. With Δ=0\Delta = 0 the parabola touches the xx axis at its vertex; with Δ<0\Delta < 0 it does not reach the axis.
  5. What is the quadratic formula?

    x=−b±Δ2ax = \frac{-b \pm \sqrt{\Delta}}{2a}, where Δ=b2−4ac≥0\Delta = b^2 - 4ac \geq 0.
  6. What is the one solution when Δ=0\Delta = 0?

    x=−b2ax = -\frac{b}{2a} - the vertex lies on the xx axis.
  7. Where do the two solutions lie compared with the axis of symmetry?

    The same distance either side of x=−b2ax = -\frac{b}{2a}: Δ2∣a∣\frac{\sqrt{\Delta}}{2|a|} to the left and to the right.
  8. How do you solve ax2+bx=0ax^2 + bx = 0 without the formula?

    Take xx out: x(ax+b)=0x(ax + b) = 0, so x=0x = 0 or x=−bax = -\frac{b}{a}.
  9. Where does the quadratic formula come from?

    From completing the square: the equation becomes (x+b2a)2=Δ4a2\left(x + \frac{b}{2a}\right)^2 = \frac{\Delta}{4a^2}.
  10. Why should you not divide x2=5xx^2 = 5x by xx?

    Because xx might be 00, and that solution would be lost. Write x(x−5)=0x(x - 5) = 0 instead: x=0x = 0 or x=5x = 5.

Sources

We checked the facts on this page against these sources. All of them may be reused freely: they carry an open licence or are not covered by copyright.

  1. Illustrative Mathematics - Algebra 1, Unit 7, Lesson 16: The Quadratic Formula (the formula for ax² + bx + c = 0 with a not 0; equations without b or without c) · CC BY 4.0
  2. Illustrative Mathematics - Algebra 1, Unit 7, Lesson 18: Applying the Quadratic Formula, Part 2 (mistakes: the sign of −b, dividing only part of the numerator by 2a, squaring negative numbers) · CC BY 4.0
  3. Illustrative Mathematics - Algebra 1, Unit 7, Lesson 19: Deriving the Quadratic Formula (the formula derived by completing the square) · CC BY 4.0
  4. Wikibooks - A-level Mathematics/CIE/Pure Mathematics 1/Quadratics (factorising, completing the square and the formula; the discriminant and the number of real roots) · CC BY-SA 4.0
  5. Wikipedia - Quadratic equation (roots as x-intercepts, the discriminant, symmetry about x = −b/2a, the factored form, equations without b or c) · CC BY-SA 4.0

More explainers