Maths Algebra

Quadratic equation solver

a
b
c
Roots 2, 1
1x² + -3x + 2 = 0 · discriminant 1
What kind two real roots
Discriminant b² − 4ac 1
First root 2
Second root 1
Vertex x 1.5
Vertex y -0.25
Live · the discriminant b² − 4ac decides the roots

For x² − 3x + 2 the discriminant is 1: positive, so two distinct real roots, and they come out as 2 and 1. Change c to 3 and the discriminant goes to −3, the roots become the complex pair 1.5 ± 0.866i, and the vertex row still reads 1.5 and 0.75 — a parabola whose lowest point sits above the axis, which is the same fact stated geometrically.

Enter the three coefficients of ax² + bx + c = 0 and this returns both roots at once, the discriminant b² − 4ac that decides what kind of roots they are, and the vertex of the parabola. For x² − 3x + 2 the discriminant is 1, so there are two real roots, and they are 2 and 1. When the discriminant is negative the roots are a complex pair and they are reported as one rather than left blank.

How to use it

1 Rearrange the equation so everything is on one side and it reads ax² + bx + c = 0.
2 Enter a, b and c with their signs — a missing x term means b is 0, not that the field is empty.
3 Read the discriminant first: it tells you what kind of answer to expect before you look at it.
4 Take both roots from the primary row, or the vertex rows if what you actually need is the turning point.

Every quadratic is solved by the same formula, x = (−b ± √(b² − 4ac)) ÷ 2a, and the interesting part is not the roots but the term under the square root. Read it first and you know what the answer will look like before you have computed any of it.

The discriminant decides everything

b² − 4ac is the discriminant, and its sign is the whole classification. Positive gives two distinct real roots, and the parabola crosses the x-axis twice. Zero gives one repeated root, where the curve touches the axis and turns without crossing. Negative gives a complex conjugate pair, and the curve never reaches the axis at all — which is why a graph is sometimes the fastest sanity check on an algebra slip. Checking the sign first is also the quickest way to catch a transcription error: a negative discriminant on a problem that was supposed to have real roots almost always means a sign was copied wrong, not that the mathematics went strange.

Getting a quadratic equation into standard form

The formula only applies to standard form, ax² + bx + c = 0, with every term on one side and zero on the other. 3x² = 12 − x becomes 3x² + x − 12 = 0, so a is 3, b is 1 and c is −12. Two things trip people up here. A missing term means its coefficient is zero, not that it is absent: x² − 9 = 0 has b = 0. And if a itself is zero, the equation is not a quadratic at all but a linear one, with the single root −c ÷ b; this tool says so rather than dividing by zero and returning nonsense.

The vertex is the answer to a different question

Roots are where the curve meets the axis; the vertex is its turning point, at x = −b ÷ 2a with y = c − b² ÷ 4a. When the problem is a maximum or a minimum — the peak of a trajectory, the output that minimises a cost, the profit-maximising price — the vertex is what you want and the roots are incidental. It also sits exactly halfway between the two roots when they are real, which makes it a free check on them.

Two ways to check the answer in seconds

A pair of roots must sum to −b ÷ a and multiply to c ÷ a. For 2x² − 7x + 3 the roots are 3 and 0.5: they sum to 3.5, which is 7 ÷ 2, and multiply to 1.5, which is 3 ÷ 2. Both agree, so the roots are right. This catches a sign slip faster than re-deriving anything. The other check is substitution — put a root back into the original expression and it should come to zero, or near enough that the difference is floating point. On that note, two solvers can disagree very slightly on the smaller root when b² is enormous next to 4ac, because the subtraction in the numerator cancels most of the significant digits. That is a limit of the arithmetic, not a disagreement about the mathematics.

What it will not do

It gives numbers, not a derivation, and it does not factorise. Factorising is only available when the roots happen to be rational, which most quadratics outside a textbook are not; the formula works for every one of them. Nor does it solve cubics or anything higher — a general formula exists for the cubic and quartic and stops being useful long before it stops existing.

What people use it for

  • Solving a quadratic for both roots at once rather than one at a time
  • Checking the discriminant to see whether real roots exist before solving
  • Finding the turning point of a parabola for a maximum or minimum
  • Getting the complex pair when the discriminant is negative
  • Verifying homework roots against the sum and product of the coefficients
  • Checking a projectile or trajectory calculation that lands on a quadratic

Questions

x = (−b ± √(b² − 4ac)) ÷ 2a. The plus and the minus give the two roots, and the term under the root is the discriminant that decides whether they are real.

Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding