Solve ax² + bx + c = 0

The quadratic formula

For any equation ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) ÷ 2a. The part under the square root, D = b² − 4ac, is the discriminant. It tells you what kind of answers to expect before you do any more work.

Reading the discriminant

If D is positive there are two different real roots. If D is zero there is one repeated root. If D is negative there are no real roots, and the answers are a pair of complex conjugates written a ± bi.

Vertex and graph

The vertex sits at x = −b ÷ 2a, and plugging that back in gives its height. If a is positive the parabola opens upward and the vertex is its lowest point. If a is negative it opens downward and the vertex is the highest point.

Checking your work

Substitute each root back into the original equation. You should get zero, apart from tiny rounding differences. The sum of the roots equals −b ÷ a and the product equals c ÷ a, which is a fast second check.

Worked example

Solve x² − 5x + 6 = 0, where a = 1, b = −5 and c = 6. The discriminant is b² − 4ac = 25 − 24 = 1, which is positive, so there are two real roots: x = (5 ± √1) ÷ 2, which gives x = 3 and x = 2. Check: (3)² − 5(3) + 6 = 0.

The vertex is at x = −b ÷ 2a = 2.5, where y = (2.5)² − 5(2.5) + 6 = −0.25. Since a > 0, the parabola opens upward and −0.25 is its minimum.

Frequently asked questions

What happens when the discriminant is negative?

The roots are complex. For x² + 2x + 5 = 0 the discriminant is 4 − 20 = −16, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i. The parabola never crosses the x-axis.

Should I factor or use the formula?

Factoring is faster when it works with whole numbers. The quadratic formula always works, including when the roots are messy decimals or complex numbers.

What if a = 0?

Then the equation isn’t quadratic: bx + c = 0 is linear, with the single solution x = −c ÷ b.

What does a discriminant of zero mean?

There is exactly one repeated real root, and the vertex touches the x-axis. For example, x² − 6x + 9 = 0 gives x = 3.