Quarry School

Inverse functions: crash course

about 21 min to listen7 lessons15 questions to tryUnit 7 of 17

Short view. Each lesson's rule, its steps and its trap. Switch to Full for a worked example and a question to try in every lesson.Full view. Each lesson's rule, its steps, one worked example with Watch it solved, the trap, and one question to try.

1 Undoing a function, and what f^-1 means

about 3 minOpen the full lessonOnly this lesson

The rule

When f has an inverse function and f(a)=b, then f−1(b)=a.

The inverse function f−1 takes each output of f back to the input it came from. The −1 is part of the name, not a power: f−1(x) does not mean 1f(x).

How

  1. Read f−1(b) as a question in plain words: b came out of f. Which input went in?
  2. Rewrite the question as f(?) = b. The number inside f−1( ) is an output of f.
  3. Find that input. In a table, find b in the output row and read the input above it. With a formula, set the formula equal to b and solve for x.
  4. Write the answer as f−1(b) = the input you found.
  5. Check by going forward: put your answer into f and confirm that b comes out.

Worked example

Worked example

Reading f−1(7) from a table, and telling it apart from two look-alikes

The table shows a function f. Find f−1(7). Then show that the answer is not f(7) and not 1f(7). In plain words, f−1(7) asks: 7 came out of f, which input went in?

input xoutput f(x)15293742710
x: 1, 2, 3, 4, 7; f(x): 5, 9, 7, 2, 10.
Show the steps and the answer
input xoutput f(x)15293742710↑ solve: output given, read every input above it
The 7 in the output row is highlighted, and the arrow points up to its input, 3.
  1. Say what is asked. f−1(7) means: 7 came out of f. Find the input that went in.f−1 takes an output of f back to its input, so the 7 here is an output of f, not an input.
  2. Rewrite the question as f(?) =7.f(a) = b and f−1(b) = a are the same fact read in two directions.
  3. Look along the bottom row of the table, the f(x) row, for 7. It appears once, in the third column.The bottom row holds the outputs of f, and 7 is being used as an output.
  4. Read the input directly above that 7. It is 3. So f(3)=7.In the table each output sits under the input that produced it.
  5. Write the answer: f−1(7)=3.The rule says f(a) = b gives f−1(b) = a. Here a = 3 and b = 7.
  6. Compare with f(7). Find 7 in the top row, in the last column. Below it is 10, so f(7)=10.f(7) uses 7 as an input. f−1(7) uses 7 as an output. Those are different questions, and here their answers differ: 3 and 10.
  7. Compare with 1f(7). Since f(7)=10, this is 110.1 over f(7) is 1 divided by an output. It is a reciprocal, not the inverse function.
Answer
  • f−1(7)=3
  • f(7) = 10, a different question
  • 1f(7) = 110, a reciprocal and not an inverse
Double-check Go forward. Put the answer 3 into f: the column under the input 3 shows 7, so f(3) = 7. Since f turns 3 into 7, undoing f turns 7 back into 3. The answer holds.

The trap

Reading f−1(x) as 1f(x). On the name of a function, −1 means inverse, not 1 over. To avoid the mistake, say f inverse out loud and turn f−1(b) into the question f(?) = b before you compute anything. When 1 over f(x) is meant, it is written 1f(x)−1 or [f(x)], with the −1 outside brackets.

Quick check

Try it before you open its steps. It is question 3 of 6 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 6

A formula with one step

Let g(x) = x + 5. Find g−1(12). In plain words: 12 came out of g, which input went in?

Show the steps and the answer
12g⁻¹: undo add 5, sosubtract 5inputoutput7
The inverse of adding 5 is subtracting 5, so 12 goes back to 7.
  1. Rewrite the question as g(x)=12, which is x+5=12.g−1(12) is the input that g turns into 12. This equation finds that one input.
  2. Subtract 5 from both sides: x=12−5=7.g added 5, and subtracting 5 undoes adding 5.
  3. Write g−1(12)=7.7 is the input whose output is 12.
Answer
g−1(12)=7
Double-check Go forward: g(7) = 7 + 5 = 12. The output is 12, as required.

2 Checking that two functions are inverses

Open the full lessonOnly this lesson

The rule

Two functions f and g are inverses of each other exactly when both of these are true: f(g(x))=x for every input x that g accepts, and g(f(x))=x for every input x that f accepts.

When both hold, g is f−1 and f is g−1. If either one fails, even for a single input, they are not inverses.

How

  1. Write down both rules, f(x) and g(x), side by side.
  2. First order, f(g(x)): copy the rule for f, but wherever it has x, write an empty pair of parentheses. Then put the whole formula for g(x) inside the parentheses.
  3. Simplify. The result must be exactly x. Not x + 2, not 3x, not −x.
  4. Second order, g(f(x)): copy the rule for g with empty parentheses in place of x, and put the whole formula for f(x) inside.
  5. Simplify. Again the result must be exactly x.
  6. Decide. If both orders gave x, for every input the inner function accepts, f and g are inverses. If either one gave anything else, they are not, and you can stop at the first failure.
  7. Spot check with one number: pick a number f accepts, run it through f and then g, and confirm it comes back. Then pick a number g accepts and run it through g and then f.

