How the Quadratic Formula Works — Derivation, Examples, and Common Mistakes

Learn to solve any quadratic equation step by step. Covers the formula, discriminant, complex roots, vertex, and the five mistakes students make most.

The Quick Answer

The quadratic formula solves any equation of the form ax² + bx + c = 0 (where a ≠ 0):

x = (−b ± √(b² − 4ac)) / (2a)

Plug in the coefficients a, b, and c, evaluate the expression under the square root (the discriminant), and you get two solutions. That's it — every quadratic equation reduces to this.

Try it yourself: use our quadratic formula calculator to check your work or explore different equations instantly.

What Is a Quadratic Equation?

A quadratic equation is any equation that can be written as:

ax² + bx + c = 0

where a, b, and c are real numbers and a ≠ 0. The "quadratic" part comes from "quad" (square) — the highest power of x is 2.

Examples of quadratic equations:

  • x² − 5x + 6 = 0 (a=1, b=−5, c=6)
  • 2x² + 7x − 15 = 0 (a=2, b=7, c=−15)
  • x² + 4 = 0 (a=1, b=0, c=4)
  • 3x² − 12x = 0 (a=3, b=−12, c=0)

If a = 0, the x² term disappears and you have a linear equation (bx + c = 0), which has exactly one solution: x = −c/b.

The Discriminant: How Many Solutions?

Before you finish the formula, the expression under the square root — Δ = b² − 4ac — tells you what kind of solutions to expect:

  • Δ > 0: Two distinct real roots. The parabola crosses the x-axis at two points.
  • Δ = 0: One repeated real root (also called a "double root"). The parabola just touches the x-axis.
  • Δ < 0: No real roots — two complex conjugate roots instead. The parabola never crosses the x-axis.

This is useful because you can check the discriminant first to know what form your answer will take.

Worked Example 1: Two Real Roots

Solve x² − 5x + 6 = 0

  1. Identify coefficients: a = 1, b = −5, c = 6
  2. Calculate the discriminant: Δ = (−5)² − 4(1)(6) = 25 − 24 = 1
  3. Since Δ > 0, there are two distinct real roots
  4. Apply the formula:
    • x₁ = (−(−5) + √1) / (2 × 1) = (5 + 1) / 2 = 3
    • x₂ = (−(−5) − √1) / (2 × 1) = (5 − 1) / 2 = 2

Solutions: x = 3 and x = 2

Quick check: (x − 3)(x − 2) = x² − 5x + 6 ✓

Worked Example 2: One Repeated Root

Solve x² − 6x + 9 = 0

  1. a = 1, b = −6, c = 9
  2. Δ = (−6)² − 4(1)(9) = 36 − 36 = 0
  3. Since Δ = 0, there is one repeated root
  4. x = −(−6) / (2 × 1) = 6 / 2 = 3

Solution: x = 3 (repeated)

This makes sense: x² − 6x + 9 = (x − 3)², a perfect square.

Worked Example 3: Complex Roots

Solve x² + 2x + 5 = 0

  1. a = 1, b = 2, c = 5
  2. Δ = (2)² − 4(1)(5) = 4 − 20 = −16
  3. Since Δ < 0, the roots are complex
  4. Real part: −b / (2a) = −2 / 2 = −1
  5. Imaginary part: √|Δ| / (2a) = √16 / 2 = 2
  6. x₁ = −1 + 2i, x₂ = −1 − 2i

Solutions: x = −1 ± 2i

The parabola y = x² + 2x + 5 never crosses the x-axis — its vertex is at (−1, 4), entirely above it.

Worked Example 4: Non-Unit Leading Coefficient

Solve 2x² + 7x − 15 = 0

  1. a = 2, b = 7, c = −15
  2. Δ = 7² − 4(2)(−15) = 49 + 120 = 169
  3. √169 = 13
  4. x₁ = (−7 + 13) / (2 × 2) = 6 / 4 = 1.5
  5. x₂ = (−7 − 13) / (2 × 2) = −20 / 4 = −5

Solutions: x = 1.5 and x = −5

Where the Formula Comes From: Completing the Square

The quadratic formula isn't magic — it's derived from a technique called completing the square. Here's the full derivation:

Start with: ax² + bx + c = 0

Step 1: Divide by a: x² + (b/a)x + c/a = 0

Step 2: Move the constant: x² + (b/a)x = −c/a

Step 3: Take half the coefficient of x, square it, and add to both sides:

x² + (b/a)x + (b/(2a))² = −c/a + (b/(2a))²

Step 4: The left side is now a perfect square:

(x + b/(2a))² = (b² − 4ac) / (4a²)

Step 5: Take the square root of both sides:

x + b/(2a) = ±√(b² − 4ac) / (2a)

Step 6: Solve for x:

x = (−b ± √(b² − 4ac)) / (2a)

Every step is reversible algebra — no tricks, no assumptions. That's why the formula works for every quadratic equation.

Vertex and Axis of Symmetry

Every quadratic equation y = ax² + bx + c describes a parabola. Two key features:

Vertex (the turning point):

  • x-coordinate: x = −b/(2a)
  • y-coordinate: substitute the x-value back into the equation

