How to solve a quadratic equation
- Rearrange your equation so one side is 0: ax² + bx + c = 0.
- Type a, b and c. Use negative numbers for minus signs, and 0 for a missing term.
- The roots appear with the discriminant, the formula with your numbers, the factored form and the vertex.
The quadratic formula
x = (−b ± √(b² − 4ac)) ÷ 2a. The part under the root, the discriminant Δ = b² − 4ac, tells you what kind of roots to expect: Δ > 0 gives two different real roots, Δ = 0 gives one repeated root (the parabola touches the x-axis), and Δ < 0 gives two complex roots, written p ± qi.
Example: x² − 3x + 2 = 0 has a = 1, b = −3, c = 2. Δ = 9 − 8 = 1, so x = (3 ± 1) ÷ 2, giving x = 1 and x = 2, and the factored form (x − 1)(x − 2) = 0. The vertex is at x = −b ÷ 2a = 1.5, where y = −0.25.
Other methods, such as factoring and completing the square, give the same answers; the formula works every time. To see the parabola, plot it in the function grapher. Results use double-precision arithmetic and are shown to 10 significant figures.
FAQ
What if a is 0?
Then the equation is linear, bx + c = 0, and the solver gives the single root x = −c/b.
What does a negative discriminant mean?
There are no real solutions; the parabola never crosses the x-axis. The roots are complex conjugates.
How do I solve x² = 16?
Rewrite it as x² − 16 = 0: a = 1, b = 0, c = −16. The roots are −4 and 4.