The Quadratic Formula Explained: Discriminant, Roots, and Worked Examples
The quadratic formula solves any quadratic equation in one substitution — and its discriminant tells you the shape of the answer before you compute it. This guide works all three cases and derives the formula from scratch.
The quadratic formula is the most reliable sentence in algebra. Given any equation of the form ax squared plus bx plus c equals zero, with a never zero, it hands you the solutions in one substitution — no factoring search, no completing-the-square manipulation, the same steps every time. But the formula is more than a procedure. The expression under its square root, the discriminant, previews the answer before any solving happens: two roots, one root, or a complex pair. And the formula itself is not magic handed down from nowhere — it is completing the square carried out once, with letters instead of numbers. This guide states the formula, reads each part, works all three cases with full arithmetic, derives the formula step by step, and connects it to the vertex and the graph, so the formula becomes something you understand rather than something you recite.
- The formula is x = (−b ± √(b² − 4ac)) ÷ 2a. Substitute a, b, and c, compute the discriminant, and the ± gives both roots.
- The discriminant D = b² − 4ac decides the answer in advance: positive means two distinct real roots, zero means one repeated root, negative means a complex conjugate pair.
- The formula comes from completing the square on the general equation. The same numbers give the vertex (h = −b ÷ 2a) and the axis of symmetry.
The formula itself
The quadratic formula solves ax² + bx + c = 0, with a ≠ 0, as x equals negative b, plus or minus the square root of b squared minus 4ac, all divided by 2a. In symbols: x = (−b ± √(b² − 4ac)) ÷ 2a. Three numbers go in — the coefficients a, b and c read straight off the equation — and two answers come out, one from each branch of the ±. The ± is the fork in the road: the plus branch adds the square root, the minus branch subtracts it, and the two branches are the two roots. The single exception is when the square root is zero, and the fork rejoins into one repeated root, as the discriminant section shows.
Reading a, b and c correctly is most of the work. In x² − 3x + 2 = 0, a is 1, b is −3, and c is 2. In 2x² − 4x − 6 = 0, a is 2, b is −4, and c is −6. In −x² + 4x − 3 = 0, a is −1, b is 4, and c is −3 — the leading minus sign belongs to a, and losing it changes every number that follows. If an equation is not already in standard form, rearrange it first: move every term to one side so the equation equals zero, combine like terms, and only then read the coefficients. The formula assumes standard form, and feeding it unarranged coefficients is the most common source of wrong answers that are not arithmetic errors at all.
Two sign rules deserve emphasis before any worked example. First, b enters the formula negated: the formula starts with −b, so a b of −3 becomes +3, and a b of 4 becomes −4. Second, the discriminant uses b squared, so the sign of b vanishes there — (−3)² and 3² are both 9 — but the sign of the whole discriminant depends on subtracting 4ac, where the signs of a and c matter. Keep the two rules separate in your mind: negation happens outside the root, squaring happens inside it.
The discriminant: the answer previewed
The discriminant is D = b² − 4ac, the expression under the square root in the formula. It earns its name: it discriminates between the three kinds of answer before you compute any root. Because the formula takes the square root of D, the sign of D decides what kind of number comes out. A positive D has a real square root, so the ± produces two distinct real numbers. A zero D has square root zero, so both branches land on the same value. A negative D has no real square root, so the roots are a complex conjugate pair. Compute D first, every time — it tells you what to expect, and an unexpected D is an early warning that a coefficient was misread.
| Discriminant | Roots | Graph |
|---|---|---|
| D > 0 | Two distinct real roots | Parabola crosses the x-axis twice |
| D = 0 | One repeated root | Parabola touches the x-axis at the vertex |
| D < 0 | Complex conjugate pair | Parabola never touches the x-axis |
| D a perfect square | Rational roots | Equation factors neatly by hand |
The perfect-square row is a bonus signal rather than a fourth case. When a, b and c are rational and D is a perfect square — 1, 4, 9, 16, 25, and so on — the square root is rational, the roots are rational, and the equation would have factored neatly. D = 1 in x² − 3x + 2 = 0 is why that equation factors as (x − 1)(x − 2). D = 64 in 2x² − 4x − 6 = 0 is why that equation factors as 2(x − 3)(x + 1). When D is positive but not a perfect square, the roots are irrational — still exact as expressions with a square root, and the calculator’s decimal display is an approximation of them, rounded to at most four decimal places on the hub page.
The discriminant also answers questions without solving. Asked whether x² + 2x + 5 = 0 has real solutions? D is 4 − 20, which is −16, so no — and no further work is needed. Asked how many times y = x² − 6x + 9 touches the axis? D is 36 − 36, which is 0, so exactly once, at the vertex. A single subtraction settles each question, which is why the discriminant is worth computing even when the question is not asking for the roots at all.
Worked example: two real roots
Solve x² − 3x + 2 = 0. Read the coefficients: a = 1, b = −3, c = 2. Compute the discriminant: D = (−3)² − 4 × 1 × 2 = 9 − 8 = 1. D is positive, so two distinct real roots are guaranteed before any further arithmetic. Substitute into the formula: x = (3 ± √1) ÷ 2, because −b is 3. The plus branch gives (3 + 1) ÷ 2 = 2. The minus branch gives (3 − 1) ÷ 2 = 1. The roots are x = 2 and x = 1. Check by substitution: 4 − 6 + 2 is 0, and 1 − 3 + 2 is 0. The parabola crosses the axis at 1 and 2, bottoms out at the vertex (1.5, −0.25), and the whole picture agrees.
Now a case where a is not 1 and the arithmetic is heavier. Solve 2x² − 4x − 6 = 0. The coefficients are a = 2, b = −4, c = −6. The discriminant is D = (−4)² − 4 × 2 × (−6) = 16 + 48 = 64 — note how subtracting a negative becomes adding, the step where sign errors breed. D is a perfect square, so rational roots are expected. The formula gives x = (4 ± √64) ÷ 4 = (4 ± 8) ÷ 4. The plus branch gives 12 ÷ 4 = 3. The minus branch gives −4 ÷ 4 = −1. Check: 2 × 9 − 12 − 6 is 0, and 2 × 1 + 4 − 6 is 0. Dividing the original equation by 2 first would have given x² − 2x − 3 = 0, with the same roots — simplifying first is always allowed, and it shrinks the numbers the formula has to carry.
Worked example: one repeated root
Solve x² + 2x + 1 = 0. The coefficients are a = 1, b = 2, c = 1. The discriminant is D = 4 − 4 = 0. The formula gives x = (−2 ± √0) ÷ 2 = −2 ÷ 2 = −1, from both branches at once. The single solution x = −1 is called a repeated, or double, root: the equation is really (x + 1)² = 0, and the parabola touches the x-axis at its vertex, (−1, 0), without crossing. Counting multiplicity, the equation still has two roots — they happen to be the same number twice — which is why the formula’s ± produces one visible answer instead of two.
Repeated roots are easy to misread as errors. A student who finds only one root may assume a step was missed, when in fact D = 0 is the complete answer. The discriminant said so in advance: zero means one repeated root, full stop. The same pattern appears whenever an equation is a perfect square in disguise — 4x² + 12x + 9 = 0 is (2x + 3)² = 0, with D = 144 − 144 = 0 and the repeated root x = −3/2. Recognise the perfect square, and the repeated root is expected rather than surprising.
Worked example: complex roots
Solve x² + 1 = 0. The coefficients are a = 1, b = 0, c = 1. The discriminant is D = 0 − 4 = −4. No real number squares to −4, so there are no real roots, and the parabola y = x² + 1 floats entirely above the x-axis, its lowest point at (0, 1). The formula still works if complex numbers are allowed: x = (0 ± √(−4)) ÷ 2 = ±2i ÷ 2 = 0 ± 1i. The roots are x = 0 + 1i and x = 0 − 1i, a conjugate pair — same real part, opposite imaginary parts. Complex roots always come in conjugate pairs when the coefficients are real, which is a useful check: a lone complex root with real coefficients is impossible.
A richer complex example: solve x² − 2x + 5 = 0. The coefficients are a = 1, b = −2, c = 5. The discriminant is D = 4 − 20 = −16. The formula gives x = (2 ± √(−16)) ÷ 2 = (2 ± 4i) ÷ 2 = 1 ± 2i. Check the plus root by substitution: (1 + 2i)² − 2(1 + 2i) + 5 expands to (1 + 4i − 4) − 2 − 4i + 5, which is 0. The graph never touches the axis — the vertex is at (1, 4), above it — and the complex roots are the formula’s way of saying so in the language of complex numbers. The hub calculator displays complex roots in the form a ± bi, exactly as worked here.
Where the formula comes from: completing the square
The formula is completing the square, done once, in general. Start with ax² + bx + c = 0 and divide everything by a, which is allowed because a is not zero: x² + (b/a)x + c/a = 0. Move the constant to the other side: x² + (b/a)x = −c/a. Now complete the square: half of b/a is b/2a, and its square is (b/2a)². Add that square to both sides, so the left side becomes the perfect square (x + b/2a)²: the equation reads (x + b/2a)² = (b/2a)² − c/a. Put the right side over the common denominator 4a²: it becomes (b² − 4ac) ÷ 4a². Take the square root of both sides: x + b/2a = ±√(b² − 4ac) ÷ 2a. Subtract b/2a from both sides, and the quadratic formula stands: x = (−b ± √(b² − 4ac)) ÷ 2a.
Every part of the formula is born in this derivation, and seeing the birth explains the parts. The discriminant appears when the right side is put over 4a² — it is the numerator that decides whether the square root is real. The ± appears when the square root is taken — it is the two square roots of one number. The 2a in the denominator comes from the same 4a², square-rooted. And the b/2a term explains the vertex: the completed square (x + b/2a)² is zero when x = −b/2a, which is exactly the axis of symmetry and the vertex’s x-coordinate. The formula and the graph are the same fact read two ways, which is why the derivation is worth working once even if you never derive it again.
Vertex, axis, and intercept from the same numbers
The numbers that solve the equation also describe the graph, with no extra work. The axis of symmetry is x = −b ÷ 2a. The vertex sits on that axis: substitute x = −b ÷ 2a back into the equation for the y-coordinate, or read it from vertex form. For x² − 3x + 2, the axis is x = 3 ÷ 2 = 1.5, and the vertex is (1.5, −0.25), a minimum because a is positive. The y-intercept is c, the value of the function at x = 0 — here 2, where the curve crosses the y-axis. The roots, when real, are where the curve crosses the x-axis. Four numbers — two roots, a vertex, an intercept — all from the same three coefficients.
Vertex form packages the same information as y = a(x − h)² + k, where (h, k) is the vertex. For x² − 3x + 2, completing the square gives (x − 1.5)² − 0.25, so h is 1.5 and k is −0.25. For −x² + 4x − 3, the axis is x = 2, the vertex is (2, 1) — a maximum, because a is negative — and the vertex form is −(x − 2)² + 1. The maximum value of that function is 1, attained at x = 2, and the roots are 1 and 3, from factoring as (x − 1)(x − 3) = 0. When a question asks for a maximum or minimum value, the vertex is the answer, and the formula’s b/2a term is the shortest route to it.
Common errors with the formula
Sign errors dominate. The b in −b must be negated, so b = −3 gives +3 outside the root, while the discriminant’s b² is always positive. The 4ac term is subtracted, so when a and c have opposite signs, subtracting a negative adds — 2x² − 4x − 6 gives D = 16 + 48, not 16 − 48. The denominator is 2a, the whole of 2a: dividing by 2 and then by a separately, or forgetting the a, breaks both roots. Write the substitution with brackets — x = (−(−3) ± √((−3)² − 4 × 1 × 2)) ÷ (2 × 1) — and the brackets will police the signs for you.
The remaining errors are structural. Feeding the formula coefficients from an equation that is not in standard form, with terms on both sides or uncombined, produces roots of a different equation. Forgetting the ± loses the second root — or, with D = 0, invents a worry where there is none. And rounding too early, especially the square root of a non-perfect-square discriminant, compounds through both branches: keep the exact root as long as possible, and round only the final answers. The Quadratic Formula Calculator shows each step with the substitution visible, which makes the sign discipline easy to audit against your own working.
Frequently asked questions
How do you use the quadratic formula?
Write the equation in standard form ax² + bx + c = 0, read off a, b, and c, and substitute into x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 3x + 2 = 0: a = 1, b = −3, c = 2, so D = 9 − 8 = 1 and x = (3 ± 1) ÷ 2, giving x = 2 and x = 1. Mind the signs: b enters negated, so −3 becomes +3.
What does the discriminant tell you about the roots?
The discriminant D = b² − 4ac previews the answer. D > 0 means two distinct real roots; D = 0 means one repeated root; D < 0 means no real roots, but a complex conjugate pair. If D is a perfect square and the coefficients are rational, the roots are rational and the equation factors neatly. Compute D first — it tells you what to expect.
What happens when the discriminant is negative?
The equation has no real solutions, because the square root of a negative number does not exist on the real number line, and the parabola never touches the x-axis. The solutions still exist as complex numbers: x² + 1 = 0 gives x = 0 + 1i and x = 0 − 1i, and x² − 2x + 5 = 0 gives x = 1 ± 2i. Complex roots with real coefficients always come in conjugate pairs.
How is the quadratic formula derived?
By completing the square on the general equation. Divide ax² + bx + c = 0 by a, move the constant over, and add (b/2a)² to both sides to make the left side the perfect square (x + b/2a)². The right side becomes (b² − 4ac) ÷ 4a². Taking square roots and rearranging gives x = (−b ± √(b² − 4ac)) ÷ 2a. The discriminant, the ±, and the 2a are all born in this derivation.
How do you find the vertex using the quadratic formula?
The vertex sits on the axis of symmetry at x = −b ÷ 2a — the same b/2a term that appears in the derivation. Substitute that x back into the equation for the y-coordinate. For x² − 3x + 2, x = 3 ÷ 2 = 1.5 and y = −0.25, so the vertex is (1.5, −0.25). It is a minimum when a is positive and a maximum when a is negative.
Why does the quadratic formula give two answers?
Because the ± in the formula is a fork: one branch adds √D and the other subtracts it, producing the two roots — the two places the parabola can cross the x-axis. The only exception is D = 0, where √D is zero and both branches land on the same value, the single repeated root x = −b ÷ 2a.
Try it on the calculator
Enter any three coefficients and see both roots, the discriminant, the vertex, and the parabola — worked out step by step.
Open the Quadratic Formula Calculator →- 1Quadratic Equations Explained: Factoring, Completing the Square, and the Formula
All four solving methods compared: factoring, the square-root method, completing the square, and the formula.
- 2Algebra Calculator
Equations, solved.
- 3Slope Calculator
Rise over run.
- 4Square Root Calculator
Any root, fast.
- 5GCF Calculator
Greatest common factor.
