Understanding the discriminant
The discriminant D = b^2 - 4ac determines the number and type of roots without solving the equation.
| Discriminant | Roots | Geometric meaning |
|---|---|---|
| D > 0 | Two distinct real roots | The parabola crosses the x-axis at two points |
| D = 0 | One repeated real root, x = -b / (2a) | The parabola touches the x-axis at its vertex |
| D < 0 | Two complex conjugate roots p ± qi | The parabola does not intersect the x-axis |
- By Vieta's formulas, the two roots satisfy x1 + x2 = -b / a and x1 x x2 = c / a — a quick check on any solution.
- If a = 0 the equation is linear, not quadratic, and the quadratic formula does not apply; this calculator requires a nonzero a.
- Complex roots of a real quadratic always come in conjugate pairs: if p + qi is a root, so is p - qi.
What is a quadratic equation?
A quadratic equation is a polynomial equation of degree two, written in standard form as ax^2 + bx + c = 0 with a not equal to zero. The graph of the corresponding function y = ax^2 + bx + c is a parabola, and the roots of the equation are the x-values where the parabola crosses (or touches) the x-axis.
Every quadratic equation has exactly two roots when counted with multiplicity, a consequence of the fundamental theorem of algebra. The nature of those roots is determined entirely by the discriminant, b^2 - 4ac: a positive discriminant gives two distinct real roots, a zero discriminant gives one repeated real root (the parabola touches the axis at its vertex), and a negative discriminant gives two complex conjugate roots of the form p + qi and p - qi, where i is the imaginary unit.
Quadratic equations arise throughout mathematics and applied science — projectile motion, areas and optimization, compound-interest problems, and the characteristic equations of physical systems all reduce to quadratics in standard cases.
How to use this quadratic equation calculator
- Write your equation in standard form ax^2 + bx + c = 0, moving all terms to one side if necessary.
- Enter the coefficients a, b and c, including their signs. The coefficient a cannot be zero (that would make the equation linear).
- Read the discriminant to see what kind of roots to expect: positive for two real roots, zero for one repeated root, negative for complex roots.
- Read the roots. Complex roots are displayed in the form p ± qi.
The quadratic formula
The roots of ax^2 + bx + c = 0 are given by x = (-b ± sqrt(b^2 - 4ac)) / (2a). The quantity under the square root, D = b^2 - 4ac, is the discriminant.
Worked example (two real roots): x^2 - 3x + 2 = 0, so a = 1, b = -3, c = 2. Discriminant: (-3)^2 - 4(1)(2) = 9 - 8 = 1. Roots: x = (3 ± sqrt(1)) / 2, giving x1 = (3 + 1) / 2 = 2 and x2 = (3 - 1) / 2 = 1. Check by factoring: x^2 - 3x + 2 = (x - 1)(x - 2).
Worked example (complex roots): x^2 + 2x + 5 = 0, so a = 1, b = 2, c = 5. Discriminant: 4 - 20 = -16. The roots are x = (-2 ± sqrt(-16)) / 2 = (-2 ± 4i) / 2 = -1 ± 2i, a complex conjugate pair. The parabola never crosses the x-axis.
When the discriminant is zero, the single repeated root is x = -b / (2a), which is also the x-coordinate of the parabola's vertex.
Common mistakes
- Sign errors when identifying coefficients: in x^2 - 3x + 2 = 0, b is -3, not 3.
- Forgetting that the formula divides the entire numerator by 2a — a classic error is dividing only the square-root term.
- Computing the discriminant as b^2 - 4ac but dropping the sign of c: with c negative, -4ac becomes positive.
- Treating a negative discriminant as 'no solution' — the equation still has two complex conjugate roots; it merely has no real solutions.
- Not rewriting the equation in standard form first: 2x^2 = 6x - 4 must become 2x^2 - 6x + 4 = 0 before reading off a, b and c.
Domande frequenti
How do I solve a quadratic equation with the quadratic formula?
Write the equation as ax^2 + bx + c = 0, then substitute the coefficients into x = (-b ± sqrt(b^2 - 4ac)) / (2a). For x^2 - 3x + 2 = 0: the discriminant is 9 - 8 = 1, and the roots are (3 ± 1) / 2, giving x = 2 and x = 1.
What does the discriminant tell me?
The discriminant D = b^2 - 4ac determines the type of roots before you solve. D > 0 means two distinct real roots, D = 0 means one repeated real root at x = -b/(2a), and D < 0 means two complex conjugate roots and no real solutions. Geometrically, it says whether the parabola crosses, touches, or misses the x-axis.
What are complex roots?
When the discriminant is negative, the square root in the quadratic formula involves a negative number, and the roots take the form p ± qi, where i = sqrt(-1) is the imaginary unit. For example, x^2 + 2x + 5 = 0 has discriminant -16 and roots -1 + 2i and -1 - 2i. Complex roots of a real quadratic always occur as conjugate pairs.
Can a quadratic equation have only one solution?
Yes, when the discriminant is exactly zero. The repeated root is x = -b / (2a), and the parabola touches the x-axis at a single point — its vertex. For example, x^2 - 4x + 4 = 0 has discriminant 16 - 16 = 0 and the single (double) root x = 2, since it factors as (x - 2)^2.
How can I check my roots are correct?
Substitute each root back into the equation, or use Vieta's formulas: the roots must satisfy x1 + x2 = -b/a and x1 x x2 = c/a. For x^2 - 3x + 2 = 0 with roots 2 and 1: their sum is 3 = -(-3)/1 and their product is 2 = 2/1, confirming the solution.
Why can't the coefficient a be zero?
With a = 0 the x^2 term vanishes and the equation bx + c = 0 is linear, with the single solution x = -c/b (when b is nonzero). The quadratic formula divides by 2a, so it is undefined for a = 0. This calculator requires a nonzero value for a.
Fonti
- Weisstein, Eric W. "Quadratic Equation." MathWorld — A Wolfram Web Resource. mathworld.wolfram.com.
- Weisstein, Eric W. "Vieta's Formulas." MathWorld — A Wolfram Web Resource. mathworld.wolfram.com.
- Stewart J. Precalculus: Mathematics for Calculus. Cengage (standard treatment of quadratic equations and the discriminant).