How To Graph A Rational Function: Step-by-Step Guide

11 min read

How to Graph a Rational Function

Ever stared at a problem that says "graph this rational function" and felt your stomach drop? But here's the thing: once you know the system, it's actually pretty straightforward. Think about it: there are specific steps you follow, clues to look for, and patterns that repeat. Rational functions — those tricky expressions with polynomials in both the numerator and denominator — can make even math-confident students break out in a sweat. Think about it: you're not alone. This guide will walk you through the entire process from start to finish, with plenty of examples along the way.

Quick note before moving on.

What Is a Rational Function?

A rational function is simply a function formed by dividing one polynomial by another. The general form looks like this:

f(x) = P(x) / Q(x)

where P(x) and Q(x) are both polynomials, and critically, Q(x) cannot equal zero (because dividing by zero doesn't work).

Some examples to make this concrete:

  • f(x) = 1/x
  • f(x) = (x + 2) / (x - 3)
  • f(x) = (x² - 4) / (x² - 9)
  • f(x) = (2x³ + x² - 5) / (x² + 1)

The first one is the simplest rational function you'll encounter — a hyperbola. The others get progressively more complex, but they all follow the same underlying rules.

What makes rational functions interesting (and challenging) is that they often have asymptotes — invisible lines the graph approaches but never touches. They can also have holes in the graph where the function is undefined, and their behavior can change dramatically depending on whether x is positive or negative.

Why Asymptotes Matter

Here's the key insight: asymptotes essentially act like "boundaries" for your graph. The rational function will get closer and closer to these lines as x or y gets very large (or approaches a specific value), but it will never actually cross a vertical asymptote. Think about it: horizontal and oblique asymptotes? The graph can cross those, but it tends to flatten out toward them far from the origin.

Understanding asymptotes is the difference between guessing and knowing where your graph should go. That's why finding them is usually the first step.

Why Graphing Rational Functions Matters

You might be wondering — why bother learning this at all? Fair question Practical, not theoretical..

Rational functions show up in real-world contexts more often than you'd think. They model situations involving rates, like speed varying with time, or population growth that approaches a carrying capacity. Consider this: in physics, they appear in circuits and gravitational fields. In economics, they can represent cost functions with asymptotic behavior.

But even if you're just taking a math class, here's what's worth knowing: graphing rational functions pulls together almost everything you've learned about polynomials, factoring, limits, and function behavior. It's like a final exam in disguise — master this, and you've got a solid handle on a huge chunk of algebra Easy to understand, harder to ignore..

Plus, there's a satisfaction to it. You start with an abstract equation, follow a process, and end up with something you can actually see and draw. That's the point of math, really — taking ideas and making them tangible.

How to Graph a Rational Function

Here's the step-by-step process. I'll walk through each stage in detail, then show you how it comes together with a complete example.

Step 1: Factor Both Polynomials

Start by factoring the numerator and denominator completely. This is crucial because factoring reveals:

  • Zeros of the function (where the graph crosses the x-axis) — these come from factors in the numerator
  • Vertical asymptotes (where the function is undefined) — these come from factors in the denominator
  • Holes ( removable discontinuities) — these happen when the same factor appears in both numerator and denominator

Take this: let's graph:

f(x) = (x² - 4) / (x² - 9)

Factor both parts:

  • Numerator: x² - 4 = (x + 2)(x - 2)
  • Denominator: x² - 9 = (x + 3)(x - 3)

Now you can see exactly where interesting things will happen: at x = -2, 2, -3, and 3.

Step 2: Find the Domain

The domain is all real numbers except where the denominator equals zero. Those x-values are either holes or vertical asymptotes.

From our factored form, the denominator is zero at x = -3 and x = 3. So the domain is all real numbers except x ≠ -3 and x ≠ 3.

Step 3: Find Vertical Asymptotes and Holes

This is where factoring pays off. Look at each factor in the denominator:

  • If a factor does not cancel with a factor in the numerator, you get a vertical asymptote at that x-value.
  • If a factor does cancel with a factor in the numerator, you get a hole (a single point that's not included) at that x-value.

In our example, (x + 2)(x - 2) / (x + 3)(x - 3), none of the factors cancel. So we have:

  • Vertical asymptote at x = -3
  • Vertical asymptote at x = 3

No holes in this one Worth knowing..

Step 4: Find the Horizontal or Oblique Asymptote

This depends on the degrees of the numerator and denominator:

  • If the degree of the numerator is less than the degree of the denominator, the horizontal asymptote is y = 0 (the x-axis).
  • If the degrees are equal, the horizontal asymptote is y = (leading coefficient of numerator) / (leading coefficient of denominator).
  • If the numerator's degree is exactly one more than the denominator's degree, you have an oblique (slant) asymptote. You'll need to perform polynomial long division to find it.
  • If the numerator's degree is greater by more than one, there's no horizontal or oblique asymptote — instead, the graph behaves like a polynomial.

In our example, both the numerator and denominator are degree 2. The leading coefficients are both 1. So the horizontal asymptote is y = 1/1 = y = 1.

Step 5: Find Intercepts

x-intercepts happen when the numerator equals zero (but the denominator doesn't). Set the numerator equal to zero and solve:

For f(x) = (x² - 4) / (x² - 9), the numerator is zero when x² - 4 = 0, so x = 2 or x = -2. Both are in the domain (they're not where the denominator is zero), so we have x-intercepts at (-2, 0) and (2, 0).

y-intercept happens when x = 0. Plug in x = 0:

f(0) = (0² - 4) / (0² - 9) = (-4) / (-9) = 4/9

So the y-intercept is at (0, 4/9) Simple, but easy to overlook..

Step 6: Plot Points and Sketch

Now you have everything you need:

  • Vertical asymptotes at x = -3 and x = 3 (draw dashed lines)
  • Horizontal asymptote at y = 1 (draw a dashed line)
  • x-intercepts at (-2, 0) and (2, 0)
  • y-intercept at (0, 4/9)

Plot a few more points in each region to see which direction the graph goes. Pick values between the asymptotes and on either side:

  • At x = -4: f(-4) = ((16-4)/(16-9)) = 12/7 ≈ 1.71 (above the horizontal asymptote)
  • At x = -2: this is the x-intercept, f(-2) = 0
  • At x = -1: f(-1) = ((1-4)/(1-9)) = (-3)/(-8) = 3/8 = 0.375 (below the horizontal asymptote)
  • At x = 0: f(0) = 4/9 ≈ 0.444
  • At x = 1: f(1) = ((1-4)/(1-9)) = (-3)/(-8) = 3/8 = 0.375
  • At x = 2: x-intercept, f(2) = 0
  • At x = 4: f(4) = ((16-4)/(16-9)) = 12/7 ≈ 1.71

Now connect the dots while respecting the asymptotes. The graph should approach the vertical asymptotes from above or below, and flatten toward y = 1 as you move left and right.

A More Complex Example: With a Hole

Let's try one where a factor cancels:

f(x) = (x² - 9) / (x² - 4)

Factor: (x + 3)(x - 3) / (x + 2)(x - 2)

Wait — this is actually the same as our first example, just flipped. Here, the numerator and denominator have the same factors, just arranged differently. The domain excludes x = -2 and x = 2 The details matter here. Nothing fancy..

But here's the difference: if we had something like f(x) = (x² - 9) / (x(x - 3)), we could cancel the (x - 3) factor. That would give us a hole at x = 3, not a vertical asymptote. The graph would be undefined at that single point, even though the simplified form would suggest it's defined.

It's one of the most common places students mess up — forgetting that cancelled factors create holes, not asymptotes.

Common Mistakes to Avoid

Let me save you some pain here. These are the errors I see most often:

Forgetting that cancelled factors create holes. If (x - 2) appears in both numerator and denominator, you can simplify — but the original function is still undefined at x = 2. Draw an open circle on your graph there.

Drawing the graph crossing vertical asymptotes. It won't. The function is undefined at those x-values, so there's nothing to cross. The graph approaches from one side and disappears.

Assuming the graph can't cross the horizontal asymptote. It can — and often does, especially near x = 0. The asymptote just describes the end behavior, not what happens in the middle Simple as that..

Not factoring completely. Working with unfactored polynomials makes it nearly impossible to find intercepts and asymptotes correctly. Always factor first.

Ignoring the sign changes between asymptotes. Rational functions often flip between positive and negative in each region created by the vertical asymptotes. Check a point in each region to know which way to draw.

Practical Tips That Actually Help

Here's what I'd tell a student sitting in front of me:

  • Always sketch the asymptotes first, lightly dashed. They act like guardrails for your graph.
  • Work from the middle outward. Start near x = 0, then move left and right region by region.
  • Use the "plug-and-chug" method — pick x-values in each region and evaluate. Three or four points per region is usually enough to see the pattern.
  • Check your work by substituting points into the original function. If something looks off, re-evaluate that point.
  • For oblique asymptotes, do the division and ignore the remainder. The quotient line is your asymptote.

One more thing: if you're ever unsure whether something is a hole or an asymptote, go back to the factored form. Same factor in numerator and denominator? In real terms, hole. Only in denominator? Vertical asymptote That's the whole idea..

Frequently Asked Questions

What's the difference between a hole and a vertical asymptote?

A hole occurs when a factor cancels out of both the numerator and denominator — the function simplifies to remove that factor, but the original function is still undefined at that point. A vertical asymptote happens when a factor in the denominator doesn't cancel, creating a value where the function is undefined and shoots toward infinity Most people skip this — try not to. Worth knowing..

Can a rational function cross its horizontal asymptote?

Yes, absolutely. Here's the thing — a horizontal (or oblique) asymptote describes the behavior of the function as x gets very large in magnitude. The function can cross this line multiple times — it just tends to flatten out toward it far from the origin.

How do I find an oblique asymptote?

When the numerator's degree is exactly one more than the denominator's degree, perform polynomial long division. The quotient (ignoring the remainder) gives you the equation of the oblique asymptote. As an example, if you get (x + 2) with some remainder, the oblique asymptote is y = x + 2.

What if the numerator's degree is higher than the denominator's by more than one?

Then there's no horizontal or oblique asymptote. The graph will behave like a polynomial — going up or down without flattening toward a particular y-value as x gets large.

How do I know which side of a vertical asymptote the graph approaches from?

Pick a test point slightly to the left and slightly to the right of the asymptote. Because of that, plug each into the function (or just look at the sign of the factors). This tells you whether the graph comes from above or below.


The first time you graph a rational function, it feels like a lot of steps. But here's the secret: it becomes automatic pretty quickly. Factor, find the domain, identify asymptotes and holes, locate intercepts, plot a few points, and connect the dots. That's it.

Once you've done it a few times, you'll start seeing the patterns. The process becomes second nature. And honestly, there's something satisfying about taking a messy rational function and turning it into a clean, accurate graph. You start with something abstract and end up with something you can draw by hand And that's really what it comes down to..

So grab some graph paper, pick a function, and get started. The only way to get comfortable is to practice.

New In

Hot Right Now

More of What You Like

Related Reading

Thank you for reading about How To Graph A Rational Function: Step-by-Step Guide. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home