Worked example

Worked example

A linear pair, checked in both orders

Are f(x) = 3x − 5 and g(x) = x+53 inverses of each other? In plain words: if you run any number through one of them and then through the other, in either order, do you always get that number back?

Show the steps and the answer
4f: times 3,then minus 5g: plus 5,then divide by3firstsecond74
The 4 that goes into f comes back out of g, which is what g(f(x)) = x looks like for one number.
  1. Write the plan: compute f(g(x)) and g(f(x)), and see whether each one simplifies to x.Being inverses is a two-way promise, so there are two things to test.
  2. Start f(g(x)). The rule for f is f( ) = 3( ) − 5. Put g(x) in the parentheses: f(g(x))=3·x+53−5.f(g(x)) means g goes first and its whole output becomes the input of f.
  3. Simplify 3·x+53 to x+5.Multiplying by 3 cancels dividing by 3, the same way 3 · 123 = 12.
  4. Now f(g(x))=x+5−5=x.Adding 5 and then subtracting 5 leaves nothing extra. The first order passes.
  5. Start g(f(x)). The rule for g is g()=()+53. Put f(x) in the parentheses: g(f(x))=(3x−5)+53.g(f(x)) means f goes first and its whole output becomes the input of g.
  6. Simplify the top: 3x−5+5=3x. So g(f(x))=3x3.−5 and +5 add to 0.
  7. 3x3=x.Dividing by 3 cancels multiplying by 3. The second order passes.
  8. Both orders gave exactly x, so f and g are inverses.That is the rule: f(g(x)) = x and g(f(x)) = x together.
Answer
  • f(g(x)) = x
  • g(f(x)) = x
  • Yes, f and g are inverses of each other, so g = f−1.
Double-check A second way, with a real number in place of x. Start with 4. f first: f(4) = 3 · 4 − 5 = 7, then g(7) = 7+53 = 123 = 4. Back to 4. Now g first: g(4) = 4+53 = 93 = 3, then f(3) = 3 · 3 − 5 = 4. Back to 4 again. Both round trips agree with the algebra.

The trap

Stopping after one order. Getting f(g(x)) = x feels like the finish, but it is half of the test. With f(x) = x2 and g(x) = x, the first order gives (x)2 = x and passes, while the second order gives g(f(−3)) = 9 = 3, which is not −3. Always write both lines, f(g(x)) and g(f(x)), before you answer yes.

Quick check

Try it before you open its steps. It is question 3 of 5 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 5

A pair that looks right and is not

Are f(x) = 2x + 6 and g(x) = x2 − 6 inverses? The question asks whether both round trips return x. One failure is enough to say no.

Show the steps and the answer
  1. f(g(x))=2(x2−6)+6.f doubles its whole input and adds 6. The input is all of g(x), so it goes in parentheses.
  2. Distribute the 2: 2·x2=x and 2·(−6)=−12. So f(g(x))=x−12+6.The 2 multiplies both terms inside the parentheses.
  3. x−12+6=x−6.−12+6=−6.
  4. x−6 is not x, so stop here. They are not inverses.The result must be exactly x. A leftover −6 means the round trip lands 6 short every time.
Answer
  • f(g(x)) = x − 6, which is not x.
  • No, they are not inverses.
Double-check With the number 10: g(10) = 102 − 6 = −1, then f(−1) = 2 · (−1) + 6 = 4. You started at 10 and returned to 4, which is 10 − 6, as the algebra said. Changing the 6 in g to a 3 repairs the pair: with g(x) = x2 − 3, f(g(x)) = 2(x2 − 3) + 6 = x − 6 + 6 = x, and g(f(x)) = 2x+62 − 3 = (x + 3) − 3 = x.

3 One-to-one functions and the horizontal line test

about 3 minOpen the full lessonOnly this lesson

The rule

A function f is a one-to-one function when different inputs always give different outputs: f(a) = f(b) happens only when a = b.

A function has an inverse function exactly when it is one-to-one. Horizontal line test: a function is one-to-one exactly when no horizontal line meets its graph at more than one point.

How

  1. Say the question in plain words: do any two different inputs share an output?
  2. From a table or a list of pairs: read along the outputs. A value that sits under two different inputs means the function is not one-to-one. No repeated output means it is one-to-one.
  3. From a graph: hold a horizontal line at the bottom of the picture and slide it to the top. If at any height it meets the graph at two or more points, the function is not one-to-one. If it meets the graph at most once at every height, the function is one-to-one.
  4. From a formula: look at its graph and use the horizontal line test, or write f(a) = f(b) and see whether that forces a = b.
  5. To say a function is not one-to-one, write down the proof: two different inputs and the output they share, such as f(−2) = 4 and f(2) = 4.
  6. State the conclusion about undoing: a one-to-one function has an inverse function, and a function that is not one-to-one does not.

