math.wiki
Functions › Inverse functions › Inverse from a table or list of pairs
Open on the map
Algebra 2 · F.BF.B.4 · F.BF.B.4C

Inverse from a table or list of pairs

A price list tells you what a parcel of a given weight costs. How do you read it backwards, from a price to the weight that was paid for?

Where you are 5 in Inverse functions

When you reach for it

A courier’s price list has no formula behind it, only five rows. Call the price of a parcel that weighs w kilograms P(w) dollars:

weight w (kg)1251020
price P(w) (dollars)69142235

Read from top to bottom, the table answers “what does this weight cost?”: P(5) = 14. Very often the question comes the other way round. A receipt says 22 dollars: how heavy was the parcel? With no formula there is nothing to solve. You find 22 in the price row and read the weight that sits with it, 10 kilograms.

Doing that for every price builds a second function, one that takes a price and returns a weight. It is called the inverse of P and written P^{-1}, read “P inverse”, so that P^{-1}(22) = 10. You reach for this move whenever a function is given as a table or a list of pairs and the question starts from an output.

The procedure

What the inverse has to do. The inverse sends each output back to the input it came from. For a function f and its inverse f^{-1}, that is one statement read in two directions:

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

Everything below follows from this line.

Turn every pair round. A function given as a table is nothing more than its pairs: the parcel list is the five pairs (1, 6), (2, 9), (5, 14), (10, 22) and (20, 35). The line above says that (a, b) is a pair of f exactly when (b, a) is a pair of f^{-1}. So the inverse is found by turning every pair round, and in a table that means swapping the two rows (or the two columns):

price p (dollars)69142235
weight P^{-1}(p) (kg)1251020
1
2
5
10
20
\text{weight (kg)}
6
9
14
22
35
\text{price (dollars)}
P
6
9
14
22
35
\text{price (dollars)}
1
2
5
10
20
\text{weight (kg)}
P^{-1}
Figure 1The parcel price list as arrows. The inverse P^{-1} is the same five arrows pointing the other way, so the prices become the inputs and the weights the outputs.

Nothing is computed. The same five facts are written down with the other column in front.

First make sure no output repeats. The swapped list is a function only if each of its inputs appears once. Its inputs are the old outputs, so this asks whether any output of f appears twice, which is exactly the question of whether f is one to one. If two inputs shared an output, the swap would give that output two partners, and a rule that answers one question with two numbers is not a function. Every price in the parcel list is different, so P^{-1} is a function. Example 5 shows a table where the swap fails.

The domain and the range swap places. Every first entry becomes a second entry and every second entry a first. So, reading the domain and range straight off the pairs:

\begin{aligned} \text{domain of } f^{-1} &= \text{range of } f,\\ \text{range of } f^{-1} &= \text{domain of } f \end{aligned}

The parcel list has domain \{1, 2, 5, 10, 20\} (weights) and range \{6, 9, 14, 22, 35\} (prices). P^{-1} has domain \{6, 9, 14, 22, 35\} and range \{1, 2, 5, 10, 20\}. Units travel with the numbers: an input of P^{-1} is in dollars and an output in kilograms.

One value without the whole table. To find f^{-1}(b) you need not rewrite anything. Find b among the outputs of f and read the input beside it. If b is not among the outputs, f^{-1}(b) is not defined, because no input of f produced it.

There and back again. Going forward and then back returns you to the start, and so does going back and then forward:

f^{-1}\big(f(a)\big) = a \qquad f\big(f^{-1}(b)\big) = b

The first holds for every a in the domain of f, the second for every b in the range of f. Both hold because f takes a to b along a pair (a, b) and f^{-1} takes b to a along the turned pair (b, a). This is what “the inverse undoes the function” means.

Reorder if it helps. The order of the pairs in a list carries no meaning, so the new table may be sorted by its new inputs. For the parcel list the swapped prices are already in order. When f decreases, the swap reverses the order and sorting makes the new table easier to read (Example 3).

Worked examples

Example 1

Reading the parcel list backwards

Use the parcel price list P from the start of the lesson.

(a) Find P^{-1}(14) and say what it means.

(b) Is P^{-1}(10) defined? Is P(10)?

(c) Find P\big(P^{-1}(35)\big) and P^{-1}\big(P(2)\big).

(d) One parcel cost 35 dollars and another cost 9 dollars. How much heavier was the first?

Solution

