Skip to content
Family Table Math
Auto

Inverse Functions

A function takes an input and gives you an output. Its inverse runs the process backwards: give it the output, and it hands you back the original input. Inverses let you “undo” a formula to answer questions the other way around, and later on they’re how logarithms are built from exponential functions.

If ff sends aa to bb, then the inverse f−1f^{-1} sends bb back to aa:

f(a)=b⟺f−1(b)=af(a) = b \quad \Longleftrightarrow \quad f^{-1}(b) = a

For example, if f(2)=9f(2) = 9, then f−1(9)=2f^{-1}(9) = 2.

Careful: the −1-1 in f−1f^{-1} is not an exponent. f−1(x)f^{-1}(x) means “the inverse of ff”, not 1f(x)\dfrac{1}{f(x)}.

To find the inverse of a relation, swap the coordinates in every ordered pair: the point (a,b)(a, b) becomes (b,a)(b, a).

Because inputs and outputs trade places, the domain and range trade places too:

  • the domain of f−1f^{-1} is the range of ff
  • the range of f−1f^{-1} is the domain of ff
  1. Write yy in place of f(x)f(x).
  2. Swap xx and yy.
  3. Solve for yy.
  4. Write f−1(x)f^{-1}(x) in place of yy.

Swapping the coordinates of a point is the same as reflecting it in the line y=xy = x. So the graph of y=f−1(x)y = f^{-1}(x) is the mirror image of the graph of y=f(x)y = f(x) in that line. To sketch it, pick a few key points on y=f(x)y = f(x), swap their coordinates, plot the new points, and join them. Example 4 shows this.

Every function has an inverse, but the inverse is only a function if ff never gives the same output for two different inputs. Check with the horizontal line test: if some horizontal line crosses the graph of ff more than once, the inverse is not a function.

For example, f(x)=x2f(x) = x^2 fails the test: f(−2)=4f(-2) = 4 and f(2)=4f(2) = 4, so the inverse would have to send 44 to both −2-2 and 22. The fix is to restrict the domain of ff, keeping only a part of the graph that passes the test. If you keep x≥0x \ge 0, the inverse is f−1(x)=xf^{-1}(x) = \sqrt{x}.

  • Quick check: pick a number, put it through ff, then put the result through f−1f^{-1}. You should get your number back.
  • Full check: show that both of these are true for every xx in the right domain:
f(f−1(x))=xandf−1(f(x))=xf\big(f^{-1}(x)\big) = x \qquad \text{and} \qquad f^{-1}\big(f(x)\big) = x

Find the inverse of f={(−2,7),(0,3),(1,1),(4,−5)}f = \{(-2, 7), (0, 3), (1, 1), (4, -5)\} and state its domain and range. Is f−1f^{-1} a function?

Solution. Swap the coordinates in each pair:

f−1={(7,−2),(3,0),(1,1),(−5,4)}f^{-1} = \{(7, -2), (3, 0), (1, 1), (-5, 4)\}

The domain of f−1f^{-1} is the range of ff: {−5,1,3,7}\{-5, 1, 3, 7\}. The range of f−1f^{-1} is the domain of ff: {−2,0,1,4}\{-2, 0, 1, 4\}.

f−1f^{-1} is a function, because each of its inputs (77, 33, 11 and −5-5) appears only once.

Notice that (1,1)(1, 1) didn’t change. It sits on the line y=xy = x, so reflecting it leaves it where it is.

Find f−1(x)f^{-1}(x) for f(x)=2x+6f(x) = 2x + 6, then check your answer.

Solution.

  1. Write yy for f(x)f(x): y=2x+6\quad y = 2x + 6
  2. Swap xx and yy: x=2y+6\quad x = 2y + 6
  3. Solve for yy: x−6=2y\quad x - 6 = 2y, so y=x−62y = \dfrac{x - 6}{2}
  4. Write f−1(x)f^{-1}(x) in place of yy:
f−1(x)=x−62(or x2−3)f^{-1}(x) = \frac{x - 6}{2} \quad \left(\text{or } \frac{x}{2} - 3\right)

Quick check: f(1)=2(1)+6=8f(1) = 2(1) + 6 = 8, and f−1(8)=8−62=1f^{-1}(8) = \dfrac{8 - 6}{2} = 1. We got 11 back.

Full check:

