In short

The discriminant tells you how many real roots a quadratic has. Location-of-roots conditions tell you where those roots sit on the number line — whether both are positive, both lie in a specific interval, one root is on each side of a given number, and so on. The key tool is the value of the quadratic expression f(k) at strategic points, combined with the discriminant and the axis of symmetry.

Take the equation x^2 - 5x + 4 = 0. The discriminant is 25 - 16 = 9 > 0, so two distinct real roots exist. You can factor it: (x - 1)(x - 4) = 0, giving x = 1 and x = 4. Both roots are positive. Both lie between 0 and 5. Both are greater than -1. Exactly one root lies between 0 and 2.

Each of those statements is a statement about the location of the roots — not just their existence, but their position on the number line. The discriminant alone cannot tell you any of this. You need a sharper set of tools.

These tools turn out to be surprisingly visual. The quadratic f(x) = ax^2 + bx + c is a parabola, and the roots are where it crosses the x-axis. Asking "are both roots greater than 3?" is the same as asking "does the parabola cross the axis, and does it do so entirely to the right of x = 3?" You can see the answer in the graph — and the algebra just translates what the picture shows into inequalities you can check.

The master idea: read the parabola

Here is the central insight. Suppose a > 0, so the parabola opens upward. If you pick a point x = k and evaluate f(k), you learn something about where the roots are relative to k.

Parabola showing sign of f(k) relative to rootsAn upward-opening parabola with roots at r1 and r2. Three vertical dashed lines at positions k1, k2, k3 show how f(k) is positive when k is outside the roots and negative when k is between them. x y r₁ r₂ f(k₁) > 0 f(k₂) < 0 f(k₃) > 0
For an upward-opening parabola ($a > 0$) with roots $r_1$ and $r_2$: any point $k$ to the left of both roots gives $f(k) > 0$; a point between the roots gives $f(k) < 0$; a point to the right of both roots gives $f(k) > 0$ again. The sign of $f(k)$ tells you which side of the roots you are on.

The logic is clean:

When a < 0 (parabola opens downward), the signs reverse: f(k) < 0 outside the roots, f(k) > 0 between them. In every case, the sign of f(k) relative to a gives the information.

This one observation — the sign of f(k) tells you where k stands relative to the roots — is the engine behind every location-of-roots condition.

The three ingredients

Every location-of-roots problem uses some combination of three ingredients:

  1. The discriminant D = b^2 - 4ac \geq 0 — ensures the roots are real.
  2. The value f(k) at one or more strategic points — tells you whether k is between, to the left, or to the right of the roots.
  3. The axis of symmetry x = -b/(2a) — tells you where the vertex (midpoint of the roots) sits.

Different questions about root location require different combinations. Here are the major cases.

Case 1: Both roots greater than a number k

You want both roots of f(x) = ax^2 + bx + c = 0 to satisfy r_1 > k and r_2 > k. Assume a > 0.

Both roots greater than kAn upward-opening parabola with both roots to the right of a vertical line at x equals k. The vertex sits to the right of k, and f(k) is positive. x r₁ r₂ k f(k) > 0 vertex
Both roots to the right of $k$. Three things must be true simultaneously: real roots exist ($D \geq 0$), $k$ lies to the left of both roots so $f(k) > 0$, and the vertex (midpoint of the roots) is to the right of $k$.

Three conditions must hold simultaneously:

D \geq 0, \qquad af(k) > 0, \qquad -\frac{b}{2a} > k

The condition af(k) > 0 instead of just f(k) > 0 handles both cases: when a > 0, it reduces to f(k) > 0; when a < 0, it becomes f(k) < 0, which is the correct condition for a downward parabola. Note that af(k) > 0 alone cannot distinguish "both roots to the right of k" from "both roots to the left of k" — in both situations the point k lies outside the roots, so f(k) has the same sign as the leading coefficient. The vertex condition resolves this ambiguity: the vertex is always between the two roots, so requiring -\frac{b}{2a} > k forces the vertex (and therefore both roots) to lie to the right of k.

