Formula and example
How it is calculated
D = b²−4ac; x = (−b ± √D)/(2a). For D < 0, write √D as i·√(−D).
Worked example
x² − 5x + 6 = 0 has D = 1 and roots 2 and 3. The vertex is at (2.5; −0.25).
Things to check
- If a = 0, the remaining linear equation is solved.
- The calculation uses floating-point numbers and a form that reduces cancellation for two distinct real roots. Nearly repeated roots remain sensitive to rounding.
Frequently asked questions
What does a negative discriminant mean?
There are no real roots. Over the complex numbers, the roots form a conjugate pair with equal real parts and opposite imaginary parts.