How to Find the Roots of a Function

A root of a function is a value that makes the function equal zero. On a graph, the roots are the points where the curve crosses the \(x\)-axis. They're also called zeros for that reason.

For \(f(x) = 2 - x\), the only root is \(x = 2\), since that's the value that makes \(f(x) = 0\). Finding roots is easy for a linear function like that. It gets more interesting with rational functions, where you have to consider the denominator as well.

A Worked Example

Find the roots of

$$f(x) = \frac{(2x - 3)(x + 3)}{x(x - 2)}$$

The procedure breaks into three steps.

Step 1 — Set each factor in the numerator equal to zero.

The numerator is a product of two factors, \((2x - 3)\) and \((x + 3)\). A product is zero exactly when one of its factors is zero, so set each one to zero and solve:

$$2x - 3 = 0 \implies x = \frac{3}{2}$$

$$x + 3 = 0 \implies x = -3$$

Step 2 — Check the denominator.

A potential root only counts as a real root if it doesn't also make the denominator zero (which would make the function undefined there). The denominator factors are \(x\) and \((x - 2)\), so the denominator is zero at \(x = 0\) and \(x = 2\).

Neither \(\frac{3}{2}\) nor \(-3\) matches those, so both candidates survive as actual roots.

Step 3 — Report the roots.

The roots are \(x = \frac{3}{2}\) and \(x = -3\). On the graph, the curve crosses the \(x\)-axis at \(\left(\frac{3}{2}, 0\right)\) and \((-3, 0)\).

Where the Denominator Zeros Go

The values \(x = 0\) and \(x = 2\), the ones that make the denominator zero, aren't roots — the function is undefined there. They're vertical asymptotes instead. The graph approaches but never touches those vertical lines.

Graph of the rational function showing both x-intercepts and both vertical asymptotes

Roots and vertical asymptotes are easy to confuse because both come from setting something equal to zero. The distinction:

  • Numerator factor = 0 → root (crosses the \(x\)-axis here)
  • Denominator factor = 0 → vertical asymptote (function is undefined here)

If the same factor appears in both numerator and denominator and cancels, that's a hole in the graph instead — a single missing point rather than an asymptote. See graphing rational functions for the full breakdown.

Roots of Other Function Types

Rational functions are one common case, but roots show up for any function:

  • Linear: \(f(x) = ax + b\) has one root, found by solving \(ax + b = 0\) for \(x\).
  • Quadratic: \(f(x) = ax^2 + bx + c\) has up to two roots. Use factoring or the quadratic formula.
  • Polynomial (higher degree): factor when possible; otherwise numerical or graphical methods may be needed.
  • Rational: as above, set the numerator to zero and verify the denominator isn't also zero at those points.

Practice Problems

1. Find the roots of \(f(x) = x^2 - 5x + 6\). Show answerFactor: \(x^2 - 5x + 6 = (x - 2)(x - 3)\). Roots: \(x = 2\) and \(x = 3\).

2. Find the roots of \(g(x) = \dfrac{x^2 - 1}{x + 4}\). Show answerNumerator factors: \(x^2 - 1 = (x-1)(x+1)\). Candidate roots: \(x = 1\) and \(x = -1\). Denominator zero at \(x = -4\) — neither candidate matches, so both are valid roots.

3. Find the roots of \(h(x) = \dfrac{x^2 - 9}{x - 3}\). Show answerNumerator factors: \(x^2 - 9 = (x-3)(x+3)\). Candidates: \(x = 3\) and \(x = -3\). But \(x = 3\) also makes the denominator zero — it's a hole, not a root. Only \(x = -3\) is an actual root.

4. Find the roots of \(k(x) = 2x^2 + 5x - 3\). Show answerFactor: \(2x^2 + 5x - 3 = (2x - 1)(x + 3)\). Roots: \(x = \frac{1}{2}\) and \(x = -3\).