Math Playground
Algebra

Quadratic formula

x = (−b ± √(b² − 4ac)) / 2a — solves every quadratic.

The quadratic formula solves any equation of the form ax² + bx + c = 0.

Drag the sliders
-426x = 2x = 3(2.5, -0.25)
y = a·x·x + b·x + c

Reading the quadratic

  • The marked roots are the solutions of ax² + bx + c = 0 — where the curve crosses the x-axis.
  • The discriminant b² − 4ac counts them: positive ⇒ 2 roots, zero ⇒ 1 (a touch), negative ⇒ none (curve misses the axis).
  • The marked vertex sits at x = −b/(2a), midway between the roots.
Your turn

Solve x² − 5x + 6 = 0 with the formula.

Watch out

Don't forget the ± — a quadratic usually has two solutions. And the formula needs the equation set to = 0 first; rearrange before reading off a, b, c.

Quadratic formula
Try it

x² − 5x + 6 = 0

a=1, b=−5, c=6. x = (5 ± √(25−24))/2 = (5±1)/2 = 3 or 2.

The discriminant b² − 4ac tells you how many real roots: positive = 2, zero = 1, negative = 0.