Case 2: Both roots less than a number k

By symmetry with Case 1, the conditions are:

D \geq 0, \qquad af(k) > 0, \qquad -\frac{b}{2a} < k

Everything mirrors: f(k) > 0 (when a > 0) means k is outside the roots, and the vertex being to the left of k ensures both roots are to the left.

Case 3: The number k lies between the roots

You want r_1 < k < r_2. This is the simplest case of all.

Number k between the two rootsAn upward-opening parabola with a vertical dashed line at k between the two roots. f(k) is negative because k is in the region where the parabola is below the axis. x r₁ r₂ k f(k) < 0
When $k$ sits between the two roots, the parabola is below the $x$-axis at $x = k$, so $f(k) < 0$. This single condition is enough — it automatically guarantees that real roots exist and that they straddle $k$.

The condition is just:

af(k) < 0

That is the entire requirement. You do not need to separately check D \geq 0 or the vertex position. Here is why: if f(k) and a have opposite signs (which is what af(k) < 0 says), then the parabola is on the opposite side of the axis from where it opens. For a > 0, the parabola opens upward but f(k) < 0, meaning the curve is below the axis at x = k. The only way an upward parabola can be below the axis is if k is between two real roots. So the existence of real roots is automatic — forced by the sign condition itself.

This is the most elegant of all the cases, and the most frequently tested.

Case 4: Both roots in an interval (p, q)

You want p < r_1 and r_2 < q — both roots trapped inside the interval (p, q).

Both roots inside the interval (p, q)An upward-opening parabola with both roots between two vertical dashed lines at p and q. The vertex also lies between p and q. f(p) and f(q) are both positive. x r₁ r₂ p q f(p) > 0 f(q) > 0 vertex
Both roots inside $(p, q)$. The parabola is above the axis at both endpoints ($f(p) > 0$ and $f(q) > 0$), the vertex lies between $p$ and $q$, and the discriminant is non-negative.

This requires four conditions:

D \geq 0, \qquad af(p) > 0, \qquad af(q) > 0, \qquad p < -\frac{b}{2a} < q

Think of it as combining "both roots greater than p" with "both roots less than q." Both endpoints must be outside the roots (so f(p) and f(q) have the same sign as a), the vertex must sit inside the interval, and the roots must be real.

Case 5: Exactly one root in an interval (p, q)

You want exactly one root between p and q — the other root sits outside. For this, you need the parabola to be on opposite sides of the axis at the two endpoints:

f(p) \cdot f(q) < 0

If f(p) and f(q) have opposite signs, the continuous curve must cross the axis at least once between p and q. For a quadratic (which crosses the axis at most twice), opposite signs at p and q guarantee exactly one crossing in the interval — the other crossing is outside.

Both roots positive, both roots negative

These are special cases of "both roots greater than a number" with k = 0.

Both roots positive (r_1 > 0 and r_2 > 0):

D \geq 0, \qquad af(0) > 0, \qquad -\frac{b}{2a} > 0

Since f(0) = c, this simplifies to D \geq 0, \;ac > 0, \;-b/(2a) > 0. The condition ac > 0 means a and c have the same sign. The vertex condition -b/(2a) > 0 means b and a have opposite signs.

Both roots negative (r_1 < 0 and r_2 < 0):

D \geq 0, \qquad af(0) > 0, \qquad -\frac{b}{2a} < 0

This gives D \geq 0, \;ac > 0, \;and b/(2a) > 0 (i.e., a and b have the same sign).

There is a neat shortcut using Vieta's formulas. For f(x) = ax^2 + bx + c, the sum of roots is -b/a and the product is c/a. Both roots positive means sum positive and product positive: -b/a > 0 and c/a > 0. Both roots negative means sum negative and product positive: -b/a < 0 and c/a > 0. These give the same conditions as above, just phrased differently.

