EN

Quadratic Equation Solver (Discriminant)

A quadratic equation is written a·x² + b·x + c = 0, and its whole behaviour comes down to a single number: the discriminant Δ = b² − 4ac. Its sign alone tells, before calculating anything else, whether the equation has two solutions, one, or none among the real numbers.

The calculator doesn't just hand over the roots: it shows the discriminant, the vertex form, the vertex of the parabola, the sum and product of the roots, and plots the curve — because seeing where the parabola crosses the x-axis explains the result far better than a bare list of solutions.

The equation's coefficients

a·x² + b·x + c = 0

If it's zero, the equation becomes linear: it's still solved below.

Include its sign.

Include its sign.

x23vertex (2.5, −0.25)Δ > 0: the parabola crosses the axis at two points
Illustrative diagram (sample values, x² − 5x + 6): the roots are the x-values where the parabola crosses the horizontal axis. The plot redraws itself with the coefficients entered after the calculation.

Starred terms are defined in the glossary at the end of the article.

What the discriminant actually decides

A quadratic equation is written ax² + bx + c = 0 with a ≠ 0. Almost everything about its solutions is packed into one number, the discriminant*.

Δ = b² − 4ac

US algebra courses often just say “the discriminant,” without naming the letter. The symbol Δ is the usual shorthand on this page and in most textbooks. The quadratic formula then takes a square root of that quantity. The sign of Δ is therefore a fork in the road, before any root is written down.

  • Δ > 0 — two distinct real roots. The parabola crosses the x-axis twice.
  • Δ = 0 — a repeated real root. The parabola merely touches the axis at the vertex.
  • Δ < 0 — no real root. Two complex conjugates live off the real line; the curve never meets the axis.

Take x² − 5x + 6. Then Δ = 25 − 24 = 1, so two real roots. Take x² + 1. Then Δ = −4, so none on the real line. The arithmetic of Δ is cheap. The nature of the solutions is settled before the ± is even opened.

Completing the square: where the quadratic formula comes from

The formula x = (−b ± √Δ) / (2a) is not a decree. It is completing the square, run to the end. Divide by a, isolate the x terms, and force a perfect square on the left.

  1. x² + (b/a)x + c/a = 0.
  2. x² + (b/a)x is the start of (x + b/(2a))², which also carries the extra b²/(4a²).
  3. Shift that extra term: (x + b/(2a))² = Δ / (4a²).
  4. Square roots: x + b/(2a) = ± √Δ / (2a).
  5. Hence x = (−b ± √Δ) / (2a).

x = (−b ± √Δ) / (2a)

That chain is why Δ ≥ 0 is required for real roots: a real square root does not exist for a negative radicand. Completing the square is also the move that produces vertex form, so the same algebra serves graphing and solving. The special-products calculator is the identity (x + k)² = x² + 2kx + k² running in the opposite direction.

Standard form, vertex form, and factored form

The same trinomial can be written three ways. Each answers a different question.

  • Standard form ax² + bx + c — the coefficients sit in plain view. Δ is computed from here. The quadratic formula starts here.
  • Vertex form* a(x − h)² + k, with h = −b/(2a) and k = −Δ/(4a). The vertex is (h, k). The axis of symmetry is the line x = h.
  • Factored form a(x − r₁)(x − r₂), when the roots are real. The x-intercepts are readable at a glance. Sign charts are built from this writing.

x² − 5x + 6 is already standard. Vertex form is (x − 2.5)² − 0.25. Factored form is (x − 2)(x − 3). Three labels, one parabola. Switching among them is algebra, not a change of problem.

In practice, a graphing task wants vertex form. A root-finding task wants the formula or the factors. A coefficient task — “what is b?” — wants standard form and nothing else.

Reading a parabola from its coefficients

The graph of y = ax² + bx + c is a parabola. The coefficients already say how it sits.

If a > 0 the curve opens upward: a valley, a minimum at the vertex. If a < 0 it opens downward: a hill, a maximum at the vertex. |a| steeper means a tighter squeeze toward the axis of symmetry. The vertex is (−b/(2a), −Δ/(4a)). The vertical line through that point is the axis of symmetry; the two arms of the curve are mirrors of each other.

The x-intercepts, when they exist, are the roots of ax² + bx + c = 0. That is why the plot on this page is not decoration. Two crossings, a tangent touch, or a miss: those three pictures are the three signs of Δ. The y-intercept is simply (0, c), because every x² and x term vanishes there.

