A function and its inverse undo each other
Leans on
Quick review (2 minutes)
Think of a coat check.
Two functions f and g are inverses of each other exactly when g(f(x)) = x for every x in the domain of f, and f(g(x)) = x for every x in the domain of g. Then g = f⁻¹, the domain of g is the range of f, the range of g is the domain of f, and the point (a, b) is on the graph of f exactly when (b, a) is on the graph of g. The two graphs are mirror images across the line y = x.
Write the domain beside each function, including any cut. The domains decide the last step of the check.
Build f(g(x)): copy the rule of f, and wherever f has x, write the whole rule of g in parentheses.
Tidy up. Squaring undoes a square root, cubing undoes a cube root, and opposite steps such as + 3 and − 3 cancel. The result must be exactly x, with nothing left over.
Build g(f(x)) the same way, with the whole rule of f inside g, and tidy up.
If a square root of a square appears, such as , write it as |x| first. Then use the domain to decide whether |x| is x or −x.
If both orders give x, the two functions are inverses. Say where each result holds: f(g(x)) = x on the domain of g, and g(f(x)) = x on the domain of f.
Check with a number. Pick an allowed input a, compute b = f(a), and confirm that g(b) = a. The points (a, b) and (b, a) are mirror images across y = x.
Let f(x) = + 3 on the restricted domain x ≥ 0, and let g(x) = . Show that g is the inverse function of f by checking both orders, and name a pair of mirrored points.
f(g(x)) = x for every x ≥ 3
g(f(x)) = x for every x ≥ 0
So g = f⁻¹ on these domains. The point (2, 7) on f mirrors to (7, 2) on g.
Checking one order only, or dropping the domain. With f(x) = on all real numbers and g(x) = , the order f(g(x)) = ( = x works, yet g(f(−3)) = = 3, not −3. Always work both orders, write as |x|, and write the domain beside each result.
Write each function with its domain beside it.
Compute f(g(x)) by putting the whole rule of g, in parentheses, where f has x. Tidy up.
Compute g(f(x)) by putting the whole rule of f, in parentheses, where g has x. Tidy up.
Replace any square root of a square, , with |something|, and use the domain to remove the bars.
If both orders give exactly x, state that they are inverses and on which inputs each result holds.
Confirm with one number and its mirrored point: f(a) = b should come with g(b) = a.
inverse function
The function that undoes another function. If f turns 3 into 7, then the inverse, written , turns 7 back into 3.
one-to-one function
A function in which every output comes from only one input. No two inputs share an output, so no horizontal line meets its graph twice.
restricted domain
A domain made smaller on purpose. You keep only part of the inputs, such as x ≥ 0, so that the function becomes one-to-one and can have an inverse.
square root function
The function f(x) = , or a shifted or stretched copy of it. It accepts only inputs that keep the inside 0 or more. Its graph is half of a sideways parabola.
cube root function
The function f(x) = , or a shifted or stretched copy of it. It asks what number, used as a factor three times, gives x. It accepts every real number, negatives included.
1 In plain words
Think of a coat check. You hand over your coat and get a numbered ticket. Later you hand over the ticket and get your coat back. The two trades undo each other: coat to ticket and back to the same coat, or ticket to coat and back to the same ticket. A function and its inverse function behave the same way. Put a number into one, feed the result into the other, and you are holding the number you started with. This lesson shows how to test that with algebra, in both orders, and how it looks on a graph: the two curves are mirror images of each other across the slanted line y = x.
2 Picture it
Reminder
Reminder: Reading f(g(x)), The inverse notation, Root of a square, Absolute value, Square of a root, Cube and cube root, The domain of a square root, Clearing small fractions, Distributing a negative, Domain and range trade places
- Reading f(g(x)). Work from the inside out: g goes first, and f acts on what g gives. With f(x) = x + 1 and g(x) = 2x, f(g(3)) = f(6) = 7.
- The inverse notation. f⁻¹(x) names the inverse function of f. It does not mean 1 ÷ f(x). For f(x) = x + 4, f⁻¹(x) = x − 4.
- Root of a square. = |x|, because the root sign gives the answer that is 0 or more: = = 5.
- Absolute value. |x| = x when x ≥ 0, and |x| = −x when x < 0. For example |4| = 4 and |−4| = 4 = −(−4).
- Square of a root. ( = a whenever a ≥ 0: ( = 7.
- Cube and cube root. These undo each other for every real number, with no bars: ∛((−2) = ∛(−8) = −2.
- The domain of a square root. The inside of a square root must be 0 or more: needs x − 3 ≥ 0, so x ≥ 3.
- Clearing small fractions. Multiply the top part and the bottom part by the small bottom: ( + 3) ÷ ( + 1) becomes (1 + 6) ÷ (1 + 2) = after multiplying both by 2.
- Distributing a negative. A negative number in front multiplies every term inside: −2(x − 1) = −2x + 2.
- Domain and range trade places. The outputs of f are the inputs of f⁻¹. If f has domain [0, ∞) and range [3, ∞), then f⁻¹ has domain [3, ∞) and range [0, ∞).
3 Why
The inverse function was built by swapping input and output. So if f sends a to b, the inverse must send b back to a. Run one after the other and a returns as a, which is the algebra test. On a graph, f owns the point (a, b) and the inverse owns (b, a). Swapping the two numbers of a point flips it across the line y = x, because that line holds exactly the points whose two numbers are equal, and those points stay put. Both orders are tested because one order can work while the other fails when a domain was never cut.
4 The rule
Two functions f and g are inverses of each other exactly when for every x in the domain of f, and for every x in the domain of g.
Then , the domain of g is the range of f, the range of g is the domain of f, and the point (a, b) is on the graph of f exactly when (b, a) is on the graph of g. The two graphs are mirror images across the line .
The same idea, five ways
f of g of x equals x, and g of f of x equals x. When g is the inverse, say: f inverse of f of x is x.
Doing a function and then its inverse function, in either order, returns every allowed input unchanged, and their graphs are mirror images across the line y = x.
- f(f⁻¹(x)) = x for every x in the domain of f⁻¹
- f⁻¹(f(x)) = x for every x in the domain of f
- (a, b) is on the graph of f exactly when (b, a) is on the graph of f⁻¹
- domain of f⁻¹ = range of f
- range of f⁻¹ = domain of f
A coat check: coat to ticket to the same coat, or ticket to coat to the same ticket.
The same idea, other ways
Draw the slanted line y = x through (0, 0), (1, 1), (2, 2). Take any point of f, such as (2, 7), and swap its two numbers: (7, 2). The two points sit the same distance from the line, on opposite sides, like an object and its reflection. Do this to every point of f and you have drawn the mirror image of f. When f is one-to-one, that mirror image is the graph of the inverse function. If you folded the paper along y = x, the two curves would land on top of each other.
You and a friend use a number code. To hide a number, triple it. To read a hidden number, divide it by 3. Hide 5 and you send 15. Your friend divides by 3 and reads 5. It works the other way round too: take 12, divide by 3 to get 4, triple it, and 12 is back. Hiding is f(x) = 3x and reading is f⁻¹(x) = . Each one cancels the other, whichever goes first.
Let f double a number and add 1. The picture is its table. To find f(3), go down the column under 3: the output is 7. The inverse function asks the opposite question: the output is 7, so which input made it? Find 7 in the bottom row and go up: the input is 3. So f⁻¹(7) = 3, and f⁻¹(f(3)) = 3. The rule for this inverse is f⁻¹(x) = , and (7 − 1) ÷ 2 = 3 agrees with the table.
Say f sends a to b. The inverse function was made to send b back to a. So the inverse of f(a) is a, for every a that f accepts. And f of the inverse of b is f(a), which is b, for every b that f can produce. For the mirror, take (2, 7) and (7, 2). The point halfway between them has x = (2 + 7) ÷ 2 = 4.5 and y = (7 + 2) ÷ 2 = 4.5. Its two numbers are equal, so it sits on y = x. For any pair (a, b) and (b, a) the halfway point is (, ), always on the line. The line is always exactly in the middle, which is what a mirror does.
Three short checks. One: inside first, and you must come back with x, in both orders. Two: swap the numbers, mirror the point, so (a, b) on f means (b, a) on f⁻¹. Three: domain and range trade places. If any one of the three fails, the pair is not a function and its inverse.
f(f⁻¹(x)) = x
f⁻¹(f(x)) = x
(a, b) on f, so (b, a) on f⁻¹
domain of f⁻¹ = range of f
range of f⁻¹ = domain of f
mirror line: y = x
| What to compare | ||
|---|---|---|
| Steps, in order | square, then add 3 | subtract 3, then take the square root |
| Domain (allowed inputs) | [0, ∞) | [3, ∞) |
| Range (outputs) | [3, ∞) | [0, ∞) |
| Where the graph starts | (0, 3) | (3, 0) |
| Another point | (2, 7) | (7, 2) |
5 How
- Write the domain beside each function, including any cut. The domains decide the last step of the check.
- Build f(g(x)): copy the rule of f, and wherever f has x, write the whole rule of g in parentheses.
- Tidy up. Squaring undoes a square root, cubing undoes a cube root, and opposite steps such as + 3 and − 3 cancel. The result must be exactly x, with nothing left over.
- Build g(f(x)) the same way, with the whole rule of f inside g, and tidy up.
- If a square root of a square appears, such as , write it as |x| first. Then use the domain to decide whether |x| is x or −x.
- If both orders give x, the two functions are inverses. Say where each result holds: f(g(x)) = x on the domain of g, and g(f(x)) = x on the domain of f.
- Check with a number. Pick an allowed input a, compute b = f(a), and confirm that g(b) = a. The points (a, b) and (b, a) are mirror images across y = x.
Checking that two functions are inverses
- Write each function with its domain beside it.
- Compute f(g(x)) by putting the whole rule of g, in parentheses, where f has x. Tidy up.
- Compute g(f(x)) by putting the whole rule of f, in parentheses, where g has x. Tidy up.
- Replace any square root of a square, , with |something|, and use the domain to remove the bars.
- If both orders give exactly x, state that they are inverses and on which inputs each result holds.
- Confirm with one number and its mirrored point: f(a) = b should come with g(b) = a.
6 Worked example
Worked example
Checking both orders for a cut parabola and its square root function
Let f(x) = + 3 on the restricted domain x ≥ 0, and let g(x) = . Show that g is the inverse function of f by checking both orders, and name a pair of mirrored points.
Show the steps and the answer
- Say what the question asks. Feed the output of g into f, then feed the output of f into g. Each time the result must be the x you started with.Inverses must undo each other in both orders. One order alone can pass by accident.
- Write the domains. f accepts , which is the cut. For g, the inside of the root must be 0 or more: , so .Solving x − 3 ≥ 0 finds the inputs the root accepts. At x = 3 the inside is 0, which is allowed. At x = 2 the inside is −1, which is not.
- Build the first order: .f(g(x)) means g works first. The whole rule of g goes where f has x.
- Square the root: .Squaring undoes a square root when the inside is 0 or more, and x ≥ 3 makes x − 3 at least 0.
- Finish: . So for every .−3 and + 3 add to 0. The result holds on the domain of g, the function that worked first.
- Build the second order: .Now f works first, so the whole rule of f goes where g has x, and + 3 − 3 cancels under the root.
- Write the root of a square with bars: .The root sign always gives the answer that is 0 or more. For example = = 5, not −5.
- Use the domain of f. Since . So for every .The bars change nothing on a number that is already 0 or more. This is the step the cut domain was made for.
- Name mirrored points. , so (2, 7) is on the graph of f. Swap the numbers: (7, 2) is on the graph of g, and agrees.If f sends a to b, the inverse sends b to a, so every point (a, b) on f has the partner (b, a) on the inverse.
- f(g(x)) = x for every x ≥ 3
- g(f(x)) = x for every x ≥ 0
- So g = f⁻¹ on these domains. The point (2, 7) on f mirrors to (7, 2) on g.
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 7
Add 4, subtract 4
Show that f(x) = x + 4 and g(x) = x − 4 are inverses of each other.
Show the steps and the answer
- Say what is asked: put the result of g into f, then the result of f into g. Each time the answer must be the x you started with. Both functions accept every real number.Inverses must undo each other in both orders, on every allowed input.
- .g works first, so the whole rule of g, x − 4, goes where f has x.
- .−4 and + 4 add to 0.
- .Now f works first, so x + 4 goes where g has x, and + 4 and −4 cancel again.
Rung 2 of 7
An inverse read from a table and from points
The table shows a one-to-one function f. Find f⁻¹(7), find f⁻¹(f(4)), and name the points on the graph of f⁻¹ that mirror (0, 3) and (3, 9).
Show the steps and the answer
- asks: the output of f is 7, so which input gave it? Find 7 in the bottom row and look up. The input above it is 2, so .The inverse function runs the table from the bottom row to the top row.
- For , work inside first. The column under 4 shows . Then asks which input gives 11, and that input is 4.f carries 4 to 11 and the inverse carries 11 back to 4, so you return to the start.
- Swap the two numbers of each point: (0, 3) becomes (3, 0), and (3, 9) becomes (9, 3).If f sends a to b, the inverse sends b to a, so (a, b) on f gives (b, a) on f⁻¹.
- f⁻¹(7) = 2
- f⁻¹(f(4)) = 4
- (3, 0) and (9, 3) are on the graph of f⁻¹
Rung 3 of 7
A line with two steps
Show that f(x) = 3x − 6 and g(x) = + 2 are inverses.
Show the steps and the answer
- Say what is asked: both orders must return x. Both functions accept every real number, so there is no domain to watch.A line that is not flat is a one-to-one function on all real numbers.
- .The whole rule of g goes in parentheses where f has x.
- Multiply through: .The 3 multiplies both terms inside the parentheses, and 3 times a third of x is x.
- .+ 6 and −6 add to 0.
- .The whole rule of f goes on top of the fraction, where g has x.
- Divide each term by 3: .3x ÷ 3 = x and 6 ÷ 3 = 2, then −2 and + 2 cancel.
Rung 4 of 7
A cubic and a cube root function
Show that f(x) = 2 + 1 and g(x) = ∛() are inverses. Does either one need a restricted domain?
Show the steps and the answer
- Write the domains. Both accept every real number.A cube root function takes negative numbers too, and this cubic is a one-to-one function without any cut.
- .The whole rule of g goes where f has x.
- Cube the cube root: .Cubing undoes a cube root for every real number.
- , so the result is .Twice a half of something is the something, and −1 and + 1 cancel.
- .The whole rule of f goes where g has x. Then + 1 − 1 cancels and 2 ÷ 2 = 1.
- for every real x, with no absolute value bars.A cube keeps the sign of its number: (−2 = −8 and ∛(−8) = −2. So the cube root hands back the original number, negative or not.
- f(g(x)) = x and g(f(x)) = x for every real x
- They are inverses, and no restricted domain is needed.
Rung 5 of 7
The left half of a parabola
Let f(x) = − 4 on the restricted domain x ≤ 0, and let g(x) = −. Show that they are inverses.
Show the steps and the answer
- Write the domains. f accepts , the left half of the parabola, cut at its vertex . For g, the inside of the root must be 0 or more: , so .Solving x + 4 ≥ 0 finds the inputs the root accepts. The domain of f will decide what the absolute value becomes.
- .The whole rule of g, minus sign included, goes where f has x.
- .A negative times a negative is positive, as in (−3 = 9, and squaring a square root returns the inside.
- . So for every .+ 4 and −4 cancel. The result holds on the domain of g.
- .The whole rule of f goes under the root where g has x, and −4 + 4 cancels.
- , so .The root sign gives the answer that is 0 or more, which is what the bars say.
- On the domain of f, , so . Then .For a negative number the bars flip the sign: |−3| = 3, which is −(−3). The minus sign in front of the root flips it back.
- f(g(x)) = x for every x ≥ −4
- g(f(x)) = x for every x ≤ 0
- They are inverses on these domains.
Rung 6 of 7
A rational function
Show that f(x) = and g(x) = are inverses, and state where each check holds.
Show the steps and the answer
- Write the domains. For f, at , so f accepts every . For g, at , so g accepts every .Setting each bottom equal to 0 finds the one input that would mean dividing by zero, so it can be thrown out. At x = 2 the bottom of f is 2 − 2 = 0.
- .The whole rule of g replaces x in the top of f and in the bottom of f.
- Multiply the top part and the bottom part by ().Multiplying top and bottom by the same nonzero number does not change a fraction, and it clears the small fractions. Since x ≠ 1, x − 1 is not zero.
- Top: .The small fraction times (x − 1) leaves 2x + 1, and the 1 becomes x − 1.
- Bottom: .The −2 multiplies both x and −1, and −2 times −1 is + 2.
- , for every .3 divided by 3 is 1.
- . Multiply the top part and the bottom part by ().Same move with the other small bottom. Since x ≠ 2, x − 2 is not zero.
- Top: . Bottom: .Subtracting (x − 2) changes both of its signs: −x and + 2.
- , for every .The result holds on the domain of f, the function that worked first.
- f(g(x)) = x for every x ≠ 1
- g(f(x)) = x for every x ≠ 2
- They are inverses. The domain of f, x ≠ 2, is the range of g, and the domain of g, x ≠ 1, is the range of f.
Rung 7 of 7
Catching a wrong inverse and fixing it
A friend says the inverse of f(x) = (x − 1 on the restricted domain x ≥ 1 is g(x) = − 1. Test the claim. If it fails, fix it and verify the fix.
Show the steps and the answer
- Try a number first. Take 4, which is allowed because . . Then .If g were the inverse, 4 would come back. One number that fails is enough to show a pair is not inverses.
- 2 is not 4, so g is not the inverse of f.The trip did not return to its start.
- See the same failure in algebra: , which is not x. At it gives , not 9.The rule did not reduce to x: at x = 9 it gives 1, so this g does not undo f.
- Fix it. f subtracts 1 and then squares. Undo in reverse order: take the square root first, then add 1. The corrected rule is for .The last step done is the first step undone. The plus root is used because the domain x ≥ 1 is the right half of the parabola.
- , for every .+ 1 and −1 cancel, and squaring undoes the root when x is 0 or more.
- .The root of a square is the absolute value of what was squared.
- Since , so . Then , for every .The bars change nothing on a number that is already 0 or more.
- The claim fails: the friend's g sends f(4) = 9 to 2, not back to 4.
- The correct inverse is f⁻¹(x) = + 1 for x ≥ 0.
- f(f⁻¹(x)) = x for every x ≥ 0, and f⁻¹(f(x)) = x for every x ≥ 1.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Socks and shoes: you put on socks, then shoes. To undo, the shoes come off first. The inverse undoes the steps of f in reverse order.
- Swap the numbers, mirror the point: (a, b) on f means (b, a) on f⁻¹.
- A number test can show that a pair is not inverses with one failure. It can never prove that they are. Use the algebra to prove it and a number to catch slips.
- Whenever appears, stop and write bars: |something|. Then let the domain decide the sign.
- Each result belongs to the function that works first: f(g(x)) = x holds on the domain of g, and g(f(x)) = x holds on the domain of f.
- Fast domain check: the domain of f⁻¹ must be the range of f. If the smallest output of f is 3, the inverse must start at x = 3.
- A point on the mirror line, such as (4, 4), is its own mirror image. When you sketch by hand, use the same scale on both axes or the mirror will look crooked.
7 The trap
Checking one order only, or dropping the domain. With f(x) = on all real numbers and g(x) = , the order f(g(x)) = ( = x works, yet g(f(−3)) = = 3, not −3. Always work both orders, write as |x|, and write the domain beside each result.
Flash cards
Say the answer out loud, then flip.
Which two checks must both come out to x before you can call f and g inverses of each other?
- f(g(x)) = x for every x in the domain of g.
- g(f(x)) = x for every x in the domain of f.
- It is the coat check both ways: coat to ticket and back to the same coat, and ticket to coat and back to the same ticket.
The point (2, 7) is on the graph of f. Which point must be on the graph of f⁻¹, and why?
- The point (7, 2).
- The inverse function swaps input and output, so if f sends 2 to 7, the inverse sends 7 back to 2. Swapping the two numbers of a point flips it across the line y = x.
Let f(x) = on all real numbers and g(x) = . The order f(g(x)) gives x. Why are they still not inverses?
- The other order fails. g(f(−5)) = = 5, not −5.
- is |x|, and |x| equals x only when x ≥ 0. One order can work while the other fails when a domain was never cut, so always test both orders.
If g is the inverse function of f, how do the domain and range of g compare with those of f?
- They trade places.
- The domain of g is the range of f.
- The range of g is the domain of f.
- What f hands out, g takes in, like the tickets a coat check hands out being the same tickets it takes back.
From earlier
Show answer
Show answer
4 comes out, so 4 is in the range of .
Reason: f(4) = 9 says the same thing as (9) = 4.