Worked example

Worked example

Can f(x) = x2 − 3 be undone?

Decide whether f(x) = x2 − 3 is a one-to-one function, and say whether it has an inverse function. In plain words: do any two different inputs give the same output?

Show the steps and the answer
(−2, 1)(2, 1)−4−224−4−2246
The flat line at height 1 meets the graph twice, above x = −2 and above x = 2.
input xoutput f(x)−21−1−20−31−221↑ solve: output given, read every input above it
The output 1 sits under two different inputs, −2 and 2.
  1. Look at the graph of f: a U shape with its lowest point at (0,−3).x2 is never negative and equals 0 only when x = 0, so the smallest output is 0 − 3 = −3. On either side of 0 the outputs climb.
  2. Lay a horizontal line across the graph at height 1. This is the line y=1.Every point on that line has output 1, so wherever it meets the graph, the function's output is 1. Height 1 is above the lowest point, so the line cuts through both arms of the U.
  3. Read the meeting points: (−2,1) and (2, 1).The line crosses the left arm above x = −2 and the right arm above x = 2.
  4. Confirm with the formula: f(−2)=(−2)2−3=4−3=1, and f(2)=22−3=4−3=1.Reading a graph by eye can be slightly off, and the formula settles it. (−2)2 = (−2) × (−2) = 4, because a negative times a negative is positive.
  5. Conclude that f is not a one-to-one function.Two different inputs, −2 and 2, share the output 1. One tied pair is enough.
  6. Conclude that f has no inverse function.f−1(1) would have to be −2 and also 2, and a function gives only one output for each input.
Answer
  • f(x) = x2 − 3 is not a one-to-one function, because f(−2) = 1 and f(2) = 1.
  • It fails the horizontal line test, so it has no inverse function.
Double-check A second way, without the graph: build a table for x = −2, −1, 0, 1, 2. The outputs are 1, −2, −3, −2, 1. In the output row, 1 appears twice (under −2 and under 2) and −2 appears twice (under −1 and under 1). Repeated outputs under different inputs give the same verdict: not one-to-one.

The trap

Using the wrong line. A vertical line tests whether a graph is a function at all. A horizontal line tests whether that function is one-to-one. The graph of y = x2 passes the first test and fails the second. Say the question out loud before you draw the line: "does one input have two outputs?" calls for a vertical line, and "do two inputs share one output?" calls for a horizontal line.

Quick check

Try it before you open its steps. It is question 3 of 5 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 5

A slanted straight line

Is f(x) = 2x − 1 a one-to-one function? In plain words: can two different inputs ever give the same output?

Show the steps and the answer
(2, 3)−224−4−2246
The flat line at height 3 meets the slanted line at one point only, (2, 3).
  1. Look at the graph: a straight line that climbs steadily from left to right.Each step of 1 to the right adds 2 to the output: f(0) = −1, f(1) = 1, f(2) = 3.
  2. Lay the horizontal line y=3 across it. It meets the graph once, at (2, 3).A climbing line passes through each height one time and never comes back to it.
  3. Slide the horizontal line to any other height. There is still one meeting point.The line keeps climbing to the right and keeps falling to the left, so it reaches every height exactly once.
  4. Conclude that f passes the horizontal line test.No horizontal line meets the graph at more than one point.
Answer
Yes. f(x) = 2x − 1 is a one-to-one function, so it has an inverse function.
Double-check With algebra: suppose two inputs a and b give the same output, so 2a − 1 = 2b − 1. Add 1 to both sides: 2a = 2b. Divide both sides by 2: a = b. The two inputs were the same number all along, so different inputs cannot share an output.

4 Domain and range trade places

about 3 minOpen the full lessonOnly this lesson

The rule

If f is a one-to-one function, then: domain of f−1= range of f, and range of f−1= domain of f.

How

  1. Make sure f is a one-to-one function, so that f−1 exists: no output repeated in a table, or a graph that passes the horizontal line test.
  2. Find the domain of f: every input f allows.
  3. Find the range of f: every output f actually produces. List only outputs that really come out, not every number you can imagine.
  4. Trade the two lists. Domain of f−1 = range of f. Range of f−1 = domain of f.
  5. Check with one pair. Pick an allowed input a and compute b = f(a). Then f−1(b) = a, so b must sit in your new domain and a must sit in your new range.

Worked example

Worked example

The domain and range of an inverse, with no formula for the inverse

The function f(x) = x−2 + 1 is a one-to-one function, so it has an inverse function. Without finding a formula for f−1, find the domain and the range of f−1. In plain words: which numbers may go into f−1, and which numbers can come out of it?