Vieta: sum and product without solving first

Vieta’s formulas* relate the coefficients to the roots without extracting a square root:

S = r₁ + r₂ = −b / a

P = r₁ · r₂ = c / a

When the roots are small integers, they can be guessed from S and P. For x² − 5x + 6 = 0, two numbers that add to 5 and multiply to 6 are 2 and 3. No discriminant is required. The same pair works in reverse: a quadratic with those roots is x² − Sx + P, up to a leading factor a.

Even so, inspection is a convenience, not a method of last resort. Non-integer roots, messy coefficients, or a negative discriminant send the work back to the formula. Vieta holds for complex roots; the sum and product remain real when a, b, c are real.

Quadratic inequalities and the sign chart

Solving ax² + bx + c > 0 (or < 0) is not a second formula. It is the sign of the trinomial, read from a and from the roots.

  • Δ > 0 — the quadratic has the sign of a outside the roots, and the opposite sign between them.
  • Δ = 0 — the sign of a everywhere except at the root, where the value is zero.
  • Δ < 0 — the sign of a for every real x. No root to switch at.

x² − 4 > 0 therefore holds for x < −2 or x > 2: a = 1 > 0, so the parabola sits above the axis outside the roots. The closed versions ≥ and ≤ simply put the roots back into the solution set. A sign chart with a test point in each interval is the usual classroom write-up; the rule above is that chart in one sentence.

Complex conjugate roots when Δ is negative

“No real solution” is a statement about the real line, not about the complex plane. For Δ < 0 the two roots are

r = (−b ± i√(−Δ)) / (2a)

They are complex conjugates*: same real part, opposite imaginary parts. That pairing is forced by real coefficients. Geometrically the parabola never meets the x-axis; it stays entirely above it if a > 0, entirely below it if a < 0. The vertex is real. The axis of symmetry is real. Only the intercepts have left the drawing.

x² + 1 = 0 is the stock example: r = ± i. The curve y = x² + 1 has its floor at (0, 1). Nothing on that graph contradicts the two complex roots; the graph simply does not show them.

Substitutions that collapse to a quadratic

A great many equations that do not look quadratic become quadratic after a change of variable.

The biquadratic ax⁴ + bx² + c = 0 is the textbook case: set X = x², solve aX² + bX + c = 0, then x = ±√X for each positive X. A palindromic quartic ax⁴ + bx³ + cx² + bx + a = 0 is reduced by dividing through by x² (x ≠ 0) and setting t = x + 1/x. An equation of the form a[f(x)]² + b f(x) + c = 0 is a quadratic in t = f(x).

Isolating a radical and squaring both sides can produce a quadratic as well. Squaring is not reversible: each candidate has to be substituted back, because squaring can invent extra roots. The quadratic step is then only half the job.

Word problems that hide a quadratic

The equation rarely arrives labelled. A rectangle of given perimeter and area, a projectile under constant acceleration, a break-even point where cost meets revenue, a maximum of a quadratic profit function: each of those stories writes ax² + bx + c = 0 or y = ax² + bx + c once the variables are named.

A rectangle with perimeter 24 and area 32: 2(L + W) = 24 so W = 12 − L, then L(12 − L) = 32, hence L² − 12L + 32 = 0. Δ = 16, roots 8 and 4. Those are the two sides. The same numbers would have been found by Vieta: sum 12, product 32.

Free-fall and projectile motion write s = s₀ + v₀t + ½at². Asking when the object is back at a given height is a quadratic in t. Negative time is usually discarded as unphysical; a negative discriminant means the height is never reached.

Cancellation when b² dwarfs 4ac

The school formula x = (−b ± √(b² − 4ac)) / (2a) is algebraically exact. In floating point it is not always honest. When |b| is large compared with |4ac|, √Δ sits very close to |b|. One of the two choices (−b + √Δ) or (−b − √Δ) then subtracts two nearly equal quantities. Significant digits vanish. The smaller root, in absolute value, comes out noisy or even wrong.

A stable rewrite computes the root that does not cancel, then recovers the other from the product:

q = −½ (b + sign(b) · √Δ)

x₁ = q / a  ·  x₂ = c / q

That is the Citardauq rearrangement (the quadratic formula, written backwards). This page uses it. For x² − 5x + 6 the two writings agree to every displayed digit. For a = 1, b = 10⁸, c = 1, the naive smaller root comes out around −7.5 × 10⁻⁹ in double precision, a quarter off (and 0 once b reaches 10⁹); the product form returns −10⁻⁸, the right value.

