Quadratic Equation Solver — ax² + bx + c = 0
Enter coefficients a, b, c — get roots, discriminant, vertex, parabola graph and 3 solution methods
Solution Summary
All 3 Methods — Comparison
Parabola Graph
Step-by-Step Working
What Is a Quadratic Equation?
Definition, standard form, roots, discriminant and why quadratics appear everywhere in science and engineering
A quadratic equation is any polynomial equation of degree 2, written in standard form as ax² + bx + c = 0, where a, b, c are real numbers and a ≠ 0. The word "quadratic" comes from the Latin quadratus meaning square, referring to the x² term. The solutions — the values of x that satisfy the equation — are called the roots or zeros.
A quadratic equation always has exactly two roots (counting multiplicity) in the complex number system, guaranteed by the Fundamental Theorem of Algebra. These roots can be: two distinct real numbers (discriminant > 0), one repeated real number (discriminant = 0), or a pair of complex conjugates (discriminant < 0). The graph of y = ax² + bx + c is always a parabola — opening upward if a > 0, downward if a < 0.
Quadratic equations model countless real phenomena: the path of a projectile under gravity, the area of rectangles, the focus of parabolic mirrors and satellite dishes, profit maximisation in economics, and the resonant frequency of electrical circuits. Mastering the three solution methods — quadratic formula, factoring, and completing the square — is one of the most important skills in algebra.
Three Solution Methods — When to Use Each
Quadratic Formula, Factoring and Completing the Square compared with examples and use cases
| Method | Formula / Approach | Best When | Limitation |
|---|---|---|---|
| Quadratic Formula Always works | x = (−b ± √D) / 2a where D = b²−4ac | Any quadratic, especially irrational roots | Slightly slower to compute by hand |
| Factoring | Find p,q: p×q = ac, p+q = b then split middle term | Integer or simple rational roots | Fails when roots are irrational or complex |
| Completing the Square | a(x + b/2a)² = b²/4a − c; derives vertex directly | When vertex form is needed; deriving the formula | More steps; easy arithmetic errors |
| Square Root Method | x² = k ⇒ x = ±√k (only when b=0) | Pure quadratic: ax² + c = 0 | Only works when b = 0 |
When to Factor First
Try factoring when: coefficients are small integers, the discriminant is a perfect square, and a = 1. Example: x² − 5x + 6 = (x−2)(x−3). Roots: x=2, x=3. Product of roots = c/a = 6, sum = −b/a = 5. Verify with Vieta's formulas before writing the full solution.
Fast pathQuadratic Formula — Never Fails
The formula x = (−b ± √(b²−4ac)) / 2a was known to Indian mathematician Brahmagupta in 628 AD. It handles all cases: real roots, repeated roots, and complex roots. If D < 0, write roots as x = −b/2a ± i√|D|/2a. This is the universal fallback method.
UniversalCompleting the Square
Step 1: divide by a. Step 2: move c/a to right. Step 3: add (b/2a)² to both sides. Step 4: left side becomes (x + b/2a)². Step 5: take square root. This method directly gives vertex form y = a(x−h)²+k where (h,k) is the vertex. The quadratic formula is literally derived from this method.
Vertex formVieta's Formulas
If x₁ and x₂ are roots of ax²+bx+c=0, then: Sum of roots = x₁+x₂ = −b/a; Product of roots = x₁×x₂ = c/a. These relations let you verify answers instantly without substituting back. They also let you build a quadratic from two known roots: x² − (sum)x + (product) = 0.
Verify fastComplex Roots Explained
When D < 0, the square root of a negative number brings in i = √−1 (the imaginary unit). Roots appear as conjugate pairs: x = p ± qi. These roots are "complex" but still valid solutions. The parabola never crosses the x-axis. Complex roots are fundamental in electrical engineering (AC circuits use j = i for impedance calculations).
Complex planeNature of Roots (Discriminant)
D = b² − 4ac determines everything about the roots before you solve. D > 0: two distinct real roots (parabola crosses x-axis at two points). D = 0: one repeated root (parabola just touches x-axis). D < 0: no real roots, two complex conjugates (parabola entirely above or below x-axis).
Key insightHow This Calculator Works
Step-by-step: how coefficients are processed, all three methods computed, vertex found and graph drawn
- 1
Enter a, b, c — Live Equation Previews
As you type each coefficient, the equation display at the top updates in real time: "2x² − 3x + 1 = 0". Negative values and zero are handled automatically, so the display always shows a clean mathematical expression.
- 2
Compute Discriminant Δ = b² − 4ac
This single value determines the nature of the roots before solving. Δ > 0: two real roots. Δ = 0: one repeated real root. Δ < 0: two complex conjugate roots. The calculator shows this value prominently and colours the result hero accordingly (green / blue / purple).
- 3
Solve Using All Three Methods
The calculator applies all three solution methods simultaneously. The selected method (Quadratic Formula / Factoring / Completing the Square) generates the full step-by-step working shown in the steps list. All three results are shown in the Method Comparison section for cross-checking.
- 4
Compute Vertex, Axis & Key Properties
Vertex h = −b/2a, k = c − b²/4a. Axis of symmetry x = h. Sum of roots = −b/a. Product of roots = c/a. Y-intercept = c. The 6 summary cards display all key properties at a glance.
- 5
Draw Parabola on Canvas
The graph is drawn using HTML5 Canvas. The calculator auto-scales the axes to include the vertex, both roots (if real), and a margin of ~30%. Roots are marked as red filled circles, the vertex as a blue filled circle, and the axis of symmetry as a dashed vertical line.
Discriminant : D = b² − 4ac
Quad. Formula : x = (−b ± √D) / 2a
Vertex : h = −b/2a, k = c − b²/4a
Sum of roots : x₁+x₂ = −b/a
Product : x₁×x₂ = c/a
Vertex form : y = a(x−h)² + kQuadratic Equation Facts & Real-World Uses
Fascinating history, surprising applications and everything your textbook forgot to mention
Babylonians Solved Quadratics in 2000 BC
Babylonian clay tablets show geometric methods for solving quadratic-like problems 4,000 years ago, long before algebra notation existed. They used completing-the-square ideas expressed in terms of areas and lengths. The modern symbolic solution came from 9th-century Islamic mathematicians, especially Al-Khwarizmi's "Al-Kitab al-mukhtasar" (the origin of the word "algebra").
Projectile Motion is a Quadratic
When you throw a ball, the height h = −½gt² + v₀t + h₀. This is a quadratic in time t. The roots (where h=0) give the time of landing. The vertex gives the maximum height. Every parabolic trajectory — a basketball shot, a football kick, a water fountain arc — is the graph of a quadratic equation with gravity as the coefficient of t².
Parabolic Dishes Use the Reflective Property
A parabola reflects all incoming parallel rays to a single focus point. This is why satellite dishes, radio telescopes, car headlights and solar concentrators are all parabolic. The equation of a parabola with focus at (0, 1/4a) is y = ax². The quadratic equation determines the shape of every dish and lens that needs to concentrate energy.
Profit Maximisation in Economics
If revenue R(x) = px and cost C(x) = ax²+bx+c (with increasing marginal cost), then Profit = R−C is a downward-opening quadratic. The vertex gives the production quantity that maximises profit. Setting Profit = 0 gives the break-even quantities. Every introductory economics course uses quadratic profit functions.
Quadratics in Electrical Circuits
In a series RLC circuit, the characteristic equation is Ls² + Rs + 1/C = 0 — a quadratic in the complex frequency s. The discriminant determines whether the circuit is overdamped (D>0), critically damped (D=0), or underdamped/oscillatory (D<0). Every capacitor-inductor circuit is governed by a quadratic equation.
Orbital Mechanics and Conic Sections
Planetary orbits are conic sections — ellipses, parabolas, or hyperbolas — all described by second-degree equations. A spacecraft at exactly escape velocity follows a parabolic path. The quadratic formula solves for orbital insertion windows, closest-approach distances and re-entry trajectories. Every space mission relies on solving quadratic (and higher) equations.
The Quadratic Formula Has a Song
Countless teachers worldwide have set the quadratic formula to the tune of "Pop Goes the Weasel" to help students memorise it: "x equals negative b / plus or minus square root / of b-squared minus 4ac / all over 2a." This mnemonic device has been used since at least the 1960s. The formula itself is elegant enough that it appears on some mathematicians' tombstones.
You Cannot Avoid It: It Appears in Calculus Too
Setting the derivative of a cubic f(x) = ax³+bx²+cx+d to zero gives a quadratic f'(x) = 3ax²+2bx+c = 0. Every time you find the turning points of a cubic — in optimization problems, economics, or physics — you're solving a quadratic. The skills compound: mastering the quadratic is prerequisite for all of calculus-based mathematics.
Frequently Asked Questions
Common questions about solving quadratic equations, complex roots, vertex form and the discriminant