Educerie · IB Diploma · Mathematics: analysis and approaches
Topic 2 Functions · 2.8 The reciprocal function and rational functions
What you must be able to do
| You must be able to | Level | What it looks like in the exam |
|---|---|---|
| Sketch f(x) = 1/x, x ≠ 0, with its asymptotes, and state its domain and range | SL, HL | "Sketch the graph of y = 1/x" (2 marks) |
| Show and use the self-inverse nature of 1/x: f⁻¹ = f | SL, HL | "Show that f is self-inverse" (2 to 3 marks) |
| Find the vertical asymptote x = −d/c and horizontal asymptote y = a/c of f(x) = (ax + b)/(cx + d) | SL, HL | "Write down the equations of the asymptotes" (2 marks) |
| Find the intercepts of a rational function with the axes | SL, HL | "Find the coordinates of the intercepts with the axes" (2 marks) |
| Sketch a rational function with all asymptotes and intercepts labelled | SL, HL | "Sketch the graph of f, showing clearly any asymptotes and intercepts" (3 to 4 marks) |
| Find the inverse of a rational function and connect its asymptotes to those of f | SL, HL | "Find f⁻¹(x)", "State the range of f" (4 to 5 marks) |
| Interpret a rational model and its asymptotes in context | SL, HL | Paper 2: "Explain what the horizontal asymptote represents" (1 to 2 marks) |
Before you start
You need domain and range (2.2), asymptotes as key features of a graph (2.4), and inverse functions found by swapping x and y (2.5). Rearranging a formula with the unknown on both sides, by collecting terms and factorising, is used throughout. Transformations of graphs (2.11) explain why the rational graphs here are all moved and stretched copies of y = 1/x; you can read this page before 2.11, and it prepares you for it.
1The idea in one paragraph
The reciprocal function f(x) = 1/x sends each number to one divided by it. It cannot accept 0, and it never outputs 0, so its graph has two separate pieces, called branches, that approach the axes without ever touching them: the axes are its asymptotes. Swapping x and y leaves y = 1/x unchanged, so it is its own inverse. The rational functions of this course, f(x) = (ax + b)/(cx + d), are the same curve stretched and moved. Each has one vertical asymptote, where the denominator is zero, x = −d/c, and one horizontal asymptote, the value approached for large x, y = a/c. With those two lines and the intercepts with the axes, you can sketch any of them.
2The reciprocal function 1/x
Build a table and the shape appears.
| x | −4 | −2 | −1 | −½ | −¼ | 0 | ¼ | ½ | 1 | 2 | 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1/x | −¼ | −½ | −1 | −2 | −4 | undefined | 4 | 2 | 1 | ½ | ¼ |
Two things happen. As x gets close to 0, 1/x becomes huge: 1/0.001 = 1000, and 1/(−0.001) = −1000. So near x = 0 the graph shoots up on the right and down on the left, and the line x = 0 (the y-axis) is a vertical asymptote. As x gets large, positive or negative, 1/x gets close to 0 without reaching it: 1/1000 = 0.001. So the line y = 0 (the x-axis) is a horizontal asymptote.
Figure 1 shows the result, a curve called a rectangular hyperbola. Its key facts:
| Feature | For f(x) = 1/x |
|---|---|
| Domain | x ∈ ℝ, x ≠ 0 |
| Range | f(x) ∈ ℝ, f(x) ≠ 0 |
| Vertical asymptote | x = 0 |
| Horizontal asymptote | y = 0 |
| Intercepts | none |
| Symmetry | in the lines y = x and y = −x, and rotational symmetry of order 2 about the origin |
The branches lie in the first quadrant (x and y both positive) and the third (both negative), because a positive number has a positive reciprocal and a negative one a negative reciprocal.
3The reciprocal function is its own inverse
A function is self-inverse if f⁻¹ = f: doing it twice gets you back where you started. The reciprocal function has this property, and there are three ways to see it.
By composition. f(f(x)) = 1/(1/x) = x, for every x ≠ 0. Since f ∘ f is the identity, f undoes itself.
By the swap method of 2.5. Write y = 1/x and swap x and y: x = 1/y. Rearranging gives y = 1/x, the same function.
By the graph. The graph of f⁻¹ is the reflection of the graph of f in y = x. Figure 1 is symmetric in y = x (the point (4, ¼) reflects to (¼, 4), which is also on the curve), so the reflection is the same curve.
The same is true of y = k/x for any constant k ≠ 0: swap x and y in y = k/x and you get x = k/y, so y = k/x again. Section 6 shows which other rational functions are self-inverse.
1/x is self-inverse: f(f(x)) = x, so f⁻¹(x) = 1/x. Its graph is symmetric in the line y = x.
4Stretching and moving 1/x
Every graph on this page is y = 1/x after a stretch and a translation, which 2.11 treats in full. Two cases are worth recognising now; Figure 2 shows both.
y = k/x is a vertical stretch of 1/x by factor k. The asymptotes are still the axes, but the curve sits further out: y = 4/x passes through (2, 2) instead of (1, 1). If k < 0, the branches move into the second and fourth quadrants.
y = 1/(x − h) + k is 1/x translated h to the right and k up. The asymptotes move with it, to x = h and y = k. For y = 1/(x − 2) + 3, the asymptotes are x = 2 and y = 3. The intercepts come from the usual rules: at x = 0, y = 1/(−2) + 3 = 2.5; and y = 0 when 1/(x − 2) = −3, so x − 2 = −⅓ and x = 5/3.
Put over one denominator, 1/(x − 2) + 3 = (1 + 3(x − 2))/(x − 2) = (3x − 5)/(x − 2). That is a function of the form (ax + b)/(cx + d), which is where the next section starts.
5Rational functions (ax + b)/(cx + d)
A rational function in this course is one of the form
f(x) = (ax + b)/(cx + d), with c ≠ 0, x ≠ −d/c.
Its graph is always a hyperbola like the one in Figure 1, moved and stretched, and you can find everything you need to sketch it from a, b, c and d.
The vertical asymptote is x = −d/c. The denominator cx + d is zero when x = −d/c. The function is undefined there, and near it the denominator is tiny, so the output is huge.
The horizontal asymptote is y = a/c. For very large x, the constants b and d hardly matter: (ax + b)/(cx + d) behaves like ax/cx = a/c. You can make this precise by dividing top and bottom by x: (a + b/x)/(c + d/x), and as x → ±∞ both b/x and d/x go to 0, leaving a/c.
The y-intercept is (0, b/d), found by putting x = 0 (if d ≠ 0).
The x-intercept is (−b/a, 0), found by setting the numerator to zero, since a fraction is zero only when its top is zero (if a ≠ 0).
For f(x) = (ax + b)/(cx + d): vertical asymptote x = −d/c, horizontal asymptote y = a/c.
Learn both, or rederive them in the exam in two lines as above: denominator zero for the vertical one, large x for the horizontal one.
The domain is x ≠ −d/c and the range is y ≠ a/c: the function takes every value except the one it approaches forever.
Worked example. Sketch y = (4x + 2)/(2x − 3). Here a = 4, b = 2, c = 2, d = −3.
Now place the branches. Draw the two asymptotes as dashed lines; they cross at (3/2, 2) and divide the plane into four regions. The two intercepts are both in the bottom-left region, so one branch lives there. The other branch is in the opposite region, top right. A test point confirms it: at x = 3, y = 14/3 ≈ 4.67, which is above y = 2 and to the right of x = 3/2. Figure 3 shows the finished sketch.
Why the branches go where they do. Dividing out gives (4x + 2)/(2x − 3) = 2 + 8/(2x − 3). Check: 2(2x − 3) + 8 = 4x + 2. So the graph is 2 plus a reciprocal-type term. When 2x − 3 > 0 (to the right of the vertical asymptote), the extra term is positive and the curve is above y = 2; to the left it is negative and the curve is below. That one line of algebra tells you which regions the branches are in without a test point.
Special cases.
- If a = 0, the function is b/(cx + d). Then the horizontal asymptote is y = 0 and there is no x-intercept, because the numerator is never zero. For example 6/(x + 2) has asymptotes x = −2 and y = 0 and y-intercept (0, 3).
- If d = 0, the vertical asymptote is x = 0, the y-axis, and there is no y-intercept. For example (4x + 600)/x has asymptotes x = 0 and y = 4.
- If the top is a multiple of the bottom, as in (2x + 4)/(x + 2) = 2, the fraction cancels to a constant and there is no hyperbola at all, only the line y = 2 with a gap at x = −2. Exam questions avoid this case, but it explains why the curve always needs ad ≠ bc.
6The inverse of a rational function
Find the inverse of f(x) = (4x + 2)/(2x − 3) by the method of 2.5, with one extra algebraic step: the new y appears twice, so collect the y terms and factorise.
The inverse is also a rational function. Its asymptotes are x = 2 and y = 3/2: exactly those of f, with x and y swapped. That is no coincidence. The graph of f⁻¹ is the reflection of f in y = x, so a vertical asymptote of f becomes a horizontal asymptote of f⁻¹ and the other way round. Figure 4 shows both graphs. This also gives a quick check on the domain and range: the range of f, y ≠ 2, is the domain of f⁻¹, x ≠ 2.
Which rational functions are self-inverse? A graph that is its own reflection in y = x must have its asymptotes cross on the line y = x. The crossing point is (−d/c, a/c), so this needs −d/c = a/c, that is d = −a. For example g(x) = (2x + 5)/(x − 2) has a = 2 and d = −2, and indeed:
To show a function is self-inverse in an exam, do exactly that: find f⁻¹ and show it equals f, or show that f(f(x)) simplifies to x.
7Rational functions in context
Rational functions model anything shared out: a fixed cost spread over more and more items, a fixed distance covered at different speeds, a dose spread through a growing volume. The horizontal asymptote is then the long-run value, and it usually has a meaning worth stating.
A small firm prints T-shirts. It pays €600 to set up a design, then €4 for each shirt. The average cost per shirt for n shirts is
A(n) = (4n + 600)/n = 4 + 600/n.
Figure 5 shows the graph for n > 0. At n = 100 the average cost is €10; at n = 600 it is €5. The horizontal asymptote is A = 4: however many shirts are printed, the setup cost shared among them shrinks towards nothing, and the average cost falls towards the €4 each shirt costs to make, without ever reaching it. The vertical asymptote n = 0 has no practical meaning, since you cannot print zero shirts, and the domain is n ∈ ℤ⁺.
A question might ask how many shirts are needed for an average cost below €5. Then 4 + 600/n < 5, so 600/n < 1, so n > 600: at least 601 shirts. Multiplying through by n was allowed because n is positive; with a variable that could be negative, you would have to be careful, since multiplying by a negative flips an inequality.
8Where marks are lost
Writing asymptotes as numbers. "Vertical asymptote 3/2" is not an equation. Write x = 3/2 and y = 2.
Mixing up the two asymptote formulas. The vertical one comes from the denominator (x = −d/c); the horizontal one is the ratio of the x-coefficients (y = a/c). Derive them if unsure: denominator zero for vertical, large x for horizontal.
Getting the sign of the vertical asymptote wrong. For (4x + 2)/(2x − 3), solve 2x − 3 = 0 to get x = +3/2. Solving rather than quoting −d/c avoids the slip.
Finding the x-intercept from the denominator. A fraction is zero when its numerator is zero. The denominator being zero gives the asymptote, not an intercept.
Drawing branches that cross the vertical asymptote or bend back. Each branch approaches both asymptotes and stays in its region. A branch never crosses the vertical asymptote.
Sketching the branches in the wrong regions. Use the intercepts or a test point, or rewrite as a/c + k/(cx + d), before drawing.
Leaving y on both sides when finding the inverse. After swapping and multiplying out, collect every y term on one side and factorise y out.
Ignoring the context's domain. An average cost model is only meaningful for positive whole numbers of items; the vertical asymptote n = 0 is outside it.
9Work it right
- Read off a, b, c and d, with their signs.
- Vertical asymptote: set the denominator to zero, x = −d/c. Horizontal asymptote: y = a/c. Write both as equations.
- Intercepts: x = 0 for the y-intercept; numerator = 0 for the x-intercept. Some may not exist.
- Draw the asymptotes dashed and labelled first, then place the intercepts.
- Decide which regions hold the branches, from the intercepts, a test point, or the form a/c + k/(cx + d).
- Draw each branch smooth, approaching both asymptotes, never crossing the vertical one.
- State the domain as x ≠ −d/c and the range as y ≠ a/c if asked.
- For an inverse: swap, multiply up, collect the y terms, factorise; the asymptotes of f⁻¹ are those of f swapped.
10Try it
Marks in brackets. Q1 to Q4 are Paper 1 style, no calculator. Q5 is Paper 2 style.
Q1. Let f(x) = (6 − 2x)/(x − 1), for x ≠ 1.
(a) Write down the equations of the vertical and horizontal asymptotes of the graph of f. 2 marks
(b) Find the coordinates of the points where the graph of f meets the axes. 2 marks
(c) Sketch the graph of f, showing the asymptotes and intercepts. 3 marks
Q2. Let f(x) = (2x + 3)/(x − 4), for x ≠ 4.
(a) Find f⁻¹(x). 4 marks
(b) Write down the domain of f⁻¹. 1 mark
Q3. Let g(x) = (3x + 2)/(x − 3), for x ≠ 3. Show that g is a self-inverse function. 3 marks
Q4. The graph of y = (ax + b)/(x + d) has asymptotes x = −2 and y = 3, and passes through the point (0, 1). Find the values of a, b and d. 4 marks
Q5. A group hires a coach for a school trip. The hire costs €900, and each person also pays €12 for a museum ticket. The cost per person when n people go is C(n) = (12n + 900)/n.
(a) Find the cost per person when 30 people go. 1 mark
(b) Write down the equation of the horizontal asymptote of the graph of C, and explain what it means in this context. 2 marks
(c) Find the least number of people needed for the cost per person to be less than €20. 3 marks
11In one breath
The reciprocal function 1/x has two branches, in the first and third quadrants, with the axes as asymptotes; its domain is x ≠ 0 and its range y ≠ 0. It is self-inverse: 1/(1/x) = x, and its graph is symmetric in y = x. The rational functions (ax + b)/(cx + d) are 1/x stretched and moved: the vertical asymptote is where the denominator is zero, x = −d/c; the horizontal asymptote is the value for large x, y = a/c. The y-intercept is at x = 0; the x-intercept is where the numerator is zero. To sketch, draw the asymptotes dashed and labelled, plot the intercepts, place the two branches in opposite regions with a test point, and never cross the vertical asymptote. The inverse is found by swapping, multiplying up and factorising out y; its asymptotes are those of f swapped, and f is self-inverse exactly when d = −a. In context, the horizontal asymptote is the long-run value.
Answers
Q1. (a) The denominator is zero at x = 1, so the vertical asymptote is x = 1. The ratio of x-coefficients is −2/1, so the horizontal asymptote is y = −2. A1 for each equation. Numbers without "x =" or "y =" score A0.
(b) At x = 0, y = 6/(−1) = −6, giving (0, −6). The numerator is zero when 6 − 2x = 0, giving (3, 0). A1 for each point.
(c) Draw the asymptotes x = 1 and y = −2 dashed. The point (0, −6) is left of x = 1 and below y = −2, so one branch is in the bottom-left region, passing through (0, −6). The point (3, 0) is right of x = 1 and above y = −2, so the other branch is in the top-right region, passing through (3, 0) and approaching y = −2 from above as x → ∞. (Check: f(x) = −2 + 4/(x − 1), which is above −2 exactly when x > 1.) A1 for both asymptotes drawn and labelled, A1 for two branches in the correct regions, A1 for both intercepts labelled and the branches approaching the asymptotes.
Q2. (a)
M1 for swapping x and y (or rearranging for x), M1 for multiplying up, M1 for collecting the y terms and factorising, A1 for (4x + 3)/(x − 2).
(b) x ∈ ℝ, x ≠ 2. A1. This is the range of f, since f has horizontal asymptote y = 2.
Q3. Swap x and y: x = (3y + 2)/(y − 3). Then xy − 3x = 3y + 2, so xy − 3y = 3x + 2, so y(x − 3) = 3x + 2 and y = (3x + 2)/(x − 3). So g⁻¹(x) = (3x + 2)/(x − 3) = g(x), and g is self-inverse. M1 for a valid method (finding g⁻¹, or g(g(x))), A1 for the correct algebra, R1 for the conclusion that g⁻¹ = g. Alternative: g(g(x)) = (3(3x + 2) + 2(x − 3))/((3x + 2) − 3(x − 3)) = 11x/11 = x.
Q4. The vertical asymptote is where x + d = 0, so −d = −2 and d = 2. The horizontal asymptote is y = a/1, so a = 3. At (0, 1): 1 = b/d = b/2, so b = 2. The graph is y = (3x + 2)/(x + 2). A1 for d = 2, A1 for a = 3, M1 for substituting (0, 1), A1 for b = 2.
Q5. (a) C(30) = (360 + 900)/30 = €42. A1.
(b) C = 12 (or y = 12). As the number of people grows, the €900 hire is shared among more and more people, so the cost per person falls towards the €12 museum ticket but never reaches it. A1 for the equation, R1 for an interpretation that mentions the ticket price or the shared cost tending to zero.
(c) C(n) < 20 means 12 + 900/n < 20, so 900/n < 8, so n > 112.5 (multiplying by n is safe since n > 0). The number of people is a whole number, so 113 people. M1 for setting up the inequality or equation with 20, A1 for 112.5, A1 for 113. Answering 112.5 or 112 scores A0 for the last mark; C(112) = €20.04 is not under €20.
Educerie · written from the published IB Diploma Programme Mathematics: analysis and approaches guide, first assessment 2021, section 2.8 The reciprocal function and rational functions. Original text, examples and questions. Diagrams drawn by Educerie. Last reviewed 25 September 2026.