When a = 0 the equation is no longer quadratic

By definition a quadratic needs a ≠ 0. If a = 0 the equation is bx + c = 0, a linear equation, provided b ≠ 0. One root, x = −c/b. No discriminant, no parabola: the graph is a straight line. If a = b = 0 as well, the statement is either 0 = 0 (every x works) or c = 0 with c ≠ 0 (no x works).

Applying the quadratic formula with a = 0 is a division by zero. The form on this page does not refuse a = 0; it solves the linear case and says so. That is the honest classification, not an error message for a perfectly well-posed line.

A glance at cubics (Cardano)

The jump from degree 2 to degree 3 is a historical leap, not a small extra formula. For the depressed cubic x³ + px + q = 0, Cardano’s 16th-century solution reads

x = ∛(−q/2 + √(q²/4 + p³/27)) + ∛(−q/2 − √(q²/4 + p³/27))

The quantity under the square root, q²/4 + p³/27, plays a role analogous to Δ, and it can be negative even when three real roots exist (the casus irreducibilis). Intermediate complex numbers then appear on the way to a real answer. That embarrassment is one of the reasons complex numbers were taken seriously. This page stops at degree 2; the cubic is mentioned only to mark the border.

Factoring, the formula, and completing the square: which tool

US Algebra 1 usually offers three tools for ax² + bx + c = 0, in a preferred classroom order: factor if the numbers are kind, complete the square if a vertex is wanted, use the formula otherwise. They are not competing truths. Factoring is Vieta in disguise. Completing the square is the derivation of the formula. The formula is completing the square with the arithmetic already done.

When the roots are integers, factoring is faster and less error-prone than punching Δ. When the vertex is the object of interest — a maximum height, a minimum cost — completing the square (or the vertex formulas h = −b/(2a), k = −Δ/(4a)) is the direct path. When the coefficients are ugly, the formula, or this page, is the tool that does not stall.

A related page in algebra expands (a ± b)², which is exactly the identity used to complete the square.

Integer-root hunting versus the formula

The rational root theorem says that any rational root, written in lowest terms p/q, has p dividing c and q dividing a. For monic polynomials (a = 1) that is “try the factors of c.” It is a hunt, not a guarantee: there may be no rational root at all, even when Δ is a perfect square of an irrational.

x² − 2 = 0 has Δ = 8, roots ±√2, not rational. The theorem correctly finds nothing to try that works. The formula closes the problem. Treating the theorem as a substitute for the discriminant is a common stall in homework: after three failed guesses, Δ would have said “two real roots, not integers” in one line.

When a rational root is found, polynomial division (or synthetic division) factors it out and leaves a linear piece. For a genuine quadratic that is the whole factorization. For a cubic, it is the reduction to a quadratic — which then returns to this page.

The axis of symmetry as a shortcut to the vertex

h = −b/(2a) can be memorized as a formula, or seen as the midpoint of the two roots: (r₁ + r₂)/2 = −b/(2a), again Vieta. No roots, no problem: the same abscissa is the axis of a parabola that misses the x-axis. Evaluating y at that x gives the vertex height without rewriting the trinomial.

For 2x² − 12x + 10, the axis is x = 3. y(3) = 18 − 36 + 10 = −8. Vertex (3, −8), minimum because a > 0. Completing the square would have produced 2(x − 3)² − 8, the same pair, with more writing. For a quick sketch, axis then vertex then intercepts is enough.

Glossary

Discriminant Δ
The number b² − 4ac attached to ax² + bx + c = 0. Its sign decides whether the roots are two distinct reals, a repeated real, or a complex conjugate pair. US classrooms often say “the discriminant” without the letter Δ; the quantity is the same.
Vertex form
The writing a(x − h)² + k of a quadratic. The point (h, k) is the vertex of the parabola; x = h is the axis of symmetry. Also called completed-square form. French sources say “forme canonique”; that name is not used here.
Vieta’s formulas
For ax² + bx + c = 0, the sum of the roots is −b/a and the product is c/a. They let integer roots be spotted by inspection, and they recover the second root from the first via the product.
Complex conjugate
If z = p + qi, the conjugate is p − qi. Real coefficients force non-real roots of a quadratic to come in conjugate pairs, so the imaginary parts cancel in the sum and the product stays real.

Related calculators