f(f−1(x))=2(x−62)+6=(x−6)+6=xf\big(f^{-1}(x)\big) = 2\left(\frac{x - 6}{2}\right) + 6 = (x - 6) + 6 = x f−1(f(x))=(2x+6)−62=2x2=xf^{-1}\big(f(x)\big) = \frac{(2x + 6) - 6}{2} = \frac{2x}{2} = x

Look at the order of the steps. ff multiplies by 22 and then adds 66. The inverse undoes them in reverse order: subtract 66 first, then divide by 22. It’s like socks and shoes: you put socks on first, but you take shoes off first.

On a day when it’s 15 ∘C15\,^\circ\text{C} at sea level, a simple model for the air temperature TT (in ∘C^\circ\text{C}) at a height of hh kilometres is

T=15−6.5hT = 15 - 6.5h

Find the inverse, and use it to find the height where the temperature is −11 ∘C-11\,^\circ\text{C}.

Solution. Here the letters have meanings: TT is always a temperature and hh is always a height. So don’t swap them. Just solve for the other variable, which gives the same inverse:

T=15−6.5h6.5h=15−Th=15−T6.5\begin{aligned} T &= 15 - 6.5h \\ 6.5h &= 15 - T \\ h &= \frac{15 - T}{6.5} \end{aligned}

This inverse takes a temperature and gives the height. For T=−11T = -11:

h=15−(−11)6.5=266.5=4h = \frac{15 - (-11)}{6.5} = \frac{26}{6.5} = 4

The temperature is −11 ∘C-11\,^\circ\text{C} at a height of 44 km.

Check: T=15−6.5(4)=15−26=−11T = 15 - 6.5(4) = 15 - 26 = -11. ✓

Example 4: A quadratic with a restricted domain

Section titled “Example 4: A quadratic with a restricted domain”

Let f(x)=(x−3)2−4f(x) = (x - 3)^2 - 4 for x≥3x \ge 3. Find f−1(x)f^{-1}(x), state the domain and range of both ff and f−1f^{-1}, and sketch both graphs.

Solution.

Domain and range of ff. The domain is given: {x∈R∣x≥3}\{x \in \mathbb{R} \mid x \ge 3\}. The graph is the right half of a parabola that opens up from its vertex (3,−4)(3, -4), so the range is {y∈R∣y≥−4}\{y \in \mathbb{R} \mid y \ge -4\}. Keeping only the right half is what makes ff pass the horizontal line test.

Find the inverse.

y=(x−3)2−4x=(y−3)2−4swap x and yx+4=(y−3)2y−3=±x+4y=3±x+4\begin{aligned} y &= (x - 3)^2 - 4 \\ x &= (y - 3)^2 - 4 && \text{swap } x \text{ and } y \\ x + 4 &= (y - 3)^2 \\ y - 3 &= \pm\sqrt{x + 4} \\ y &= 3 \pm \sqrt{x + 4} \end{aligned}

Which sign? The range of f−1f^{-1} has to be the domain of ff, which is y≥3y \ge 3. The ++ sign gives values that are at least 33; the −- sign gives values that are at most 33. So we keep the ++:

f−1(x)=3+x+4f^{-1}(x) = 3 + \sqrt{x + 4}

Domain and range of f−1f^{-1}. Swap them from ff: the domain is {x∈R∣x≥−4}\{x \in \mathbb{R} \mid x \ge -4\} and the range is {y∈R∣y≥3}\{y \in \mathbb{R} \mid y \ge 3\}.

Quick check: f(5)=(5−3)2−4=0f(5) = (5 - 3)^2 - 4 = 0, and f−1(0)=3+4=5f^{-1}(0) = 3 + \sqrt{4} = 5. ✓

Sketch. Take key points on y=f(x)y = f(x) and swap their coordinates:

On y=f(x)y = f(x)(3,−4)(3, -4)(4,−3)(4, -3)(5,0)(5, 0)(6,5)(6, 5)
On y=f−1(x)y = f^{-1}(x)(−4,3)(-4, 3)(−3,4)(-3, 4)(0,5)(0, 5)(5,6)(5, 6)

Plot the swapped points and join them with a smooth curve. The two graphs are reflections of each other in the line y=xy = x.

Graph of y = f(x) and its inverse reflected in the line y = x −4 −4 −2 −2 2 2 4 4 6 6 x y y = x y = f(x) y = f⁻¹(x) (3, −4) (−4, 3) (5, 0) (0, 5)
y=f(x)y = f(x) (blue) and y=f−1(x)y = f^{-1}(x) (orange) are mirror images in the dashed line y=xy = x.