(a) Look for 14 among the prices. It sits with the weight 5, so P(5) = 14, and by the defining line P^{-1}(14) = 5. In words: a parcel that costs 14 dollars weighs 5 kilograms.

(b) P^{-1}(10) asks for the weight of a parcel that costs 10 dollars. No parcel in the list costs 10 dollars, so 10 is not in the domain of P^{-1} and P^{-1}(10) is not defined. P(10) is a different question: what does a 10 kilogram parcel cost? That is in the list, P(10) = 22. The same number 10 means dollars in one and kilograms in the other.

(c) P^{-1}(35) = 20, because P(20) = 35, and then P(20) = 35. So P\big(P^{-1}(35)\big) = 35: back where we started. Likewise P(2) = 9 and P^{-1}(9) = 2, so P^{-1}\big(P(2)\big) = 2.

(d) The weights are P^{-1}(35) = 20 and P^{-1}(9) = 2, so the first parcel was 20 - 2 = 18 kilograms heavier.

Example 2

A list of pairs

Let f be the function with the five pairs (-3, 8), (-1, 4), (0, 2), (2, -5) and (6, 0).

(a) Explain why f has an inverse function, and write it as a list of pairs.

(b) Give the domain and range of f^{-1}.

(c) Find f^{-1}(0), f^{-1}(2), f\big(f^{-1}(-5)\big) and f^{-1}\big(f(-1)\big). Is f^{-1}(6) defined?

Solution

(a) The outputs are 8, 4, 2, -5 and 0, all different, so f is one to one and turning the pairs round gives a function:

\begin{aligned} f^{-1} = \{&(8, -3), (4, -1), (2, 0),\\ &(-5, 2), (0, 6)\} \end{aligned}

(b) The domain of f^{-1} is the range of f, and the range of f^{-1} is the domain of f:

\begin{aligned} \text{domain of } f^{-1} &= \{-5, 0, 2, 4, 8\},\\ \text{range of } f^{-1} &= \{-3, -1, 0, 2, 6\} \end{aligned}

(c) The pair (0, 6) of f^{-1} gives f^{-1}(0) = 6, and the pair (2, 0) gives f^{-1}(2) = 0. Notice that 0 is both an input of f and an output of f, and the two values have nothing to do with each other. Next, f^{-1}(-5) = 2 and f(2) = -5, so f\big(f^{-1}(-5)\big) = -5. Then f(-1) = 4 and f^{-1}(4) = -1, so f^{-1}\big(f(-1)\big) = -1. Both are the “there and back again” rule at work.

Finally, 6 is an input of f but not an output: no pair of f ends in 6. So 6 is not in the domain of f^{-1} and f^{-1}(6) is not defined.

Example 3

A cup of tea cooling

Odile pours a cup of tea and records its temperature T(m), in degrees Celsius, m minutes later.

minutes m05102030
temperature T(m) (^\circC)9074624637

(a) Write the table of T^{-1} with its inputs in increasing order.

(b) Find T^{-1}(46) and say what it means.

(c) Does the table give a value for T^{-1}(50)?

Solution

(a) The temperatures 90, 74, 62, 46 and 37 are all different, so T is one to one and T^{-1} exists. Swap the rows, so that temperature is the input. Because the tea cools, the temperatures fall as the minutes rise, and after the swap they run in decreasing order. Sorting them gives:

temperature t (^\circC)3746627490
minutes T^{-1}(t)30201050

Sorting moved whole pairs, never one entry without its partner: 37 still sits with 30.

(b) T^{-1}(46) = 20, because T(20) = 46. The tea was at 46 degrees Celsius 20 minutes after it was poured.

(c) No. 50 is not one of the recorded temperatures, so 50 is not in the domain of T^{-1} as this table defines it. The tea did fall from 62 to 46 degrees between minutes 10 and 20, so it passed 50 degrees at some moment in that stretch, but the table does not say when. A function given by a table knows only its pairs.

Example 4

Forward, backward and upside down

A function f on the domain \{1, 2, 3, 4, 5\} is given by this table.

x12345
f(x)24513

(a) Write the table of f^{-1} with its inputs in increasing order.

(b) Compare f(2), f^{-1}(2) and \displaystyle \frac{1}{f(2)}.

(c) Solve f(x) = 1.

(d) Find f^{-1}\big(f^{-1}(4)\big).

Solution

