Allday Education

Graphing Rational Functions

A rational function is a ratio of polynomials, and its graph is shaped by asymptotes — lines the graph approaches but never touches. Vertical and horizontal asymptotes are the main features.

Vertical asymptotes come from denominator zeros; horizontal asymptotes come from comparing the degrees of top and bottom. Find both and the graph's skeleton appears.

Vertical asymptotes

Set the denominator equal to zero and solve. Each solution that does not also cancel from the numerator is a vertical asymptote.

For f(x)=2x+4x1f(x) = \dfrac{2x + 4}{x - 1}, the denominator is zero at x=1x = 1, so x=1x = 1 is a vertical asymptote.

Horizontal asymptotes from degrees

Compare the degrees of numerator and denominator. Equal degrees give a horizontal asymptote at the ratio of leading coefficients.

For 2x+4x1\dfrac{2x + 4}{x - 1}, both are degree 1, so the horizontal asymptote is y=21=2y = \dfrac{2}{1} = 2. A smaller top degree gives y=0y = 0; a larger top has none.

Worked examples

Example 1: both asymptotes

Find the vertical and horizontal asymptotes of f(x)=2x+4x1f(x) = \dfrac{2x + 4}{x - 1}.

Denominator zero for verticalx1=0x=1x - 1 = 0 \Rightarrow x = 1
Equal degrees for horizontaly=21=2y = \dfrac{2}{1} = 2

Answer: Vertical x=1x = 1, horizontal y=2y = 2

Example 2: horizontal at zero

What is the horizontal asymptote of 5x+2\dfrac{5}{x + 2}?

Top degree smaller than bottom0<10 < 1
So the asymptote is y = 0y=0y = 0

Answer: y=0y = 0

Example 3: a factor that cancels

Does f(x)=x24x2f(x) = \dfrac{x^2 - 4}{x - 2} have a vertical asymptote at x=2x = 2?

Denominator zerox2=0x=2x - 2 = 0 \Rightarrow x = 2
Factor the numerator(x+2)(x2)x2\dfrac{(x + 2)(x - 2)}{x - 2}
The factor cancels, so it is a holex+2,  x2x + 2, \; x \neq 2

Answer: No — a hole at x=2x = 2, not a vertical asymptote

Try one yourself

Common questions

How do I find vertical asymptotes?

Set the denominator equal to zero and solve. Each non-canceling zero is a vertical asymptote.

How do I find the horizontal asymptote?

Compare degrees: equal degrees give the ratio of leading coefficients; smaller top gives y=0y = 0; larger top gives none.

What if a factor cancels?

A canceling factor makes a hole, not a vertical asymptote, at that x-value.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1