If a > 0, the parabola opens upward and the vertex is a minimum. If a < 0, it opens downward and the vertex is a maximum.

Axis of symmetry: The vertical line x = −b/(2a). The parabola is a mirror image on either side of this line, and the two roots (if they exist) are equidistant from it.

Example: For x² − 5x + 6 = 0:

  • Vertex x = −(−5)/(2×1) = 2.5
  • Vertex y = (2.5)² − 5(2.5) + 6 = 6.25 − 12.5 + 6 = −0.25
  • Vertex: (2.5, −0.25)
  • Roots x = 2 and x = 3 are each 0.5 away from x = 2.5 ✓

Sum and Product of Roots

Two useful relationships that work for any quadratic equation ax² + bx + c = 0:

  • Sum of roots: x₁ + x₂ = −b/a
  • Product of roots: x₁ × x₂ = c/a

These come from the factored form: a(x − x₁)(x − x₂) = ax² − a(x₁ + x₂)x + a(x₁x₂).

Use them to verify your solutions quickly. For x² − 5x + 6 = 0:

  • Sum: 3 + 2 = 5 = −(−5)/1 ✓
  • Product: 3 × 2 = 6 = 6/1 ✓

Alternative Methods

The quadratic formula always works, but sometimes other methods are faster:

Factoring — If you can spot the factors, this is fastest. Works well when the roots are integers or simple fractions. Example: x² − 5x + 6 = (x − 2)(x − 3).

Completing the square — Useful when you need the vertex form y = a(x − h)² + k. The quadratic formula is actually just a generalized version of this method.

Graphing — Plot y = ax² + bx + c and read off the x-intercepts. Good for estimation, but imprecise for exact answers.

Square root method — When b = 0 (like x² = 9), just take the square root of both sides: x = ±3.

The quadratic formula is the reliable fallback: it works even when factoring is difficult, and it handles complex roots automatically.

Five Common Mistakes (and How to Avoid Them)

1. Sign error with −b If b = −5, then −b = −(−5) = +5. Students often write −5 instead. Write out the substitution explicitly: "−(−5) = 5."

2. Dividing only part of the numerator by 2a Wrong: x = −b ± √Δ / 2a (this divides only √Δ by 2a) Right: x = (−b ± √Δ) / (2a) (divide the entire numerator)

3. Forgetting ± gives two solutions The ± sign means you need to compute both x₁ (with +) and x₂ (with −). Missing one gives only half the answer.

4. Rounding the discriminant too early If Δ = 17, keep √17 in your calculation until the final step. Rounding √17 ≈ 4.12 partway through introduces error.

5. Using the formula when a = 0 If a = 0, you're dividing by zero. Check first — if a = 0, the equation is linear and has one solution: x = −c/b.

When Do You Actually Use This?

Quadratic equations appear everywhere:

  • Physics: projectile motion (height = −½gt² + v₀t + h₀), finding when an object hits the ground
  • Engineering: optimization problems, circuit analysis
  • Economics: maximizing revenue (Revenue = price × quantity, where demand is linear)
  • Geometry: finding dimensions when area is known (length × width = area, with a constraint)
  • Computer science: algorithm analysis, solving recurrences

The formula gives exact, analytical solutions — no guessing, no iteration.

Frequently Asked Questions

What is the quadratic formula used for? It solves any quadratic equation ax² + bx + c = 0 for x. It's guaranteed to find all solutions (real or complex), unlike factoring which only works when the roots are "nice" numbers.

Is the quadratic formula always correct? Yes, for any quadratic equation (a ≠ 0). It's algebraically derived, so it works with any real or complex coefficients. Errors come from arithmetic mistakes when applying it, not from the formula itself.

Can a quadratic equation have three roots? No. By the Fundamental Theorem of Algebra, a degree-2 polynomial has exactly 2 roots (counting multiplicity and complex roots). A repeated root counts as 2 roots with the same value.

What does the ± sign mean? It means "plus or minus" — you compute two values: one with + and one with −. These give the two solutions to the equation.

How do complex roots work? When the discriminant is negative, the square root of a negative number involves i (the imaginary unit, where i² = −1). The two roots are always complex conjugates: a + bi and a − bi.

What is the fastest way to solve a quadratic equation? Try factoring first (especially if coefficients are small integers). If that doesn't work quickly, use the quadratic formula. For equations where b = 0 (like x² = 25), just take the square root directly.

Does every parabola cross the x-axis? No. If the discriminant is negative, the parabola is entirely above (when a > 0) or entirely below (when a < 0) the x-axis.

What is the relationship between the quadratic formula and the graph? The roots from the formula are the x-intercepts of the parabola y = ax² + bx + c. The vertex is at x = −b/(2a), and the discriminant tells you whether the parabola crosses the x-axis at all.

Can I use the quadratic formula for higher-degree equations? Not directly. The quadratic formula is specific to degree-2 equations. There are formulas for cubic (degree-3) and quartic (degree-4) equations, but they are much more complex. For degree 5 and above, no general formula exists (Abel-Ruffini theorem).

How do I check my answer? Substitute each root back into the original equation. If ax² + bx + c = 0 for that x-value, the answer is correct. You can also verify that the sum of roots equals −b/a and the product equals c/a.

Related Tools