Glossary Math & Statistics

Quadratic formula

The quadratic formula gives the solutions of ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) / 2a.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

The part under the root, b² − 4ac, is the discriminant: positive means two real roots, zero one repeated root, negative two complex roots. For x² − 5x + 6 = 0 the discriminant is 1 and the roots are 2 and 3. The parabola's turning point (vertex) is at x = −b / 2a, exactly halfway between the roots. The roots also satisfy x₁ + x₂ = −b/a and x₁ × x₂ = c/a, a quick check on an answer.

Why it matters

Quadratics model projectile paths, areas, break-even points and accelerating motion. Often only one root makes physical sense, such as a positive time. In floating-point code the textbook formula loses precision when b² is much larger than 4ac, because −b + √(b² − 4ac) subtracts two nearly equal numbers; robust code computes the larger root first and gets the other from x₁ × x₂ = c/a.

Example

A ball thrown upward from 20 m at 15 m/s: height h = 20 + 15t − 4.9t². It lands when −4.9t² + 15t + 20 = 0:

discriminant = 15² − 4 × (−4.9) × 20 = 617
t = (−15 ± √617) / (2 × −4.9)  →  t = 4.07 s  or  t = −1.00 s
vertex: t = 15 / 9.8 = 1.53 s, height 31.48 m

The negative root is discarded. Other cases: x² − 2x − 1 = 0 gives 1 ± √2 = 2.4142 and −0.4142; x² + 2x + 5 = 0 has discriminant −16 and roots −1 ± 2i.

AdSense Placeholder
Slot: footer_leaderboard