Math
Quadratic equation solver
The discriminant tells you what kind of answer to expect before you calculate it.
The discriminant decides everything
The expression under the square root, b² − 4ac, is the discriminant. Its sign determines the character of the solution before any arithmetic is done:
- Positive — two distinct real roots. The parabola crosses the x-axis twice.
- Zero — one repeated real root. The parabola touches the axis at its vertex.
- Negative — two complex conjugate roots. The parabola never meets the axis.
A perfect-square discriminant also tells you the roots are rational, which means the quadratic factors neatly over the integers — useful if you are trying to factor by inspection rather than by formula.
Where the formula comes from
Completing the square. Divide through by a, move the constant to the right, add (b/2a)² to both sides to make the left side a perfect square, then take the square root. The quadratic formula is simply that process carried out once in general form so it does not have to be repeated for every equation.
The vertex falls out of the same working. Since the parabola is symmetric about x = −b/2a, that value is both the axis of symmetry and the x-coordinate of the turning point.
Vieta's formulas as a check
For any quadratic, the sum of the roots equals −b/a and their product equals c/a. This is a fast way to verify an answer without re-running the formula, and it is often quicker than the formula itself when the roots are small integers.
For x² − 3x − 10 = 0, you need two numbers that add to 3 and multiply to −10. Five and −2 work, so the roots are 5 and −2 — no square roots required.
Where quadratics turn up
Projectile motion is the classic case: with constant acceleration, height against time is a parabola, and solving for zero height gives the landing time. Optimisation problems produce them too, because a quantity that rises then falls — profit against price, area against a shape parameter — is frequently quadratic, and the vertex is the optimum.
In each case the algebra may produce two roots when only one is physically meaningful. A negative time before launch or a negative length is mathematically valid and practically discardable, so always check the answer against the situation.
Common questions
What does it mean when there are no real roots?
The parabola never crosses the x-axis. The equation still has two solutions, but they involve i, the square root of −1. In physical problems this usually means the situation described cannot happen — a projectile that never reaches a given height, for instance.
Can I always factor instead of using the formula?
Only when the roots are rational, which happens when the discriminant is a perfect square. Otherwise factoring over the integers is impossible and the formula is the practical route. Trying to factor first is still worthwhile, since it is faster when it works.
Why is a not allowed to be zero?
With a = 0 the x² term vanishes and the equation is linear, with a single root at −c/b. The calculator detects this and solves it as a linear equation instead of dividing by zero.
What is completing the square used for?
Beyond deriving the formula, it converts a quadratic into vertex form, a(x − h)² + k, which makes the turning point immediately visible. It is also the standard technique for integrating certain expressions and for deriving the equation of a circle from its expanded form.