TOPIC

Graphs of rational functions

MY PROGRESS

Pug Score

0%

Best Streak

0 in a row

Study Points

+0

Overview

Practice

Watch

Read

Quiz

Next Steps


Get Started

Get unlimited access to all videos, practice problems, and study tools.

Unlimited practice
Full videos

Back to Menu

Topic Progress

Pug Score

0%

Videos Watched

0/0

Best Practice

No score

Read

Not viewed

Best Quiz

No attempts


Best Streak

0 in a row

Study Points

+0

Read

Graphs of Rational Functions

A clear walkthrough of graphing rational functions: how to find vertical and horizontal asymptotes, when a slant asymptote appears, how holes differ from asymptotes, and how to sketch end behavior with worked examples.

What Does a Rational Function Graph Look Like?

A rational function is a fraction of two polynomials, \(f(x) = \frac{p(x)}{q(x)}\), where \(q(x) \ne 0\). If you haven't seen the formal setup yet, it helps to review what is a rational function before tackling the graph, since everything about the shape of the curve comes from that fraction structure.

Because the denominator can equal zero at certain \(x\)-values, rational graphs are broken into pieces instead of drawing as one smooth, unbroken curve like a polynomial does. Those breaks show up as vertical asymptotes or holes, and the graph also settles into a predictable pattern far to the left and right, described by a horizontal or slant asymptote.

The simplest possible rational function is the reciprocal function, \(f(x) = \frac{1}{x}\). It splits into two separate branches, one in the upper right and one in the lower left, and it never touches either axis.

Graph of y equals 1 over x showing two branches with asymptotes at x equals 0 and y equals 0 Plot of y = 1/x for x in [-5, 5] -4 -2 0 2 4 -10 0 10 x y point on graph point on graph
The graph of \(y = \frac{1}{x}\), with a vertical asymptote at \(x = 0\) and a horizontal asymptote at \(y = 0\).

Every other rational graph is a stretched, shifted, or more complicated version of this same idea: pieces of curve that approach lines but never quite reach them.

Vertical Asymptotes: Where the Function Blows Up

A vertical asymptote occurs at any \(x\)-value that makes the denominator zero, as long as that same factor does not also cancel with the numerator. Near a vertical asymptote, the function values grow without bound, either shooting up toward positive infinity or down toward negative infinity on each side.

To find vertical asymptotes:

  1. Factor the numerator and denominator completely.
  2. Cancel any factors that appear in both (these produce holes, not asymptotes — more on that below).
  3. Set what's left of the denominator equal to zero and solve for \(x\).

For \(f(x) = \frac{2x-1}{x+3}\), the denominator is zero when \(x = -3\), and that factor does not cancel with the numerator, so \(x = -3\) is a vertical asymptote.

Horizontal Asymptotes and End Behavior of a Rational Function

A horizontal asymptote describes what happens to \(f(x)\) as \(x\) moves toward positive or negative infinity, the end behavior of the graph. You find it by comparing the degree of the numerator to the degree of the denominator:

  • If the numerator's degree is less than the denominator's degree, the horizontal asymptote is \(y = 0\).
  • If the degrees are equal, the horizontal asymptote is \(y = \frac{a}{b}\), the ratio of the leading coefficients.
  • If the numerator's degree is exactly one more than the denominator's degree, there is no horizontal asymptote; instead the graph has a slant asymptote.
  • If the numerator's degree is two or more higher than the denominator's degree, there is no straight-line asymptote at all, though the end behavior still follows a predictable curve.

For a full breakdown of the three cases with more examples, see how to identify horizontal asymptotes. For \(f(x) = \frac{2x-1}{x+3}\), both degrees are 1, so the horizontal asymptote is \(y = \frac{2}{1} = 2\).

Slant Asymptotes

When the numerator's degree is exactly one greater than the denominator's degree, the graph doesn't level off toward a horizontal line at all. Instead it approaches a slanted line, called a slant (or oblique) asymptote, found by dividing the numerator by the denominator using polynomial long division and keeping just the quotient (ignoring the remainder). For example, \(f(x) = \frac{x^2+1}{x}\) simplifies to \(x + \frac{1}{x}\), so its slant asymptote is the line \(y = x\).

A dedicated walkthrough of this case, with more practice problems, is available on the slant asymptote page.

Holes in Rational Functions

Not every break in a rational graph is an asymptote. If a factor cancels completely between the numerator and denominator, the function is still undefined at that \(x\)-value, but instead of blowing up, the graph simply has a single missing point, a hole. This kind of break is also called a point of discontinuity.

Consider \(f(x) = \frac{x^2-1}{x-1}\). Factoring the numerator gives \(\frac{(x-1)(x+1)}{x-1}\), and the \((x-1)\) cancels, leaving \(f(x) = x+1\) for every value except \(x = 1\). The graph looks exactly like the line \(y = x+1\), except there's an open circle at \(x = 1\).

Graph of y equals x squared minus 1 over x minus 1, a line with a hole at x equals 1 Plot of y = (x**2-1)/(x-1) for x in [-5, 5] -4 -2 0 2 4 -4 -2 0 2 4 6 x y point on graph point on graph
The graph of \(y = \frac{x^2-1}{x-1}\) is the line \(y = x+1\) with a hole at \(x = 1\).

To find the location of a hole, cancel the common factor, then substitute the excluded \(x\)-value into the simplified expression to get the missing \(y\)-coordinate.

Comparing the Three Types of Breaks

FeatureCaused byWhat the graph does
Vertical asymptoteA denominator zero that does not cancelThe curve shoots toward infinity on each side
Horizontal asymptoteComparing numerator and denominator degreesThe curve flattens toward a fixed \(y\)-value at the far left and right
HoleA factor that cancels completelyA single point is missing from an otherwise continuous curve

Steps for Graphing a Rational Function

  1. Factor the numerator and denominator, and cancel any common factors to find holes.
  2. Set the remaining denominator equal to zero to find vertical asymptotes.
  3. Compare the degrees of numerator and denominator to find a horizontal or slant asymptote.
  4. Find the \(x\)-intercepts (where the numerator equals zero) and the \(y\)-intercept (evaluate \(f(0)\)).
  5. Plot a few extra points on each side of the vertical asymptote to see how the branches curve toward the asymptotes.

Worked Example

Graph \(f(x) = \frac{2x-1}{x+3}\).

The denominator is zero at \(x = -3\), and this factor doesn't cancel, so \(x = -3\) is a vertical asymptote. Both numerator and denominator have degree 1, so the horizontal asymptote is \(y = 2\). The \(x\)-intercept comes from \(2x - 1 = 0\), giving \(x = 0.5\), and the \(y\)-intercept is \(f(0) = \frac{-1}{3}\).

Graph of y equals 2x minus 1 over x plus 3 with a vertical asymptote at x equals negative 3 and horizontal asymptote at y equals 2 Plot of y = (2*x-1)/(x+3) for x in [-10, 6] -10 -5 0 5 -50 0 50 x y y-intercept x-intercept
The graph of \(y = \frac{2x-1}{x+3}\), with a vertical asymptote at \(x = -3\) and a horizontal asymptote at \(y = 2\).

Notice how each branch hugs the vertical line \(x = -3\) and flattens out toward the horizontal line \(y = 2\) as \(x\) moves far from the asymptote in either direction. That combination, asymptotes plus a couple of intercepts, is really all you need to produce an accurate sketch.

Related lessons