Sub topic 8
The discriminant and the nature of roots
This chapter assumes you can solve a quadratic by factorisation and with the quadratic formula, and that you are comfortable with square roots and with the sign rules for negatives. The goal is to read the nature of the roots of a quadratic without solving it. CAT questions use this to ask whether roots are real, equal, rational, or absent, and to find the range of a parameter for which one of those holds.
What the discriminant is
For a quadratic equation in standard form, ax² + bx + c = 0 with a ≠ 0, the quadratic formula gives
x = (−b ± √(b² − 4ac)) / (2a)
The expression under the square root is called the discriminant. It is written D (or Δ):
D = b² − 4ac
The formula can only produce real numbers when the square root is real. So the sign of D decides how many real roots exist. The rest of D's value tells you finer detail, such as whether the roots are rational.
The three cases
| Value of D | Roots | Graph of y = ax² + bx + c |
|---|---|---|
| D > 0 | Two distinct real roots | Crosses the x-axis at two points |
| D = 0 | Two equal real roots, x = −b/(2a) | Touches the x-axis at one point |
| D < 0 | No real roots (two complex roots) | Does not meet the x-axis |
When D = 0 the "±" part of the formula contributes nothing, so both roots equal −b/(2a). In this case the quadratic is a perfect square: ax² + bx + c = a(x + b/(2a))².
Rational or irrational roots
Suppose a, b, and c are rational numbers and D > 0. The roots are rational exactly when D is the square of a rational number. For integer coefficients, this means D is a perfect square such as 1, 4, 9, 16, 25, and so on.
- x² − 5x + 6 = 0 has D = 25 − 24 = 1, a perfect square, so the roots 2 and 3 are rational.
- x² − 2x − 1 = 0 has D = 4 + 4 = 8, not a perfect square, so the roots 1 ± √2 are irrational.
When the coefficients are rational and the roots are irrational, they come as a conjugate pair: if p + √q is a root, then p − √q is the other. This is why a quadratic with rational coefficients and the root 3 + √5 must also have the root 3 − √5.
Checking D with code
The following function classifies a quadratic using only D. It uses integer arithmetic for the perfect-square test, which avoids floating-point error.
import math
def nature_of_roots(a, b, c):
"""Classify the roots of ax^2 + bx + c = 0 for integer a, b, c (a != 0)."""
d = b * b - 4 * a * c
if d < 0:
return d, "no real roots"
if d == 0:
return d, "real and equal"
s = math.isqrt(d)
if s * s == d:
return d, "real, distinct, rational"
return d, "real, distinct, irrational"
print(nature_of_roots(1, -5, 6)) # (1, 'real, distinct, rational')
print(nature_of_roots(1, -2, -1)) # (8, 'real, distinct, irrational')
print(nature_of_roots(1, -4, 4)) # (0, 'real and equal')
print(nature_of_roots(1, 2, 5)) # (-16, 'no real roots')Worked example: a parameter in the equation
The most common CAT use of the discriminant is a question of this form: for which values of k does the equation have equal roots, or real roots, or no real roots?
Equal roots. Find k so that x² + 2kx + (3k + 4) = 0 has equal roots.
Here a = 1, b = 2k, c = 3k + 4. Set D = 0:
4k² − 4(3k + 4) = 0 4k² − 12k − 16 = 0 k² − 3k − 4 = 0 (k − 4)(k + 1) = 0
So k = 4 or k = −1. Both values are valid, so the answer has two values of k, not one.
Real roots. Find the values of k for which x² − 6x + k = 0 has real roots.
D = 36 − 4k. Real roots need D ≥ 0, so 36 − 4k ≥ 0 and k ≤ 9. The condition uses "≥" because equal roots are still real.
No real roots. Find the values of m for which mx² − 4x + 1 = 0 has no real roots.
D = 16 − 4m < 0, so m > 4. The equation is quadratic only when m ≠ 0, which is already satisfied by m > 4.
Condition for a quadratic to keep its sign
The discriminant also describes the whole graph. For a > 0 the parabola opens upward. If D < 0, the graph never meets the x-axis, so ax² + bx + c > 0 for every real x. For a < 0 and D < 0, the expression is negative for every real x.
This gives a standard test: the expression ax² + bx + c is positive for all real x exactly when a > 0 and D < 0.
Example. For which k is x² − 2kx + (k + 6) > 0 for all real x?
The coefficient of x² is 1, which is positive. We need D < 0:
4k² − 4(k + 6) < 0 k² − k − 6 < 0 (k − 3)(k + 2) < 0
The product is negative between the roots, so −2 < k < 3.
Using the discriminant with other conditions
Questions often combine D with a second fact. Two combinations appear often.
- Roots of equal magnitude and opposite sign means the sum of the roots is zero, so b = 0, and real roots need −c/a > 0.
- Roots that are reciprocals means the product of the roots is 1, so c = a, and real roots need D ≥ 0.
You can also test for a common root of two quadratics, or count the intersections of a line and a parabola. For the line y = mx + n and the parabola y = ax² + bx + c, set the two equal. The resulting quadratic in x has D > 0 for two intersection points, D = 0 for a tangent line, and D < 0 for no intersection.
Example. For which value of n is the line y = x + n tangent to y = x² + 3x + 5?
Set x² + 3x + 5 = x + n, which gives x² + 2x + (5 − n) = 0. Tangency needs D = 0:
4 − 4(5 − n) = 0 4 − 20 + 4n = 0 n = 4
Edge cases and common errors
- Forgetting a ≠ 0. The discriminant only describes a quadratic. If a parameter appears as the coefficient of x², such as (k − 2)x² + 3x + 1 = 0, state k ≠ 2 before using D. At k = 2 the equation is linear with one root.
- Dropping the equal-roots case. "Real roots" includes D = 0. Writing D > 0 excludes valid answers.
- Mishandling signs in b² − 4ac. When c is negative and a is positive, −4ac is positive, so D is larger than b². Write the substitution out with brackets, for example (−5)² − 4(1)(6).
- Testing only for perfect squares with non-integer coefficients. Clear fractions first. For (1/2)x² + x − 4 = 0, multiply by 2 to get x² + 2x − 8 = 0, then D = 4 + 32 = 36.
- Solving the inequality in k incorrectly. After D < 0 gives a quadratic inequality in k, factor it and use the sign pattern: a positive-leading quadratic is negative between its roots and positive outside them.
Where this leads
The discriminant tells you whether roots exist but not what they sum to. The next chapters use the sum and product of roots, which hold whenever the roots are real. A quick check on D first tells you whether those relations describe real numbers or complex ones. The sign of D also shows up when you look for the maximum or minimum value of a quadratic, because a downward parabola with D < 0 never reaches zero.
Exercise
For which values of k does the equation x² + kx + 9 = 0 have equal roots? For one of those values, state the root.
Show answer
Equal roots need D = 0, so k² − 4(1)(9) = 0, which gives k² = 36 and k = 6 or k = −6. The equal root is −b/(2a) = −k/2. For k = 6 the root is −3, and for k = −6 the root is 3.
Exercise
Without solving, state the nature of the roots of 2x² − 7x + 3 = 0 and of 3x² − 4x + 2 = 0.
Show answer
For the first equation, D = 49 − 24 = 25, which is positive and a perfect square, so the roots are real, distinct, and rational (they are 3 and 1/2). For the second, D = 16 − 24 = −8, which is negative, so there are no real roots.
Exercise
Find all values of m for which (m − 1)x² + 4x + (m + 2) = 0 has real roots.
Show answer
First, m ≠ 1 so that the equation is quadratic. Real roots need D ≥ 0: 16 − 4(m − 1)(m + 2) ≥ 0. Expand (m − 1)(m + 2) = m² + m − 2, so 16 − 4m² − 4m + 8 ≥ 0, which gives 4m² + 4m − 24 ≤ 0, or m² + m − 6 ≤ 0. Factorising, (m + 3)(m − 2) ≤ 0, so −3 ≤ m ≤ 2. Excluding m = 1, the answer is −3 ≤ m ≤ 2 with m ≠ 1.
Exercise
For which values of k is 2x² + kx + 2 positive for every real x?
Show answer
The coefficient of x² is 2, which is positive, so we need D < 0. D = k² − 16 < 0, so k² < 16 and −4 < k < 4.