Quadratic Equation Solver
real & complex roots, step by step
The geometry of roots and fields 🖖
The quadratic formula is more than an algebraic trick — it is a mapping of symmetry. In the standard form, x = -b/(2a) represents the axis of symmetry, the central spine of the parabola. The term under the square root, b² - 4ac, is the discriminant Δ. It measures how far the parabola's vertex is from the x-axis. When Δ > 0, the parabola crosses the axis at two distinct points, symmetric about the vertex. When Δ = 0, the vertex sits exactly on the axis, yielding a repeated root. And when Δ < 0, the parabola floats above or below the axis, its roots departing into the complex plane as a conjugate pair. In modern mathematics, this simple formula is the foundation of field theory: solving quadratic equations requires extending the rational numbers to include radicals, showing how geometry and algebra are fundamentally unified.
A shortcut to check your roots 🖖
Before the formula existed, mathematicians noticed a neat pattern hidden in the coefficients. For any ax² + bx + c = 0, the two roots always add up to -b/a and multiply to c/a — a result named Vieta's formulas. So for x² - 5x + 6, the roots must sum to 5 and multiply to 6, giving 2 and 3. It is the fastest way to sanity-check the solver's answer without substituting anything back.
When the famous formula quietly fails 🖖
The textbook formula can betray you on a computer. When b² is far larger than 4ac, the square root is nearly equal to |b|, so the step -b + √Δ subtracts two almost-identical numbers — wiping out most of the significant digits in an effect called catastrophic cancellation. Numerical libraries dodge this by computing one root first, then finding the other as c/(a·x₁). Centuries-old algebra and modern floating-point arithmetic quietly disagree.
Example problems
- two roots - x²-5x+6=0 → roots x=2 and x=3
- repeated root - x²-4x+4=0 → double root x=2, discriminant=0
- complex roots - x²+2x+5=0 → complex roots x=-1±2i
- opens down - -x²+4=0 → x=±2, parabola opens downward