An interactive location explorer

Drag the red point to move a test value k along the x-axis. Watch f(k) change sign as k crosses each root of f(x) = x^2 - 5x + 4.

Interactive location-of-roots explorer for x squared minus 5x plus 4A horizontal slider from x equals negative 1 to x equals 7. A draggable red point controls the test value k. Readouts display k and the value of f(k). The roots of the quadratic are at x equals 1 and x equals 4, so f(k) is positive outside these roots and negative between them. −1 0 1 2 3 4 5 6 drag to change k
Drag the red point to vary $k$. When $k < 1$ or $k > 4$, $f(k)$ is positive — you are outside both roots. When $1 < k < 4$, $f(k)$ is negative — you are between the roots. At $k = 1$ and $k = 4$ exactly, $f(k) = 0$ — you have landed on a root.

The formal statement

Location of roots conditions

Let f(x) = ax^2 + bx + c with a \neq 0, and let D = b^2 - 4ac.

Both roots greater than k: \;D \geq 0, \;af(k) > 0, \;-b/(2a) > k.

Both roots less than k: \;D \geq 0, \;af(k) > 0, \;-b/(2a) < k.

k lies between the roots: \;af(k) < 0.

Both roots in (p, q): \;D \geq 0, \;af(p) > 0, \;af(q) > 0, \;p < -b/(2a) < q.

Exactly one root in (p, q): \;f(p) \cdot f(q) < 0.

Notice how the "k between the roots" case needs only one condition, while "both roots in an interval" needs four. The more you constrain the roots, the more conditions you need.

Example 1: Find values of k for which both roots of x² − 6x + k = 0 are greater than 2

Step 1. Set up the quadratic. Here f(x) = x^2 - 6x + k, with a = 1, b = -6, c = k.

Why: the parameter k appears as the constant term. Varying k shifts the parabola up and down without changing its shape or the position of its axis of symmetry.

Step 2. Apply the three conditions for "both roots greater than 2."

Condition 1: D \geq 0.

D = 36 - 4k \geq 0 \implies k \leq 9

Condition 2: af(2) > 0. Since a = 1 > 0, this is f(2) > 0.

f(2) = 4 - 12 + k = k - 8 > 0 \implies k > 8

Condition 3: Axis of symmetry > 2.

-\frac{b}{2a} = \frac{6}{2} = 3 > 2 \quad \checkmark

Why: the axis of symmetry is at x = 3 regardless of k, so this condition is automatically satisfied. Changing k moves the parabola vertically but does not shift it horizontally.

Step 3. Combine the three conditions: k \leq 9 and k > 8 and (automatically true). So:

8 < k \leq 9

Step 4. Verify the boundary. At k = 9: f(x) = x^2 - 6x + 9 = (x - 3)^2, so the repeated root is x = 3 > 2. At k = 8: f(x) = x^2 - 6x + 8 = (x - 2)(x - 4), roots at 2 and 4. But we need both roots strictly greater than 2, and x = 2 is not greater than 2 — so k = 8 is excluded.

Result. k \in (8, 9].

Three parabolas showing how k controls root location for x squared minus 6x plus kThree upward-opening parabolas with the same axis of symmetry at x equals 3 but different values of k. At k equals 7, roots are at approximately 1.59 and 4.41 — one root is less than 2. At k equals 8, roots are at exactly 2 and 4 — the boundary case. At k equals 8.5, roots are at approximately 2.29 and 3.71 — both greater than 2. x y 1 2 3 4 5 x = 2 k = 7 k = 8 k = 8.5
Three parabolas with the same axis of symmetry $x = 3$ but different values of $k$. At $k = 7$ (light), one root is to the left of $x = 2$ — the condition fails. At $k = 8$, a root sits exactly at $x = 2$ — boundary. At $k = 8.5$ (red), both roots are safely to the right of $x = 2$, confirming $k \in (8, 9]$.