(a) The outputs 2, 4, 5, 1, 3 are all different, so the inverse exists. Turning each pair round gives (2, 1), (4, 2), (5, 3), (1, 4) and (3, 5). Sorted by the new input:

x12345
f^{-1}(x)41523

Here the domain and the range are both \{1, 2, 3, 4, 5\}, so the swap of domain and range is invisible, but the pairs themselves have changed.

(b) f(2) = 4, read from the first table. f^{-1}(2) = 1, because the input of f with output 2 is 1. And \displaystyle \frac{1}{f(2)} = \frac{1}{4}. Three different numbers. The -1 in f^{-1} is not an exponent: f^{-1} is the function that undoes f, not the reciprocal of its outputs.

(c) Solving f(x) = 1 asks which input gives the output 1, and that is exactly what f^{-1}(1) means. From either table, f^{-1}(1) = 4, so x = 4. Check: f(4) = 1.

(d) Work from the inside out. f^{-1}(4) = 2, and then f^{-1}(2) = 1. So f^{-1}\big(f^{-1}(4)\big) = 1. Check by going forward twice: f(1) = 2 and f(2) = 4, so applying f twice takes 1 to 4, and applying f^{-1} twice takes 4 back to 1.

Example 5

When an output repeats

A function g is given by this table.

x01234
g(x)73139

(a) Show that swapping the rows does not give a function.

(b) Remove one input from the domain so that what is left has an inverse function, and write that inverse. Is there more than one way to do it?

Solution

(a) Swapping gives the pairs (7, 0), (3, 1), (1, 2), (3, 3) and (9, 4). The input 3 now has two outputs, 1 and 3, so the swapped list is not a function. The cause is in the original table: g(1) = 3 and g(3) = 3, two inputs sharing one output, so g is not one to one. Asked “which input gave 3?”, the table has two answers and no way to choose.

(b) The repeat involves only the inputs 1 and 3, so removing either one is enough. Removing 3 leaves the domain \{0, 1, 2, 4\} with outputs 7, 3, 1, 9, all different, and the inverse

\{(7, 0), (3, 1), (1, 2), (9, 4)\}

Removing 1 instead leaves the domain \{0, 2, 3, 4\} and the inverse

\{(7, 0), (1, 2), (3, 3), (9, 4)\}

So there are two ways, and they give different inverses: the first sends 3 back to 1, the second sends 3 back to 3. Which piece to keep is a choice the table cannot make for you. Cutting a function down like this is restricting the domain.

Example 6

A missing entry

One output in this table of f is unknown.

x-2-1012
f(x)5k-128

(a) For which values of k does f have an inverse function?

(b) You are told that f^{-1}(3) = -1. Find k.

(c) With that value of k, give the domain of f^{-1} and find f^{-1}\big(f^{-1}(2)\big), if it is defined.

Solution

(a) The known outputs 5, -1, 2 and 8 are all different. f is one to one as long as k is not equal to any of them, so f has an inverse function for every k except 5, -1, 2 and 8.

(b) By the defining line, f^{-1}(3) = -1 says exactly that f(-1) = 3. The output beside -1 is k, so k = 3. It is not one of the four excluded values, so the inverse does exist.

(c) The range of f is now \{5, 3, -1, 2, 8\}, so

\text{domain of } f^{-1} = \{-1, 2, 3, 5, 8\}

For the double inverse, start inside: f(1) = 2, so f^{-1}(2) = 1. Next we need f^{-1}(1), and 1 is not in the domain of f^{-1}, since no input of f gives the output 1. So f^{-1}\big(f^{-1}(2)\big) is not defined. The first step worked; the second asked a question the table cannot answer.

Example 7

A rule on a short domain

The function h(x) = 4x - 3 is used only on the domain \{-1, 0, 1, 2, 3\}.

(a) List the pairs of h and of h^{-1}.

(b) Find a rule that gives every pair of h^{-1}, and check it on all five.

Solution

(a) Put each input into the rule: h(-1) = -7, h(0) = -3, h(1) = 1, h(2) = 5, h(3) = 9. The outputs are all different, so

\begin{aligned} h = \{&(-1, -7), (0, -3), (1, 1),\\ &(2, 5), (3, 9)\} \end{aligned}

and turning each pair round,

\begin{aligned} h^{-1} = \{&(-7, -1), (-3, 0), (1, 1),\\ &(5, 2), (9, 3)\} \end{aligned}