Reading f−1(x)f^{-1}(x) as 1f(x)\dfrac{1}{f(x)}. The −1-1 means “inverse”, not “reciprocal”. For f(x)=2x+6f(x) = 2x + 6, the inverse is f−1(x)=x−62f^{-1}(x) = \dfrac{x - 6}{2}, but 1f(x)=12x+6\dfrac{1}{f(x)} = \dfrac{1}{2x + 6}. Those are completely different functions.

Undoing the steps in the wrong order. For f(x)=2x+6f(x) = 2x + 6, a common wrong answer is x2−6\dfrac{x}{2} - 6: it undoes “times 22” and “plus 66” in the same order instead of the reverse order. A quick check catches it: f(1)=8f(1) = 8, but 82−6=−2\dfrac{8}{2} - 6 = -2, not 11.

Leaving the ±\pm in (or picking the wrong sign). y=3±x+4y = 3 \pm \sqrt{x + 4} isn’t a function, because it gives two outputs. Use the domain of the original function to decide: the range of f−1f^{-1} must match the domain of ff.

Forgetting the inverse’s domain. The domain of f−1f^{-1} is the range of ff, not automatically “all real numbers”. In Example 4, f−1(x)=3+x+4f^{-1}(x) = 3 + \sqrt{x + 4} only works for x≥−4x \ge -4.

Assuming every inverse is a function. Use the horizontal line test first. If ff fails it, restrict the domain before you find the inverse.

Swapping letters that have meanings. In a word problem like Example 3, solve for the other variable instead of swapping. Otherwise TT ends up standing for a height, which gets confusing fast.

1. (Warm-up)

  • (a) If f(3)=10f(3) = 10, find f−1(10)f^{-1}(10).
  • (b) If f−1(4)=−1f^{-1}(4) = -1, find f(−1)f(-1).
  • (c) The point (6,−1)(6, -1) is on the graph of y=f(x)y = f(x). Which point must be on the graph of y=f−1(x)y = f^{-1}(x)?
Solution

(a) ff sends 33 to 1010, so f−1f^{-1} sends 1010 back to 33: f−1(10)=3f^{-1}(10) = 3.

(b) f−1f^{-1} sends 44 to −1-1, so ff sends −1-1 to 44: f(−1)=4f(-1) = 4.

(c) Swap the coordinates: (−1,6)(-1, 6).

2. (Warm-up) Find the inverse of g={(−3,0),(−1,2),(1,6),(4,8)}g = \{(-3, 0), (-1, 2), (1, 6), (4, 8)\}, and state its domain and range.

Solution

Swap the coordinates in each pair:

g−1={(0,−3),(2,−1),(6,1),(8,4)}g^{-1} = \{(0, -3), (2, -1), (6, 1), (8, 4)\}

Domain of g−1g^{-1}: {0,2,6,8}\{0, 2, 6, 8\}. Range of g−1g^{-1}: {−3,−1,1,4}\{-3, -1, 1, 4\}.

3. (Core) Find f−1(x)f^{-1}(x) for f(x)=x4+7f(x) = \dfrac{x}{4} + 7.

Solution

Swap xx and yy: x=y4+7x = \dfrac{y}{4} + 7. Then x−7=y4x - 7 = \dfrac{y}{4}, so y=4(x−7)y = 4(x - 7).

f−1(x)=4x−28f^{-1}(x) = 4x - 28

Check: f(8)=2+7=9f(8) = 2 + 7 = 9, and f−1(9)=36−28=8f^{-1}(9) = 36 - 28 = 8. ✓

4. (Core) Find f−1(x)f^{-1}(x) for f(x)=2x−13f(x) = \dfrac{2x - 1}{3}.

Solution

Swap xx and yy: x=2y−13x = \dfrac{2y - 1}{3}.

Multiply both sides by 33: 3x=2y−13x = 2y - 1. Add 11: 3x+1=2y3x + 1 = 2y. Divide by 22:

f−1(x)=3x+12f^{-1}(x) = \frac{3x + 1}{2}

Check: f(2)=33=1f(2) = \dfrac{3}{3} = 1, and f−1(1)=42=2f^{-1}(1) = \dfrac{4}{2} = 2. ✓

5. (Core) Show that g(x)=5−2xg(x) = 5 - 2x and h(x)=5−x2h(x) = \dfrac{5 - x}{2} are inverses of each other.