The picture confirms the algebra: as k increases from 8 toward 9, both roots squeeze toward the vertex at x = 3, staying to the right of x = 2 throughout. At k = 9 they merge at x = 3, and for k > 9 the roots become complex — the parabola lifts off the axis entirely.

Example 2: Find values of m so that 2 lies between the roots of x² − (m + 1)x + (m − 1) = 0

Step 1. Set up the quadratic. f(x) = x^2 - (m+1)x + (m-1), with a = 1, b = -(m+1), c = m - 1.

Why: "2 lies between the roots" is Case 3, the cleanest of all the cases. You only need one condition.

Step 2. Apply the condition af(2) < 0. Since a = 1, this is just f(2) < 0.

f(2) = 4 - 2(m+1) + (m-1) = 4 - 2m - 2 + m - 1 = 1 - m

Why: plug x = 2 into the quadratic. Each arithmetic step is straightforward — just track the signs carefully.

Step 3. Solve f(2) < 0:

1 - m < 0 \implies m > 1

Step 4. Verify with a specific value. Take m = 3: f(x) = x^2 - 4x + 2. Discriminant: 16 - 8 = 8 > 0. Roots: 2 \pm \sqrt{2} \approx 0.59 and 3.41. Indeed, 2 lies between them.

Result. m > 1, i.e., m \in (1, \infty).

Parabola for m equals 3 showing x equals 2 between the rootsAn upward-opening parabola for f(x) equals x squared minus 4x plus 2 (the case m equals 3). The roots are at approximately 0.59 and 3.41, and the vertical line x equals 2 is drawn between them, with f(2) equals negative 2 shown below the axis. x y 1 2 3 4 2 − √2 2 + √2 f(2) = −2
With $m = 3$, the parabola $y = x^2 - 4x + 2$ dips below the axis at $x = 2$, confirming that $2$ lies between the roots. The negative value $f(2) = -2$ is the geometric signature of a test point sitting between two real roots.

The single condition af(k) < 0 did all the work. No discriminant check was needed, no vertex position — the sign of f(2) alone was enough to force the roots to straddle 2.

Common confusions

Going deeper

If you came here to learn the location-of-roots conditions and see how they work in examples, you have that — you can stop here. What follows is for readers who want to understand why these conditions work from a single unified perspective.

The unified view: sign charts

Every location-of-roots condition boils down to asking about the sign of the quadratic at specific points. The expression f(x) = a(x - r_1)(x - r_2) changes sign only at the roots r_1 and r_2. For a > 0:

f(x) > 0 \text{ when } x < r_1 \text{ or } x > r_2
f(x) < 0 \text{ when } r_1 < x < r_2
f(x) = 0 \text{ when } x = r_1 \text{ or } x = r_2

This is a sign chart — and it is the foundation of every condition in this article. "Both roots greater than k" translates to "k < r_1," which means f(k) > 0 and vertex to the right of k. "k between the roots" translates to "r_1 < k < r_2," which means f(k) < 0. The sign chart is the single picture from which everything follows.

Conditions involving the roots straddling two numbers

Sometimes you need one root in (p, q) and the other root outside. This requires f(p) and f(q) to have opposite signs, but the vertex need not lie in (p, q). The condition f(p) \cdot f(q) < 0 handles this cleanly.

A harder variant: one root in (p, q) and the other in (r, s) where the intervals don't overlap. Here you need f(p) \cdot f(q) < 0 and f(r) \cdot f(s) < 0 simultaneously. Each condition pins down one root.

Extension to cubics and beyond

The location-of-roots approach extends to higher-degree polynomials, but with rapidly increasing complexity. For a cubic f(x) = a(x - r_1)(x - r_2)(x - r_3), the sign chart has three sign changes instead of two, and you need to evaluate f at more test points. The same principle holds — the sign of f(k) tells you which roots k is between — but the conditions become systems of more inequalities. This is where the wavy curve method (covered in the next article) becomes essential.

Where this leads next