The quadratic formula often arrives as a password: write it down, substitute three coefficients, hope the signs survive. That works for routine homework, but it hides the useful part. The formula is what remains after every quadratic has been reshaped into one square. Once that move is visible, the denominator, the discriminant, and the unavoidable plus-or-minus all stop looking arbitrary.

ax² + bx + c = 0, with a ≠ 0x = (−b ± √(b² − 4ac)) / 2aThe two possible signs are two possible square roots. They are not optional decoration.
The equation and its moving parts
Put the equation in standard form before assigning coefficients:
The value being solved for. It may carry a physical unit U.
Must not be zero. If every term has dimension F, then [a] = F/U².
Its dimension is [b] = F/U; it is not automatically unitless.
Its dimension is [c] = F.
Δ = b² − 4ac. Its sign classifies the roots when coefficients are real.
The dimension check is compact and useful. Both b² and 4ac have dimension F²/U², so √Δ has the same dimension as b. The numerator has dimension F/U; dividing it by a, which has dimension F/U², returns U, the dimension of x. A physical quadratic is legitimate only if ax², bx, and c were expressed in compatible units.
Deriving it: one square, then two roots
The derivation begins with ax² + bx + c = 0 and divides by the nonzero leading coefficient. Move the constant term first:
x² + (b/a)x = −c/ax² + (b/a)x + b²/(4a²) = −c/a + b²/(4a²)(x + b/(2a))² = (b² − 4ac)/(4a²)2ax + b = ±√(b² − 4ac)x = (−b ± √(b² − 4ac)) / 2aThe key choice in step 2 is not magic. Half the coefficient of x is b/(2a); its square is exactly the term that turns the left side into (x + b/(2a))². The final ± follows because a nonzero square has two square roots. Writing only the positive root quietly deletes a solution.
For a full textbook derivation, see OpenStax’s quadratic-formula section and its companion explanation of completing the square.
The discriminant is a geometry report
The parabola crosses the horizontal axis twice.
The parabola touches the axis at its vertex.
The real graph has no axis crossing, but the equation still has solutions over the complex numbers.

This classification is exact algebra, not an uncertainty analysis. If fitted or measured coefficients make Δ very close to zero, rounding may hide whether the model predicts a crossing or a tangency. More digits are not automatically more trustworthy; the coefficient uncertainty matters too. OpenStax gives the standard real-root classification in its quadratic-equations reference.
Two complete calculations
Example 1: two real roots
Solve 2x² − 7x + 3 = 0. Here a = 2, b = −7, and c = 3.
Δ = (−7)² − 4(2)(3) = 49 − 24 = 25x = [−(−7) ± √25] / [2(2)] = (7 ± 5)/4x₁ = 12/4 = 3; x₂ = 2/4 = 1/22(3)² − 7(3) + 3 = 0; 2(1/2)² − 7(1/2) + 3 = 0There is a second check that catches a different family of transcription errors. If the roots are r₁ and r₂, then r₁ + r₂ = −b/a and r₁r₂ = c/a. Here 3 + 1/2 = 7/2 and 3 × 1/2 = 3/2, matching −b/a and c/a respectively.
Example 2: complex roots are still roots
Solve x² + 4x + 13 = 0. This time a = 1, b = 4, and c = 13.
Δ = 4² − 4(1)(13) = 16 − 52 = −36√Δ = √(−36) = 6ix = (−4 ± 6i)/2 = −2 ± 3i(−2 + 3i)² + 4(−2 + 3i) + 13 = 0The other root is the conjugate −2 − 3i. Their sum is −4 and their product is 13, again matching −b/a and c/a. A negative discriminant means “no real roots,” not “no roots.”
When you need the coefficients instead
The formula normally solves for x, but its factor form also runs the other way. Given roots r₁ and r₂ and a chosen nonzero scale a, write a(x − r₁)(x − r₂). Expanding gives:
b = −a(r₁ + r₂)c = ar₁r₂If a required value r is known to be a root, then c = −ar² − br. For a double root, use b = −2ar and c = ar².
This is useful in design and fitting work: it distinguishes the roots you want from the overall scaling you are free to choose. It also explains why multiplying all three coefficients by the same nonzero number does not change the roots.
The formula can be right while a numerical answer is poor

In exact algebra, the textbook form is complete. In binary floating-point arithmetic, it can lose the small root when −b and ±√Δ are almost equal and opposite. This is cancellation: two large, nearly equal quantities subtract and leave a result with few reliable digits.
Δ ≥ 0, a common stable route isq = −½(b + copysign(√Δ, b))x₁ = q/a; x₂ = c/qOne root uses the non-cancelling numerator; the other comes from x₁x₂ = c/a. Handle c = 0 and q = 0 explicitly.
William Kahan’s paper on the cost of floating-point quadratic computation and David Goldberg’s floating-point guide explain why rearranging mathematically identical expressions can matter in software. Robust implementations also scale extreme coefficients, avoid overflow in b² − 4ac, use a complex routine when needed, and check both a residual and Vieta’s relations.
Mistakes and boundaries worth keeping in view
| Tempting move | Why it fails | Repair |
|---|---|---|
| Read coefficients before moving everything to zero | The formula assumes ax² + bx + c = 0. | Expand, collect, and put zero on one side first. |
Use −7 for −b when b = −7 | Two minus signs are visually easy to skip. | Write −(−7) before simplifying. |
Divide only the square root by 2a | Unparenthesized notation is misleading. | Keep the whole numerator in brackets. |
Discard ± or negative Δ | Real-number habits are applied too soon. | Keep both signs; use i when complex roots are in scope. |
Apply it when a = 0 | The expression resembles a quadratic. | Solve the linear case bx + c = 0 separately. |
| Accept an algebraic root as a physical answer | The computation has no domain knowledge. | Reject impossible time, concentration, or design-range values after solving. |
The quadratic formula solves a genuine second-degree polynomial exactly over the complex numbers when a ≠ 0. It does not solve cubics, transcendental equations, or a physical model whose coefficients were extrapolated beyond their evidence. Near a repeated root, small coefficient errors can make large changes to the separate roots; report uncertainty rather than pretending a long display is a measurement.