Solution

Check both compositions:

g(h(x))=5−2(5−x2)=5−(5−x)=xg\big(h(x)\big) = 5 - 2\left(\frac{5 - x}{2}\right) = 5 - (5 - x) = xh(g(x))=5−(5−2x)2=2x2=xh\big(g(x)\big) = \frac{5 - (5 - 2x)}{2} = \frac{2x}{2} = x

Both give xx, so gg and hh are inverses.

6. (Core) Let f(x)=(x+1)2f(x) = (x + 1)^2.

  • (a) Explain why the inverse of ff is not a function.
  • (b) Restrict the domain of ff to x≥−1x \ge -1. Find f−1(x)f^{-1}(x), and state its domain and range.
Solution

(a) Two different inputs give the same output: f(1)=4f(1) = 4 and f(−3)=4f(-3) = 4. So the inverse would send 44 to both 11 and −3-3. (On the graph, the horizontal line y=4y = 4 crosses the parabola twice.)

(b) Swap xx and yy: x=(y+1)2x = (y + 1)^2, so y+1=±xy + 1 = \pm\sqrt{x}. The range of f−1f^{-1} must be the restricted domain of ff, y≥−1y \ge -1, so take the ++ sign:

f−1(x)=x−1f^{-1}(x) = \sqrt{x} - 1

Domain of f−1f^{-1}: {x∈R∣x≥0}\{x \in \mathbb{R} \mid x \ge 0\}. Range of f−1f^{-1}: {y∈R∣y≥−1}\{y \in \mathbb{R} \mid y \ge -1\}.

Check: f(2)=9f(2) = 9, and f−1(9)=3−1=2f^{-1}(9) = 3 - 1 = 2. ✓

7. (Core) A taxi charges a $3.50 flat fee plus $1.75 per kilometre, so a ride of dd kilometres costs C=1.75d+3.50C = 1.75d + 3.50 dollars. Find the inverse, and use it to find how far you can ride for $24.50.

Solution

CC and dd have meanings, so solve for dd instead of swapping:

d=C−3.501.75d = \frac{C - 3.50}{1.75}

For C=24.50C = 24.50:

d=24.50−3.501.75=211.75=12d = \frac{24.50 - 3.50}{1.75} = \frac{21}{1.75} = 12

You can ride 1212 km. Check: 1.75(12)+3.50=21+3.50=24.501.75(12) + 3.50 = 21 + 3.50 = 24.50. ✓

8. (Challenge) Find f−1(x)f^{-1}(x) for f(x)=x+3x−2f(x) = \dfrac{x + 3}{x - 2}, where x≠2x \ne 2. What is the domain of f−1f^{-1}?

Solution

Swap xx and yy, then collect the yy terms on one side:

x=y+3y−2x(y−2)=y+3xy−2x=y+3xy−y=2x+3y(x−1)=2x+3y=2x+3x−1\begin{aligned} x &= \frac{y + 3}{y - 2} \\ x(y - 2) &= y + 3 \\ xy - 2x &= y + 3 \\ xy - y &= 2x + 3 \\ y(x - 1) &= 2x + 3 \\ y &= \frac{2x + 3}{x - 1} \end{aligned}f−1(x)=2x+3x−1,domain {x∈R∣x≠1}f^{-1}(x) = \frac{2x + 3}{x - 1}, \qquad \text{domain } \{x \in \mathbb{R} \mid x \ne 1\}

(This also tells you that ff never outputs 11.)

Check: f(3)=61=6f(3) = \dfrac{6}{1} = 6, and f−1(6)=155=3f^{-1}(6) = \dfrac{15}{5} = 3. ✓

9. (Challenge) Show that f(x)=6−xf(x) = 6 - x is its own inverse. Then use its graph to explain why that makes sense.

Solution

Swap xx and yy: x=6−yx = 6 - y, so y=6−xy = 6 - x. That means f−1(x)=6−xf^{-1}(x) = 6 - x, which is the same as f(x)f(x).

The graph of y=6−xy = 6 - x is a line with slope −1-1 through (0,6)(0, 6) and (6,0)(6, 0), so it’s perpendicular to y=xy = x. Reflect any point (a,6−a)(a, 6 - a) on it in y=xy = x and you get (6−a,a)(6 - a, a). That point is on the same line, because 6−(6−a)=a6 - (6 - a) = a. So reflecting the graph in y=xy = x gives back the same graph, and the inverse is the function itself.