Show the steps and the answer
(2, 1)(6, 3)domainrange2468101212345
The shadow on the x-axis starts at 2, the domain of f, and the shadow on the y-axis starts at 1, the range of…
  1. Find the domain of f. The inside of the root must be 0 or more: x−2≥0, so x≥2. Domain of f: [2,∞).A negative number has no real square root. Solving x − 2 ≥ 0 finds the smallest input the root accepts. Plug it in to see: f(2) = 0 + 1 = 1, which works, while f(1) would need −1, which is not a real number.
  2. Find the range of f. The root x−2 is 0 at x=2 and grows without end as x grows. Adding 1 lifts every output by 1, so f(x)≥1. Range of f: [1,∞).A square root never comes out negative, so its smallest value is 0 and the smallest output of f is 0 + 1 = 1. The outputs then climb through every number above 1: f(2) = 1, f(3) = 2, f(6) = 3, f(11) = 4.
  3. Trade the first list. Domain of f−1= range of f=[1,∞).f−1 can only accept numbers that f actually produces, and those are the numbers from 1 up.
  4. Trade the second list. Range of f−1= domain of f=[2,∞).f−1 hands back the inputs of f, and those are the numbers from 2 up.
Answer
  • Domain of f−1: [1, ∞)
  • Range of f−1: [2, ∞)
Double-check Test one pair. f(6) = 6−2 + 1 = 4 + 1 = 2 + 1 = 3, so f−1(3) = 6. The input 3 is in [1, ∞) and the output 6 is in [2, ∞). Now test a number outside. Could f−1(0) exist? That would need x−2 + 1 = 0, so x−2 = −1, and a square root is never negative. So 0 is not allowed into f−1, which agrees with [1, ∞).

The trap

Writing the domain of f again as the domain of f−1. The two functions trade their lists, and the two lists are often different. For f(x) = x−2 + 1 the tempting answer is 'domain of f−1: [2, ∞)', but [2, ∞) is what f−1 gives back, not what it takes in. To avoid this, write two labeled lines before you answer, 'goes into f−1' and 'comes out of f−1', and fill the first line from the outputs of f.

Quick check

Try it before you open its steps. It is question 3 of 5 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 5

A square root that is subtracted

f(x) = 5 − x+4 is a one-to-one function. Find the domain and the range of f−1 without finding its formula. In plain words: which numbers does f produce, since those are the ones f−1 accepts, and which numbers does f accept, since those are the ones f−1 returns?

Show the steps and the answer
(−4, 5)(0, 3)domainrange−44812246
The graph starts at height 5 and only falls, so its shadow on the y-axis is 5 and everything below.
  1. Find the domain of f. The inside of the root must be 0 or more: x+4≥0, so x≥−4. Domain of f: [−4,∞).A negative number has no real square root. Solving x + 4 ≥ 0 finds the smallest input the root accepts. Plug it in to see: f(−4) = 5 − 0 = 5, which works, while f(−5) would need −1.
  2. Find the range of f. The root x+4 starts at 0 and grows without end, so 5−x+4 starts at 5 and falls without end: f(−4)=5,f(0)=3,f(5)=2,f(12)=1. Range of f: (−∞,5].The root is never negative, and here it is taken away from 5. Taking away 0 or more leaves 5 or less. This is the gotcha: the range runs down from 5, not up from it.
  3. Trade them. Domain of f−1=(−∞,5]. Range of f−1=[−4,∞).The outputs of f are the inputs of f−1, and the inputs of f are its outputs. The square bracket at 5 and the square bracket at −4 each stay with their own list.
Answer
  • Domain of f−1: (−∞, 5]
  • Range of f−1: [−4, ∞)
Double-check f(0) = 5 − 4 = 5 − 2 = 3, so f−1(3) = 0. The 3 is in (−∞, 5] and the 0 is in [−4, ∞). Try a number outside: 6 would need 5 − x+4 = 6, so x+4 = −1, and a square root is never negative. So 6 is not in the domain of f−1.

5 Reading an inverse from a table and from a graph

about 4 minOpen the full lessonOnly this lesson

The rule

If f is a one-to-one function, then: (1) the table of f−1 is the table of f with its two rows traded; (2) the point (a, b) is on the graph of f exactly when the point (b, a) is on the graph of f−1; (3) the graph of f−1 is the graph of f reflected (flipped, as in a mirror) across the line y=x.

How

  1. Check that f is a one-to-one function. In a table, no number may appear twice in the output row. On a graph, use the horizontal line test: no horizontal line may meet the graph twice.
  2. To find one value, such as f−1(7), say what it asks: 'f gave the output 7; which input was it?' Find 7 in the output row of f, or at height 7 on the y-axis, and read back to the input.
  3. To get the whole table of f−1, trade the two rows. The old output row becomes the new input row.
  4. If you want the new inputs in order from smallest to largest, slide whole columns. Never separate an input from its own output.
  5. To get the graph of f−1, pick several clear points on the graph of f, write each one as (a, b), and swap it to (b, a).
  6. Plot the swapped points and join them with the same kind of shape the original had. Draw the line y = x lightly: each point and its swap must sit straight across that line from each other, the same distance away.
  7. Check one value both ways: if you wrote f−1(b) = a, the table or graph of f must show f(a) = b.

