The one formula that solves every quadratic
A quadratic equation — anything of the form ax² + bx + c = 0 with a not zero — describes a parabola, and the points where that parabola crosses the x-axis are its roots. Some quadratics factorise neatly and some stubbornly do not, but all of them yield to the same machine: the quadratic formula, which is completing the square done once, in general, so it never has to be done again. This page runs that machine in the open — the discriminant is computed and judged first, because it decides what kind of answer exists before any root is calculated — and then proves the roots with the sum-and-product check that belongs to every quadratic, the same habit of checking an answer against the question that the exponent calculator applies with its log check.
The formulas, with every term defined
x = (−b ± √(b² − 4ac)) ÷ (2a)Discriminant D = b² − 4ac · Vertex x = −b ÷ (2a) · Sum of roots = −b ÷ a · Product of roots = c ÷ a
Read it in words. The a, b and c are the coefficients in standard form, signs included. The expression under the root, the discriminant, is the whole story of the roots in one number: if D is positive there are two distinct real roots; if D is exactly zero the two roots merge into one repeated root and the parabola just touches the axis; if D is negative the root of a negative number is required, so there are no real roots at all — instead a pair of complex roots, mirror images of each other. The ± in the formula is what produces the pair: add the root of D for one root, subtract it for the other. The vertex formula places the parabola's turning point, which always sits exactly halfway between the roots — at x = −b ÷ (2a) — which is why the roots are symmetric about it. And the last two relations (Vieta's formulas) are the built-in proof: whatever the formula returns, the roots must add to −b ÷ a and multiply to c ÷ a, or the arithmetic went wrong somewhere.
Worked example: x² − 5x + 6 = 0
The defaults above enter a = 1, b = −5, c = 6. First the discriminant: D = (−5)² − 4 × 1 × 6 = 25 − 24 = 1 — positive, so two distinct real roots exist. The formula gives x = (5 ± √1) ÷ 2 = (5 ± 1) ÷ 2, so the roots are x = 3 and x = 2. Both checks close: the roots sum to 3 + 2 = 5 = −b ÷ a, and multiply to 3 × 2 = 6 = c ÷ a. Substituting back is the third check: 3² − 5 × 3 + 6 = 9 − 15 + 6 = 0, and 2² − 10 + 6 = 0. The vertex sits halfway between the roots at x = 2.5, where y = 6.25 − 12.5 + 6 = −0.25 — the parabola dips a quarter of a unit below the axis between its two crossings, which is exactly what two close roots should look like, and the chart near the top draws the pieces as bars.
One family of equations, every kind of root
| Equation | Discriminant | Roots | Vertex |
|---|---|---|---|
| x² − 5x + 6 = 0 (worked example) | 1 | 3, 2 | (2.5, −0.25) |
| x² − 3x + 2 = 0 | 1 | 2, 1 | (1.5, −0.25) |
| x² − 4 = 0 | 16 | 2, −2 | (0, −4) |
| 2x² − 7x + 3 = 0 | 25 | 3, 0.5 | (1.75, −3.125) |
| 2x² + 4x + 2 = 0 | 0 | −1 (double) | (−1, 0) |
| 3x² − 6x + 3 = 0 | 0 | 1 (double) | (1, 0) |
| x² + 2x + 5 = 0 | −16 | −1 + 2i, −1 − 2i | (−1, 4) |
Read the table by discriminant. The positive rows cross the axis twice, and when D is a perfect square (1, 16, 25) the roots come out as whole numbers or tidy fractions — those are the quadratics that would have factorised, and spotting a square discriminant is the quick way to know factoring was possible. The zero rows are perfect squares in disguise: 2x² + 4x + 2 is 2(x + 1)², so its single root sits exactly on the vertex, which is why both zero rows have a vertex y of exactly 0. The negative row never touches the axis at all — its vertex floats 4 units above it — and its complex roots still obey the checks: (−1 + 2i) + (−1 − 2i) = −2 = −b ÷ a, and their product is 1 + 4 = 5 = c ÷ a. The discriminant is doing the same job the square root calculator does when it refuses the root of a negative number — here, though, the refusal is information: a negative D is a proved statement that no real root exists, not a gap in the method.
Reading a quadratic answer honestly — the limits
Four cautions belong with any result here. Standard form first: the formula only reads coefficients correctly when everything is on one side and equal to zero — x² = 5x − 6 must be rearranged to x² − 5x + 6 = 0 before a, b and c are read off, and moving a term flips its sign. Most wrong quadratic answers are right answers to a misread equation. Signs travel with their terms: in the worked example b is −5, and entering 5 instead returns the roots of x² + 5x + 6 (−2 and −3) — the sum check exposes it at once, because −2 + −3 does not equal the −b ÷ a of the equation you meant. No real roots is a real answer: when D is negative this page reports the complex pair rather than hiding it, but in a physical problem (a length, a time, an area) a negative discriminant usually means the situation described cannot happen — a projectile that never reaches that height — and the complex roots themselves carry no physical meaning there. And rounded roots are approximate roots: irrational answers are shown to four decimal places, so substituting a rounded root back gives a value near zero, not exactly zero; the calculator keeps full precision internally, and the sum-and-product checks are computed from the unrounded roots, which is why they close exactly.
Frequently asked questions
What is the quadratic formula, in plain words?
The single formula that solves every equation of the form ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) ÷ (2a). It is completing the square carried out once in general symbols, so no quadratic ever needs a special trick — factorable or not, the formula returns its roots. On the worked example it gives (5 ± 1) ÷ 2, the roots 3 and 2.
What does the discriminant tell me?
Everything about the roots before you calculate them. D = b² − 4ac: positive means two distinct real roots, zero means one repeated root (the parabola touches the axis at its vertex), and negative means no real roots — the parabola never crosses the axis, and the roots are a complex pair. It also predicts factorability: a perfect-square discriminant, like the 25 in 2x² − 7x + 3, means the roots are rational.
How do I check my roots are right?
Two independent checks, both printed with every result. The roots must sum to −b ÷ a and multiply to c ÷ a (Vieta's formulas) — 3 + 2 = 5 and 3 × 2 = 6 on the worked example. Or substitute a root back into the original equation: at x = 3, 9 − 15 + 6 = 0, as it must. If either check fails, the coefficients were almost certainly read off with a wrong sign.
Why can a quadratic have no real roots?
Because its parabola never reaches the x-axis. With a positive a and a vertex above the axis — x² + 2x + 5 has its vertex at (−1, 4) — the curve floats entirely above zero, so the equation equals zero nowhere in real numbers. The formula reports the complex pair −1 ± 2i instead, which is the complete answer in complex arithmetic and, in a physical problem, the signal that the described event does not occur.
What is a double root?
The borderline case where the two roots merge into one, which happens exactly when the discriminant is zero. The parabola touches the axis at a single point — its vertex — instead of crossing it. 2x² + 4x + 2 = 0 has the double root x = −1: the equation is 2(x + 1)² = 0 in disguise, and the root −1 counted twice still satisfies the checks, summing to −2 = −b ÷ a with product 1 = c ÷ a.
