The discriminant: counting roots before you find them
Look back at the quadratic formula. The action all happens under the square root, in the expression b^2 - 4ac. That quantity is the [[discriminant|discriminant]], written D. Because you cannot take the real square root of a negative number, the *sign* of D alone decides how many real roots the equation has — no full solving required.
- If D > 0: two distinct real roots — the parabola crosses the x-axis twice.
- If D = 0: one repeated real root, a double root — the parabola just touches the x-axis.
- If D < 0: no real roots — the parabola never meets the x-axis (the roots are complex).
Discriminant D = b^2 - 4ac. x^2 - 5x + 6 = 0: D = 25 - 24 = 1 > 0 → 2 real roots x^2 - 6x + 9 = 0: D = 36 - 36 = 0 → 1 double root (x = 3) x^2 + x + 1 = 0: D = 1 - 4 = -3 < 0 → no real roots A perfect-square D (like 1, 4, 9, ...) is a bonus signal: the roots are rational, so the quadratic factors nicely.
Sum and product of roots: Vieta's formulas
There is a beautiful shortcut linking the two roots back to the coefficients without solving at all. If r and s are the roots of a x^2 + b x + c = 0, then their [[sum-and-product-of-roots|sum and product]] obey [[vietas-formulas|Vieta's formulas]]: r + s = -b/a and r·s = c/a. You can see why instantly — expanding a(x - r)(x - s) and matching coefficients with a x^2 + b x + c forces exactly these relations.
Vieta's formulas for a x^2 + b x + c = 0 with roots r, s:
r + s = -b/a r·s = c/a
Check on 2x^2 + 3x - 5 = 0 (roots were 1 and -5/2):
r + s = 1 + (-5/2) = -3/2 = -b/a = -3/2 ✓
r·s = 1·(-5/2) = -5/2 = c/a = -5/2 ✓
Use it backward — build a quadratic with roots 3 and -4:
sum = -1, product = -12
x^2 - (sum)x + (product) = x^2 + x - 12 = 0