Worked example

Worked example

A table read backward

The first table shows a function g. In plain words, g−1 reads that table backward: it starts from an output of g and returns the input it came from.
(a) Does g have an inverse function?
(b) Write the table of g−1.
(c) Find g−1(7) and g−1(0).
(d) The point (3, 7) is on the graph of g. Which point does that put on the graph of g−1?

input xoutput g(x)−24011−33760
x:−2,0,1,3,6;g(x):4,1,−3,7,0.
Show the steps and the answer
input xoutput g(x)−24011−33760↑ solve: output given, read every input above it
The table of g, with the output 7 highlighted and an arrow up to its input 3.
input xoutput g⁻¹(x)−3106104−273↓ evaluate: input given, read the output below it
The table of g−1.
  1. Look along the g(x) row of the first table and see whether any number appears twice.Only a one-to-one function can be undone, and one-to-one means no two inputs share an output. The five outputs are all different, so g is a one-to-one function and g−1 exists.
  2. Trade the two rows of the first table. The g(x) row becomes the new input row and the x row becomes the new output row. For example, the column with −2 over 4 becomes a column with 4 over −2.Each column of g says g(a) = b. The inverse function sends b back to a, so b goes on top as the input and a goes underneath as the output.
  3. Slide whole columns so the new inputs run from smallest to largest. The second table is the result. Its first column, −3 over 1, came from the old column 1 over −3.The order of the columns does not change what a table says, as long as each input keeps its own output. Inputs in order are quicker to read.
  4. Find g−1(7). Look for 7 in the g(x) row of the first table. It sits under x=3, so g−1(7)=3.g−1(7) asks which input of g produced the output 7. The first table says g(3) = 7.
  5. Find g−1(0). Look for 0 in the g(x) row of the first table, not in the x row. It sits under x=6, so g−1(0)=6.The 0 in the x row belongs to the fact g(0) = 1, which answers a different question. For the inverse function, 0 has to be an output of g, and the first table says g(6) = 0.
  6. Swap the two numbers in (3, 7) to get (7, 3).The point (3, 7) on the graph of g says g(3) = 7. That is the same fact as g−1(7) = 3, which is the point (7, 3) on the graph of g−1.
Answer
  • (a) Yes. No output of g repeats, so g is a one-to-one function.
  • (b) The second table: g−1(−3) = 1, g−1(0) = 6, g−1(1) = 0, g−1(4) = −2, g−1(7) = 3.
  • (c) g−1(7) = 3 and g−1(0) = 6.
  • (d) (7, 3)
Double-check Feed each answer back into g. Composing a function with its inverse function must return the number you started with: g(g−1(7)) = g(3) = 7, and g(g−1(0)) = g(6) = 0. Both come back correctly. A second look: the inputs in the table of g−1 are −3, 0, 1, 4 and 7, which are exactly the outputs of g, as they must be because domain and range trade places.

The trap

Reading in the forward direction. For f−1(5), the 5 is an output of f, so look for it in the output row of the table, or at height 5 on the y-axis of the graph. If you look for 5 in the input row, or at 5 on the x-axis, you find f(5), the answer to the forward question. Before you read anything, say the question aloud: 'f gave 5; what went in?'

Quick check

Try it before you open its steps. It is question 3 of 5 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 5

Flipping the points of a graph

The solid line in the first picture is the graph of a function f. It passes through (0, 3), (2, 2), (4, 1) and (6, 0). In plain words: each point is an input and output pair of f, and the inverse function owns the same pairs in the opposite order.
(a) Give four points on the graph of f−1.
(b) Where does the graph of f−1 cross each axis?
(c) Which point is on both graphs?

(0, 3)(2, 2)(4, 1)(6, 0)246246
The graph of f with four clear points to swap.
(0, 3)(3, 0)(4, 1)(1, 4)(6, 0)(0, 6)(2, 2)246246
The dashed line through the swapped points is f−1, and the two lines meet at (2, 2), a point on the line y =…
Show the steps and the answer
  1. Check that f can be undone. The graph is a slanted straight line, so every horizontal line meets it exactly once.Passing the horizontal line test means f is a one-to-one function, so the inverse function exists.
  2. Swap the two numbers in each point: (0, 3) becomes (3, 0), (2, 2) becomes (2, 2), (4, 1) becomes (1, 4), and (6, 0) becomes (0, 6).A point (a, b) on the graph of f says f(a) = b, which is the same fact as f−1(b) = a, the point (b, a).
  3. Find the axis crossings. (3, 0) has second number 0, so it is on the x-axis. (0, 6) has first number 0, so it is on the y-axis.The swap trades the two axes. f crossed the y-axis at (0, 3), so f−1 crosses the x-axis at (3, 0). f crossed the x-axis at (6, 0), so f−1 crosses the y-axis at (0, 6).
  4. Notice that (2, 2) did not change.Its two numbers are equal, so it lies on the line y = x, the mirror. A point on the mirror is its own reflection, so both graphs pass through it.
  5. Plot the four swapped points and join them. The second picture shows the result as a dashed line.The mirror image of a straight line is a straight line, so the swapped points line up.
