Core answer: To solve ax²+bx+c=0 (a≠0): ① compute the discriminant Δ=b²−4ac; ② apply the quadratic formula x=(−b±√Δ)/2a. Δ>0 → two distinct real roots, Δ=0 → one repeated root, Δ<0 → a conjugate complex pair. Example: 2x²−7x+3=0, Δ=49−24=25, x=(7±5)/4 → x₁=3, x₂=0.5.

The quadratic formula and discriminant

For the general form ax² + bx + c = 0 (a ≠ 0):

Δ = b² − 4ac, x = (−b ± √Δ) ÷ 2a

The discriminant tells you how many real roots exist before you even take the square root — always compute it first.

Three cases of the discriminant

DiscriminantRootsParabola vs x-axisExample
Δ > 0two distinct real roots2 intersectionsx²−3x+2=0 → 1, 2
Δ = 0one repeated root1 (tangent)x²−4x+4=0 → x=2
Δ < 0no real roots; complex pair0x²+2x+5=0 → −1±2i

Derivation by completing the square

The formula comes from completing the square, not from thin air:

  1. Divide by a: x² + (b/a)x + c/a = 0
  2. Move the constant: x² + (b/a)x = −c/a
  3. Add (b/2a)² to both sides: (x + b/2a)² = (b²−4ac)/4a²
  4. Take the square root and rearrange → x = (−b ± √Δ)/2a

The same technique rewrites y=ax²+bx+c in vertex form y=a(x−h)²+k with vertex (−b/2a, c−b²/4a).

Worked example 1: two distinct roots

Solve 2x² − 7x + 3 = 0:

  1. a=2, b=−7, c=3
  2. Δ = (−7)² − 4×2×3 = 49 − 24 = 25 > 0
  3. x = (7 ± 5) ÷ 4
  4. x₁ = 12/4 = 3, x₂ = 2/4 = 0.5

Check: 2×9 − 21 + 3 = 0 ✓. This one also factors as (2x−1)(x−3)=0 — faster when you spot it.

Worked example 2: repeated and complex roots

Repeated root: x² − 4x + 4 = 0, Δ = 16 − 16 = 0, x = 4/2 = 2 (double root), i.e. (x−2)²=0.

Complex roots: x² + 2x + 5 = 0, Δ = 4 − 20 = −16 < 0 — no real solution; in complex numbers x = (−2 ± 4i)/2 = −1 ± 2i.

Checking roots with Vieta's formulas

You can verify roots without re-solving:

RelationFormulaCheck (x₁=3, x₂=0.5)
Sum of rootsx₁+x₂ = −b/a3.5 = 7/2 ✓
Product of rootsx₁·x₂ = c/a1.5 = 3/2 ✓

Reverse uses: find the other root given one, build an equation from two desired roots, or evaluate symmetric expressions like x₁²+x₂² = (x₁+x₂)² − 2x₁x₂ without solving.

Common mistakes and myths

  • Copying the sign of b wrong: in 2x²−7x+3=0, b=−7 so the numerator has −b=+7. Write down a, b, c with their signs before substituting.
  • "Δ<0 means I made an error" — no, it simply means the parabola never crosses the x-axis; a conjugate complex pair still exists.
  • Applying the formula when a=0 — then it is a linear equation; the denominator 2a would be zero. Just solve by rearranging.
  • Forgetting the ± — when Δ>0 there are always two roots; dropping one loses half the answer.

Use the [Quadratic Equation Calculator](/c/math/quadratic) for instant roots, discriminant and vertex, with the parabola graphed alongside.