The pair (1, 1) turns round into itself, because h(1) = 1.

(b) The rule for h multiplies by 4 and then subtracts 3. To get back, undo the last step first: add 3, then divide by 4. That suggests \displaystyle h^{-1}(x) = \frac{x + 3}{4}. Check it on the five inputs of h^{-1}:

\begin{aligned} \tfrac{-7 + 3}{4} &= -1, & \tfrac{-3 + 3}{4} &= 0,\\ \tfrac{1 + 3}{4} &= 1, & \tfrac{5 + 3}{4} &= 2,\\ \tfrac{9 + 3}{4} &= 3 \end{aligned}

All five match the pairs from (a). The table gave the pairs, and the pairs suggested the rule. Finding the rule directly from h(x) = 4x - 3, without listing pairs, is the next move: finding an inverse from a rule.

Boundaries

  • Only a one to one function has an inverse function. If an output appears twice in the table, the swapped list gives one input two outputs and is not a function (Example 5). Removing inputs can repair that, but it changes the function.
  • The inverse is defined only on the range. f^{-1}(b) makes sense only when b is an output of f. A table cannot answer for values between its entries: it holds its pairs and nothing more (Examples 1 and 3).
  • The -1 is not an exponent. f^{-1}(b) is the input that gives b, never \displaystyle \frac{1}{f(b)}. The reciprocal of an output is written \displaystyle \frac{1}{f(x)} or \big(f(x)\big)^{-1} (Example 4).
  • A pattern is not the table. When a rule is known, as in Example 7, the inverse rule can be checked on every pair. When only the table is known, a rule that fits the inverse pairs is a guess about values the table never gave.

Where this goes next

The table is the plainest view of an inverse function, and each of the other views is the same swap in disguise. From a rule, swapping the roles of input and output and solving turns every pair round at once, as Example 7 suggested. On a graph, turning (a, b) into (b, a) reflects each point in the line y = x, which is why the graph of an inverse is a mirror image. When outputs repeat, restricting the domain keeps a one to one piece. The rule f^{-1}\big(f(a)\big) = a is a statement about composition: doing f and then f^{-1} changes nothing. And a table of powers of 2 read backwards, from 8 to the exponent 3, is the first glimpse of Logarithms, the inverses of exponential functions (Exercise 17).

Exercises

Turning the pairs round

For each function, write the inverse as a list of pairs and give its domain and range, or explain why no inverse function exists.

  1. f, with the pairs (1, 6), (3, -2), (4, 0), (7, 5)
  2. The table that pairs x = -4, -2, 0, 2 with y = 9, 5, 1, -3 in that order. Order the pairs of the inverse by their inputs.
  3. g, with the pairs (2, 5), (4, 8), (6, 5), (8, 1)
  4. k, with the pairs (-1, -1), (0, 0), (1, 1), (2, 8)
  5. A one to one function f has domain \{0, 5, 10, 15\} and range \{2, 4, 7, 11\}. Without seeing its pairs, give the domain and range of f^{-1}.

Reading values from a table

Exercises 6 to 14 use this one to one function f.

x-3-1025
f(x)40-251
  1. Find f^{-1}(4).
  2. Find f^{-1}(1).
  3. Find f^{-1}(-2).
  4. Find f\big(f^{-1}(5)\big).
  5. Find f^{-1}\big(f(-1)\big).
  6. Find f^{-1}\big(f^{-1}(1)\big).
  7. Is f^{-1}(3) defined? Explain.
  8. Solve f(x) = 0.
  9. Find f^{-1}(0) and \displaystyle \frac{1}{f(0)}, and say whether they are equal.

In context

  1. Ayesha saves the same amount every week. Her balance B(n), in dollars, after n weeks is 50, 90, 130, 170, 210 for n = 0, 4, 8, 12, 16. Find B^{-1}(170) and say what it means. What is the domain of B^{-1}?
  2. On one morning’s hike Tomas records the air temperature T(e), in degrees Celsius, at elevation e meters: 18, 15, 12, 8, 5 at e = 0, 500, 1000, 1500, 2000. Write the pairs of T^{-1} ordered by temperature, then find T^{-1}(8) and say what it means.
  3. The table of g(n) = 2^n for n = 0, 1, 2, 3, 4, 5 has outputs 1, 2, 4, 8, 16, 32. Find g^{-1}(16), g^{-1}(32) and g^{-1}(1). Does the table define g^{-1}(10)?
  4. A town’s rainfall in millimeters for January to May was 60, 45, 60, 52, 38. With the month as the input, does the rainfall have an inverse function? Explain.