Answer
  • (a) (3, 0), (2, 2), (1, 4) and (0, 6)
  • (b) It crosses the x-axis at (3, 0) and the y-axis at (0, 6).
  • (c) (2, 2), which lies on the line y = x.
Double-check Read one fact both ways: the solid line gives f(4) = 1 and the swapped point (1, 4) gives f−1(1) = 4. Compose them: f−1(f(4)) = f−1(1) = 4, back where you started. Also list the swapped points left to right: (0, 6), (1, 4), (2, 2), (3, 0). Each step of 1 to the right goes down 2, a steady pattern, so they do sit on one straight line.

6 Restricting a domain so an inverse exists

about 5 minOpen the full lessonOnly this lesson

The rule

A restricted domain is a smaller set of inputs than the full domain of a function.

If f fails the horizontal line test, choose a restricted domain on which f is one-to-one. On that piece f has an inverse function. The usual choice also keeps every output of f, so the inverse accepts all of them. For f(x)=x2 the usual restricted domain is x≥0, written [0,∞). The domain of f−1 is then the range of f, and the range of f−1 is the restricted domain.

How

  1. Run the horizontal line test on the whole graph. If no horizontal line meets it twice, stop: the function already has an inverse and needs no restriction.
  2. If the test fails and the graph turns around once, as a parabola or an absolute value graph does, find that turn. For a squared expression, the turn is where the part being squared equals 0. For x2 that is x = 0. For (x − 2)2 it is x = 2.
  3. For a graph with that one turn, keep the turning point and everything on one side of it. Unless the problem names a side, keep the right side: x ≥ the turning value.
  4. Run the horizontal line test again on the kept piece only. Every horizontal line must now meet it at most once.
  5. Check whether any output was lost. The usual choice keeps the range of the whole function; a piece with a smaller range still has an inverse, but that inverse accepts fewer numbers.
  6. Write the restricted domain next to the formula, for example f(x) = x2, x ≥ 0. It is now part of the function.
  7. Trade places: the domain of f−1 is the range of f, and the range of f−1 is the restricted domain. Every answer the inverse gives must lie in the restricted domain.

Worked example

Worked example

Restricting y = x2 and undoing an output

The function f(x) = x2 fails the horizontal line test. Choose a restricted domain so that f has an inverse, give the domain and range of f−1, and find f−1(25).

Show the steps and the answer
(−5, 25)(5, 25)−6−4−224639152127
On the whole parabola the line at height 25 meets the graph twice, once on each side of 0.
input xoutput f(x)00112439416525↑ solve: output given, read every input above it
On the kept piece each output appears once, and 25 points back to the single input 5.
  1. Say what the question asks in plain words: pick a piece of the inputs on which no two inputs share an output. Then, for the output 25, find the one kept input that gives it.An inverse sends each output back to one input, so shared outputs have to go before anything can be undone.
  2. Show the problem with numbers: f(−5)=(−5)2=25 and f(5)=52=25. In the first picture, the horizontal line at height 25 meets the graph at (−5,25) and at (5, 25).Two inputs share the output 25, so f is not a one-to-one function on all x. Undoing 25 would have two answers.
  3. Find where the graph turns around. x2 is smallest when x=0, where it equals 0. Left of 0 the graph falls. Right of 0 it climbs.A square is never negative, so 0 is the lowest output. The repeats happen because the climb on the right retraces the heights of the fall on the left.
  4. Keep the turning point and the right side: x≥0, written [0,∞).No side is named in the problem, so use the convention. This removes one input from every pair that shared an output.
  5. Test the kept piece. For inputs 0 or more, a bigger input always gives a bigger square, so the graph only climbs and every horizontal line meets it at most once.A graph that only climbs can never come back to a height it has already passed.
  6. Check the range. The kept piece starts at height 0 and climbs without end, so its range is y≥0, written [0,∞). The whole parabola had the same range.Each output that came from a negative input also comes from its positive partner, so nothing was lost.
  7. Trade places. Domain of f−1: [0,∞), the range of f. Range of f−1: [0,∞), the restricted domain.The inputs of the inverse are the outputs of f, and the outputs of the inverse are the kept inputs of f.
  8. Find f−1(25). The output is 25. The kept input that gives it is 5, since 52=25 and 5≥0. So f−1(25)=5.The input −5 also squares to 25, but −5 is not in the restricted domain, so it cannot be an answer.
