Rational Function Graph: y = 1/x and Asymptotes
A rational function is one polynomial divided by another. They are the standard source of asymptotes, and drawing one correctly is a reliable test of whether a graphing tool understands what it is plotting.
Open this graph in the calculator
What you are looking at
The teal curve is y = 1/x, the simplest rational function. It has two branches: one in the top-right quadrant and one in the bottom-left. They are not joined, and drawing a line between them would be wrong.
The rose curve is y = 1/(x − 2) + 1, the same shape moved two right and one up. Its vertical asymptote is at x = 2 and its horizontal asymptote is at y = 1.
Two asymptotes, two behaviours
The vertical asymptote at x = 0 marks where the function is undefined. Approaching from the right, the values grow without bound; from the left, they fall without bound. Nothing crosses it because nothing exists there.
The horizontal asymptote at y = 0 describes the far ends. As x grows, 1/x shrinks towards zero without reaching it. Unlike a vertical asymptote, a horizontal one can be crossed in the middle of a graph; it only describes the edges.
Why the curve must be broken
A graphing tool samples the function at a series of x-values and joins consecutive points. Near x = 0 that goes wrong: the sample just left is hugely negative, the one just right is hugely positive, and joining them draws a near-vertical line that is not part of the function.
Many free graphing tools do exactly this, and the spurious vertical line is the quickest way to spot one. The fix is to detect that both sides are enormous and of opposite sign, and break the path. The test has to be careful, though: y = x⁵ also crosses the window almost vertically without having any pole, and breaking that would be equally wrong.
Finding the asymptotes yourself
Vertical asymptotes come from the denominator. Factor the top and bottom, cancel any shared factors, then set what remains on the bottom to zero.
Horizontal asymptotes come from comparing degrees.
| Degrees | Horizontal asymptote |
|---|---|
| Numerator lower than denominator | y = 0 |
| Equal degrees | Ratio of the leading coefficients |
| Numerator higher by one | None; a slant asymptote instead |
| Numerator higher by two or more | None |
Questions
What is the difference between a hole and a vertical asymptote?
A hole appears where a factor cancels between numerator and denominator: a single missing point with the curve continuing normally either side. An asymptote appears where a factor remains in the denominator, and the function runs off to infinity there.
Why can I not see the hole on the graph?
A missing point is smaller than a pixel, so no graphing tool can show it. Always check for cancelling factors algebraically rather than trusting the picture.
Is y = 1/x a function even though it has two branches?
Yes. Each input gives exactly one output. Being in two pieces has nothing to do with it; the only requirement is one output per input, and it passes the vertical line test everywhere it is defined.