Stuck on this? Solve it with AI
algebra

Graphing Rational Functions: Asymptotes, Holes, and Intercepts

A workflow for graphing rational functions — finding vertical, horizontal, and slant asymptotes, holes from common factors, and intercepts.
AI-Math Editorial Team

By AI-Math Editorial Team

Published 2026-05-01

Rational functions f(x)=P(x)Q(x)f(x) = \frac{P(x)}{Q(x)} produce some of the most distinctive graphs in algebra — branches diverging to infinity, holes you cannot see at first, and asymptotes that the curve hugs forever without crossing. This guide gives you a checklist to graph any rational function.

The 5-step workflow

  1. Factor numerator and denominator completely.
  2. Identify holes at common factors (cancel them, but mark the x-values as holes).
  3. Vertical asymptotes at remaining zeros of the denominator.
  4. Horizontal or slant asymptote from the degree comparison.
  5. Intercepts: y-intercept at f(0)f(0) if defined; x-intercepts at zeros of the simplified numerator.

Step-by-step on f(x)=x21x2x6f(x) = \frac{x^2 - 1}{x^2 - x - 6}

Factor

f(x)=(x1)(x+1)(x3)(x+2)f(x) = \frac{(x-1)(x+1)}{(x-3)(x+2)}

No common factors → no holes.

Vertical asymptotes

Denominator zeros are x=3x = 3 and x=2x = -2. Two vertical asymptotes.

Horizontal asymptote

Degree of numerator (2) = degree of denominator (2). The horizontal asymptote is the ratio of leading coefficients: y=1/1=1y = 1/1 = 1.

Intercepts

  • f(0)=(1)(1)/((3)(2))=1/6=1/6f(0) = (-1)(1)/((-3)(2)) = -1 / -6 = 1/6. y-intercept: (0,1/6)(0, 1/6).
  • Numerator zeros: x=1x = 1 and x=1x = -1. x-intercepts at those.

Sketch

Two vertical asymptotes split the x-axis into three regions. In each, test a sample point to see if ff is positive or negative. The graph approaches y=1y = 1 as x±x \to \pm\infty and crosses through the intercepts found above.

The asymptote rules in one table

Compare degreesAsymptote type
deg(P) < deg(Q)y=0y = 0 horizontal
deg(P) = deg(Q)y=a/by = a/b horizontal (ratio of leading coeffs)
deg(P) = deg(Q) + 1slant asymptote (do polynomial long division)
deg(P) ≥ deg(Q) + 2no horizontal/slant; ends fly off polynomially

Worked example: a hole

g(x)=x24x2=(x2)(x+2)x2g(x) = \frac{x^2 - 4}{x - 2} = \frac{(x-2)(x+2)}{x-2}

Cancel: g(x)=x+2g(x) = x + 2 for x2x \ne 2. Graph the line y=x+2y = x + 2 with an open circle at (2,4)(2, 4) — that is the hole.

Common mistakes

  • Forgetting holes — cancelling factors removes vertical asymptotes but leaves holes.
  • Mis-applying the horizontal asymptote rule when degrees differ.
  • Assuming graphs never cross horizontal asymptotes — they often do, just never as x±x \to \pm\infty.

Try with the AI Equation Solver

Plug your rational function into the Equation Solver to factor it and identify zeros / poles automatically.

Related references:

Frequently Asked Questions

Cancel any common factors between numerator and denominator, then set the remaining denominator equal to zero. The values where the denominator is zero (and numerator is not) give vertical asymptotes; cancelled factors give holes.

Compare the degrees of numerator (n) and denominator (m). If n < m, horizontal asymptote y = 0. If n = m, y equals the leading coefficient ratio. If n = m + 1, divide to find an oblique asymptote. If n > m + 1, neither type exists.

Set the numerator equal to zero and solve. Any root of the numerator that is NOT also a root of the denominator gives an x-intercept. Shared roots create holes (removable discontinuities), not intercepts.

AI-Math Editorial Team

By AI-Math Editorial Team

Published 2026-05-01

A small team of engineers, mathematicians, and educators behind AI-Math, focused on making step-by-step math help accessible to every student.