Answer
  • Restricted domain: x ≥ 0, or [0, ∞).
  • Domain of f−1: [0, ∞).
  • Range of f−1: [0, ∞).
  • f−1(25)=5.
Double-check A second way: look at the table of the kept piece. In the output row no number appears twice, and 25 sits in one column only, the column under the input 5. So the point (5, 25) is on the kept graph, and flipping it gives (25, 5) on the graph of the inverse, which says f−1(25) = 5.

The trap

The most common mistake is to restrict the domain on paper and then forget it. Once you keep x ≥ 0 for f(x) = x2, the inputs −1, −2, −3 and the rest are gone. So f−1(9) is 3 only. It is not "3 or −3", and it is not −3. To avoid the mistake, write the restricted domain beside the formula every time you write the function, and check that each answer from the inverse lies inside the restricted domain.

Quick check

Try it before you open its steps. It is question 3 of 6 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 6

A piece that is too big

Someone restricts f(x) = x2 to −1 ≤ x ≤ 3 and says it now has an inverse. Is that right? If not, repair the restricted domain and give the domain and range of the inverse.

Show the steps and the answer
(−1, 1)(1, 1)22468
On −1 ≤ x ≤ 3 the line at height 1 still meets the graph twice, so this piece is too big.
  1. Say what the question asks in plain words: do any two inputs between −1 and 3 share an output? If they do, cut the piece down until none do.A restricted domain works only if the function is a one-to-one function on all of it.
  2. Try a pair on opposite sides of 0: f(−1)=(−1)2=1 and f(1)=12=1. Both −1 and 1 lie between −1 and 3.The piece reaches past the turning point at 0, so part of the left side is still there to share outputs. The horizontal line at height 1 meets this piece twice, so it fails.
  3. Cut at the turn: keep 0≤x≤3, written [0, 3].x2 is smallest at x = 0. From 0 to 3 the graph only climbs, so no height is reached twice.
  4. Find the range of the repaired piece. The lowest output is f(0)=0 and the highest is f(3)=9, so the range is 0≤y≤9, written [0, 9].The piece climbs from (0, 0) to (3, 9) and passes every height in between.
  5. Compare with the range before the repair. On −1≤x≤3 the lowest output was also 0 and the highest was also 9.The inputs that were removed, from −1 up to 0, gave outputs between 0 and 1. The inputs from 0 to 1 still give those outputs, so nothing was lost.
  6. Trade places. Domain of f−1: [0, 9]. Range of f−1: [0, 3].The domain of the inverse is the range of f, and the range of the inverse is the restricted domain.
Answer
  • No. The inputs −1 and 1 both give 1.
  • Repaired restricted domain: 0 ≤ x ≤ 3, or [0, 3].
  • Domain of f−1: [0, 9].
  • Range of f−1: [0, 3].
Double-check Test one of the removed inputs. f(−12) = (−12) × (−12) = 14, since the tops multiply to 1 and the bottoms multiply to 4. The kept input 12 also gives 14. So the output 14 is still reached, and now by one input only.

7 Finding the inverse of a formula by swapping and solving

about 3 minOpen the full lessonOnly this lesson

The rule

For a one-to-one function f: write y=f(x), swap x and y to get x=f(y), solve for y, and name the result f−1(x).

If solving produces ±, the domain of f picks the sign, because the outputs of f−1 are the inputs of f. The domain of f−1 is the range of f.

How

  1. Make sure f is a one-to-one function on its domain. Use the horizontal line test, or use the restricted domain you are given. If two inputs share an output, stop: there is no inverse function yet.
  2. Write y in place of f(x). If the function comes with a domain condition such as x ≥ 0, write it beside the equation.
  3. Swap the letters. Every x becomes y and every y becomes x, in the equation and in the domain condition. So x ≥ 0 becomes y ≥ 0.
  4. Solve the swapped equation for y. One y: undo the steps in reverse order. Two y's in a fraction: clear the fraction, gather the y terms on one side, factor y out, divide. A squared y: take the square root of both sides and write ±.
  5. If ± appeared, keep the one sign that fits the condition on y.
  6. Write f−1(x) = your result, and state its domain, which is the range of f.
  7. Check. Send one number through f, then send the result through f−1. You should land on the number you started with.

Worked example

Worked example

First full run: a linear function

Find the inverse function of f(x) = 4x − 7. In plain words: f multiplies its input by 4, then subtracts 7. Find the formula that takes each output back to the input it came from.

