Reading and Analyzing Graphs

Graphing Rational Functions: Holes vs Vertical Asymptotes

To graph a rational function, factor the numerator and denominator. A factor that cancels from both gives a hole — a single missing point. A factor left in the denominator gives a vertical asymptote. Then find the horizontal or slant asymptote from the degrees, the intercepts, and a few test points in each interval.

Graph of y = (x + 2)(x − 1)/((x − 1)(x − 3)) with a hole at (1, −1.5), a vertical asymptote x = 3 and horizontal asymptote y = 1.

Check it yourself: every example here can be loaded into the Asymptote Calculator.

Open the Asymptote Calculator

Holes vs vertical asymptotes

Both happen where the denominator is zero. The difference is whether the zero cancels:

After factoring Result Graph
(x − a) on top and bottom, cancels hole single open circle
(x − a) only in the denominator vertical asymptote curve shoots to ±∞
Two panels. Left: y = (x² − 4)/(x − 2) is the line y = x + 2 with a hole at (2, 4). Right: y = (x + 2)/(x − 2) has a vertical asymptote at x = 2.
The same denominator factor gives a hole if it cancels and an asymptote if it does not.
Text description of this figure

Two panels. Left: y = (x² − 4)/(x − 2) is the line y = x + 2 with a hole at (2, 4). Right: y = (x + 2)/(x − 2) has a vertical asymptote at x = 2.

  1. Factor top and bottom.
  2. Cancelled factor (x − a): hole at x = a; find its y from the simplified form.
  3. Remaining factor in the denominator: vertical asymptote.

Example: (x² − 4)⁄(x − 2)

Factor: (x − 2)(x + 2)⁄(x − 2). The (x − 2) cancels, leaving x + 2 — but only for x ≠ 2. The graph is the line y = x + 2 with a hole at (2, 4) (the y-value comes from the simplified form: 2 + 2 = 4).

Try it in the calculator

Graphing a rational function: full method

Graph f(x) = (x² + x − 2)⁄(x² − 4x + 3).

  1. Factor: (x + 2)(x − 1)⁄((x − 1)(x − 3)).
  2. Domain: x ≠ 1 and x ≠ 3.
  3. Holes: (x − 1) cancels. Simplified: (x + 2)⁄(x − 3). At x = 1: (3)⁄(−2) = −1.5 → hole at (1, −1.5).
  4. Vertical asymptote: the remaining factor (x − 3) → x = 3.
  5. Horizontal asymptote: degrees equal (2 and 2), leading coefficients 1 and 1 → y = 1.
  6. Intercepts: x-intercept where x + 2 = 0 → (−2, 0). y-intercept f(0) = 2⁄(−3) = −2⁄3.
  7. Test points in each interval: f(2) = −4 (below), f(4) = 6 (above), f(10) ≈ 1.71 (approaches 1 from above).
  8. Sketch both branches, approaching the asymptotes, with an open circle at the hole.
Try it in the calculator

Behaviour near a vertical asymptote

Check the sign just left and right of x = 3 for (x + 2)⁄(x − 3):

  • x = 2.9: 4.9⁄(−0.1) = −49 → heads to −∞.
  • x = 3.1: 5.1⁄0.1 = 51 → heads to +∞.

So the left branch drops down and the right branch rises up.

Why holes matter

  • Domain: a hole removes one value from the domain, just like an asymptote.
  • Range: the hole’s y-value may also be missing from the range.
  • Continuity: a hole is a removable discontinuity — redefining one point would fix it. An asymptote is an infinite discontinuity that cannot be fixed. See continuity at piecewise boundaries.

Common mistakes

  • Forgetting the hole after cancelling. The original function is still undefined there.
  • Finding the hole’s y-value from the original formula (which gives 0⁄0). Use the simplified one.
  • Listing a hole as an x-intercept. If the numerator and denominator are both zero at x = a, it is a hole, not a root.
  • Joining branches across the asymptote.

For the asymptote rules in detail, see vertical, horizontal and slant asymptotes.

Questions

Why do some calculators not show the hole?

A hole is a single missing point, which is narrower than a pixel. This site marks holes with an open circle so you can see them.

Is a hole part of the domain?

No. The function is undefined at the hole, even though the simplified formula has a value there.

Can a factor be both a hole and an asymptote?

If (x − a) appears more times in the denominator than the numerator, it does not fully cancel and gives a vertical asymptote. It is a hole only when it cancels completely.

Graph your own example with the Asymptote Calculator — free, in your browser.

Try it now

Sources and further reading

Worked examples and figures were produced and checked with the Graphing Calculator Lab engine. See the editorial policy.

Related guides

More in Reading and Analyzing Graphs · All guides