The Quadratic Equation Solver solves any equation in the form ax^2 + bx + c = 0: enter the three coefficients and it returns the discriminant, the formatted equation, and the roots, real when the discriminant allows and as a complex conjugate pair when it does not.
How It Works
Every quadratic falls to the same formula, and the discriminant (the part under the square root) is computed first because it classifies the answer before you find it:
A positive discriminant means two distinct real roots; zero means one repeated real root (the parabola just touches the axis); a negative discriminant means two complex roots, conjugates of each other, and the solver reports each root as its real and imaginary parts. Coefficient a cannot be zero: with a = 0 the equation is linear, not quadratic, and the solver says so.
Parameters
| Input | Required | Meaning | |---|---|---| | a | Yes | Coefficient of x^2; must be non-zero | | b | Yes | Coefficient of x | | c | Yes | Constant term |
Worked examples
For x^2 - 5x + 6 = 0: the discriminant is 25 - 24 = 1, and the roots are (5 + 1)/2 = 3 and (5 - 1)/2 = 2. Check by substitution: 9 - 15 + 6 = 0 and 4 - 10 + 6 = 0. For x^2 - 6x + 9 = 0: the discriminant is 36 - 36 = 0 and the single root is x = 3, the graph tangent to the axis (the equation is (x - 3)^2). For x^2 + 4x + 5 = 0: the discriminant is 16 - 20 = -4, and the roots are -2 + i and -2 - i, which the solver reports as real part -2 with imaginary parts +1 and -1.
Shortcuts that check the solver
Vieta's relations let you audit any answer in seconds: the roots sum to -b/a and multiply to c/a. For the first example, 3 + 2 = 5 = -(-5)/1 and 3 x 2 = 6 = 6/1. If a factored form is visible ((x - 2)(x - 3)), the roots are the values that zero each factor. And the axis of symmetry sits at x = -b / 2a, exactly halfway between the roots, so a result whose roots are not symmetric around that value is wrong before it is checked any further. These three checks catch sign slips, the dominant error in hand-solving.
Where quadratics earn their keep
Projectile height over time, area problems with one side expressed through another, revenue curves where price cuts trade against volume, and break-even analysis with quadratic costs all land on this equation. In those settings a negative discriminant is information, not failure: a projectile model with no real root says the target height is never reached; a break-even model with complex roots says the business never breaks even at any volume. The vertex (at x = -b/2a, value computed by substitution) is often the real answer: maximum height, maximum revenue, minimum cost.
Limitations
The solver works with the coefficients as real numbers and returns roots in decimal real-plus-imaginary form; it does not factor symbolically, simplify radicals into exact surd form (a root of (5 + sqrt(17))/2 appears as a decimal), or solve higher-degree or simultaneous equations. Extremely large coefficients can overflow in floating point; scaling the whole equation by a common factor leaves the roots unchanged and is the standard remedy.
Frequently Asked Questions
Why is a not allowed to be zero?
With a = 0 there is no x^2 term and the equation is linear, bx + c = 0, with the single solution x = -c/b. Calling it a quadratic would break the formula, which divides by 2a.
What does a complex root mean physically?
That the quantity modeled never reaches zero in the real world for those parameters: the projectile never reaches that height, the profit never touches that level. The complex pair is the algebra's way of proving absence, and in engineering (oscillations, circuits) the parts themselves carry meaning as frequency and damping.
Can both roots be valid answers to a word problem?
Sometimes yes (two times at which a projectile is at a height), sometimes one is extraneous (negative time or length). The solver returns the mathematics; the context accepts or rejects each root, which is why checking by substitution includes asking whether the answer can exist.