Show the steps and the answer
=x4y − 7do the same thing to both sides
After the swap the scale reads x on one side and 4y − 7 on the other.
  1. Confirm an inverse function exists.The graph of f is a slanted straight line, and a horizontal line meets a slanted line once. So f is a one-to-one function.
  2. Write y=4x−7.y is a short name for the output f(x). It makes the swap possible to write.
  3. Swap the letters: x=4y−7.The inverse function holds the same pairs turned around. From here on, x stands for an old output and y for the old input we are hunting.
  4. Add 7 to both sides: x+7=4y.Subtracting 7 was the last thing done to y, so it is undone first. This leaves the 4y term alone on its side.
  5. Divide both sides by 4: x+74=y.The 4 multiplies y, so dividing by 4 leaves y alone. The whole of x + 7 is divided, not only the 7.
  6. Rename y: f−1(x)=x+74.y alone on one side is the output of the inverse function, written as a rule in x.
Answer
f−1(x)=x+74
Double-check With a number: f(5) = 4 · 5 − 7 = 13, and f−1(13) = 13+74 = 204 = 5, the number we started with. By composing both ways: f(f−1(x)) = 4 · x+74 − 7 = (x + 7) − 7 = x, and f−1(f(x)) = (4x−7)+74 = 4x4 = x.

The trap

The most common mistake comes with the square root. After x = y2, people write y = x out of habit, or leave y = ±x as the answer. Neither is safe. Write ± first, then look at the condition on y that came from the domain of f, and keep the one sign that fits it. For x ≥ 0 that is x. For x ≤ 0 it is −x. Then test with a number from the domain of f: it must come back to itself.

Quick check

Try it before you open its steps. It is question 4 of 8 in the full lesson, where they run from easy to exam-hard.

Try it · level 4 of 8

X on the bottom only

Find f−1(x) for f(x) = 3x−2. In plain words: f subtracts 2 from its input, then divides 3 by the result. Find the rule that takes each output back.

Show the steps and the answer
  1. Note the domain of f: x≠2. Then write y=3x−2 and swap: x=3y−2.x = 2 would make the bottom zero. The graph is y = 1x stretched and shifted, which no horizontal line meets twice, so f is a one-to-one function.
  2. Multiply both sides by (y − 2): x(y−2)=3.Multiplying by the bottom cancels it, so y is no longer trapped under a fraction bar.
  3. Divide both sides by x: y−2=3x.x multiplies the bracket, so dividing by x frees it. This is allowed because x is never 0 here: x stands for an output of f, and 3 divided by a number is never 0.
  4. Add 2 to both sides: y=3x+2.This undoes the subtraction and leaves y alone.
  5. Rename and state the domain: f−1(x)=3x+2, with x≠0.The domain of f−1 is the range of f, and f never gives the output 0.
Answer
  • f−1(x)=3x+2
  • Domain of f−1: x ≠ 0
Double-check f(5) = 35−2 = 33 = 1 and f−1(1) = 31 + 2 = 5. A second number: f(3) = 31 = 3 and f−1(3) = 33 + 2 = 1 + 2 = 3.

8 Quick checks for the whole unit

8 questions

Quick check 1 of 8

f has an inverse function and f(2) = 9. What is f−1(9)?

Show the steps and the answer
Answer
f−1(9) = 2, because the inverse function sends each output back to the input it came from.

Quick check 2 of 8

For f(x) = 5x, is f−1(x) equal to 15x?

Show the steps and the answer
Answer
No. f−1(x) = x5, because undoing multiply by 5 is divide by 5. The −1 is a label, not a power.

Quick check 3 of 8

f(x) = x + 4 and g(x) = x − 4. Compose both ways. Are they inverses?

Show the steps and the answer
Answer
Yes. f(g(x)) = (x − 4) + 4 = x and g(f(x)) = (x + 4) − 4 = x, so both orders return x.

Quick check 4 of 8

The horizontal line y = 2 crosses the graph of g at x = 1 and at x = 5. Is g a one-to-one function?

Show the steps and the answer
Answer
No. g(1) = 2 and g(5) = 2, so two inputs share an output and the graph fails the horizontal line test.

Quick check 5 of 8

A one-to-one function f has domain x ≥ 1 and range y ≥ 0. What are the domain and the range of f−1?

Show the steps and the answer
Answer
  • Domain of f−1: x ≥ 0
  • Range of f−1: y ≥ 1
  • The two sets trade places, because the inputs of f−1 are the outputs of f.

Quick check 6 of 8

The point (−2, 6) is on the graph of a one-to-one function f. Which point must be on the graph of f−1?

Show the steps and the answer
Answer
(6, −2), because each point (a, b) becomes (b, a), its mirror image in the line y = x.

Quick check 7 of 8

f(x) = x2 with the restricted domain x ≤ 0. What is f−1(16)?

Show the steps and the answer
Answer
f−1(16) = −4. Both 4 and −4 have the square 16, but only −4 is in the restricted domain.

Quick check 8 of 8

Find the inverse function of f(x) = 3x + 12.

Show the steps and the answer
Answer
f−1(x) = x−123. Swap to get x = 3y + 12, subtract 12, then divide by 3. Check: f(1) = 15 and f−1(15) = 33 = 1.