Reasoning

  1. Explain why the domain of f^{-1} is always the range of f.
  2. Explain why the inverse of f^{-1} is f itself.
  3. Give a function on the domain \{1, 2, 3, 4\}, other than f(x) = x, that is its own inverse, and explain how a list of its pairs shows this.
  4. A function given by a table has six different inputs, and its range has only five members. Can it have an inverse function? Explain.
  5. A courier lists several weights, and every heavier weight on the list costs strictly more than every lighter one. Explain why its price list always has an inverse function.
Answers
  1. f^{-1} has the pairs (6, 1), (-2, 3), (0, 4), (5, 7), with domain \{-2, 0, 5, 6\} and range \{1, 3, 4, 7\}. The outputs 6, -2, 0, 5 are all different, so the swap is a function.
  2. The outputs 9, 5, 1, -3 are all different. Ordered by input, the inverse has the pairs (-3, 2), (1, 0), (5, -2), (9, -4), with domain \{-3, 1, 5, 9\} and range \{-4, -2, 0, 2\}.
  3. No inverse function. The output 5 comes from the inputs 2 and 6, so turning the pairs round gives (5, 2) and (5, 6): the input 5 would have two outputs.
  4. k^{-1} has the pairs (-1, -1), (0, 0), (1, 1), (8, 2), with domain \{-1, 0, 1, 8\} and range \{-1, 0, 1, 2\}.
  5. The domain of f^{-1} is \{2, 4, 7, 11\} and its range is \{0, 5, 10, 15\}: the two sets swap places.
  6. f^{-1}(4) = -3, since f(-3) = 4.
  7. f^{-1}(1) = 5, since f(5) = 1.
  8. f^{-1}(-2) = 0, since f(0) = -2.
  9. f\big(f^{-1}(5)\big) = 5: f^{-1}(5) = 2 and f(2) = 5.
  10. f^{-1}\big(f(-1)\big) = -1: f(-1) = 0 and f^{-1}(0) = -1.
  11. f^{-1}\big(f^{-1}(1)\big) = 2: f^{-1}(1) = 5 and f^{-1}(5) = 2.
  12. Not defined. 3 is not an output of f, so it is not in the domain of f^{-1}.
  13. x = -1. The only input with output 0 is -1; that is, f^{-1}(0) = -1.
  14. f^{-1}(0) = -1 and \displaystyle \frac{1}{f(0)} = \frac{1}{-2} = -\frac{1}{2}. They are not equal.
  15. B^{-1}(170) = 12: the balance reached 170 dollars after 12 weeks. The domain of B^{-1} is \{50, 90, 130, 170, 210\}, the range of B.
  16. T^{-1} has the pairs (5, 2000), (8, 1500), (12, 1000), (15, 500), (18, 0), and T^{-1}(8) = 1500: it was 8 degrees Celsius at an elevation of 1500 meters.
  17. g^{-1}(16) = 4, g^{-1}(32) = 5 and g^{-1}(1) = 0. The table does not define g^{-1}(10), since 10 is not among its outputs.
  18. No. The output 60 comes from both January and March, so reading the table backwards, 60 millimeters would have two months.
  19. Turning a pair (a, b) of f round gives the pair (b, a) of f^{-1}. So the first entries of f^{-1} are exactly the second entries of f: the inputs of f^{-1} are the outputs of f.
  20. To invert f^{-1}, turn each of its pairs round. Its pairs are the pairs of f already turned round once, and turning (b, a) round gives back (a, b). So the result is f, pair for pair. It is a function because f is.
  21. One example is \{(1, 2), (2, 1), (3, 4), (4, 3)\}. Turning each pair round gives (2, 1), (1, 2), (4, 3), (3, 4), which is the same list in another order. A list is its own inverse exactly when the turned round version of each pair is also in the list.
  22. No. Six inputs share five outputs, so at least two inputs share an output (if each output came from at most one input there would be at most five inputs). Then the function is not one to one.
  23. Two different weights cannot cost the same, because the heavier of the two costs strictly more. So no price appears twice, the price list is one to one, and turning its pairs round gives a function.
kg1128 · updated 2026-10-19 · CC-BY-SA-4.0