Inverse Functions Advanced. This lesson goes beyond core Algebra I. You can skip it.
Learning goals
- Swap input and output, algebraically and in a diagram, to build the inverse
- Read as the inverse, never the reciprocal
- Trade domain for range between a function and its inverse
- Apply the horizontal line test to spot a one-to-one rule
- Verify a pair by composing both ways to
Undoing what a function does
Start with a rule simple enough to see straight through: , the rule “add three.” Feed it and it returns ; feed it and it returns . To send those outputs back where they came from, you do the obvious thing and subtract three: goes back to , and goes back to . The rule “subtract three,” written , reverses everything “add three” did. That reversing rule is the inverse of .
Look at what happens to a single input-output pair. The function ties the input to the output , a pairing we can write as . Its inverse ties back to , the pair . The inverse takes every pair of and swaps its two entries: whatever was the input becomes the output, and whatever was the output becomes the input. That one sentence, swap the input and the output, is the whole idea of an inverse, and everything else in this lesson follows from it.
The inverse of has its own symbol, , read aloud as ” inverse.” It is defined to undo , and “undo” can be stated precisely in two directions. If you run and then run , you return to the input you started with:
Reading from the inside out, turns into , and turns that back into . The reverse order must work too. If you run first and then , you again come back to the start:
Both equations say the same thing from opposite ends: and cancel each other, whichever one you apply first. For and , check both directions:
Adding three and then subtracting three lands you back where you began, and so does subtracting first and then adding.
Check your understanding
A function pairs its input and output like this: , , , the same kind of pairing shown in the diagram above. Which pairs belong to ?
The inverse swaps every pair, exactly as the diagram swapped 5 and 8: whatever was the input becomes the output, and whatever was the output becomes the input. So ties back to , back to , and back to , the original pairs read the other way.
The superscript that is not a reciprocal
The symbol carries a trap, and it is worth defusing before you use it. The raised everywhere else in algebra makes a reciprocal, so looks like it should mean . It does not. Here is the name of the inverse function, and it has nothing to do with dividing by anything.
Why reuse a symbol that invites the confusion? For a nonzero number, its reciprocal is the number that multiplies with it to give : the reciprocal of is , and . Functions borrow the same idea with composition in place of multiplication: is the function that, composed with , gives back the input unchanged, the same job does for multiplication. The notation is a deliberate echo of that pattern, one inverse for each operation. Because the operations are different, the two inverses are different objects.
Make the difference concrete. For , the inverse function is , while the reciprocal is . These are not close. At ,
One returns the input that produced the output ; the other is a small fraction with nothing to do with undoing . Whenever you see , read “the function that reverses ,” never “one over .”
Check your understanding
Let , so that . What is ?
The expression is the reciprocal of the output, so drop the rule for into the denominator.
The inverse undoes the rule; the reciprocal just flips the output into a fraction.
Finding an inverse: swap, then solve
Guessing the inverse works for “add three,” but you need a method that works for any rule you are handed. The swap principle hands you one directly. The pairs of are (input, output), and the inverse’s pairs are (output, input). So to build the inverse you interchange the input and the output and then rearrange. In symbols, write , swap and , and solve the new equation for . The recipe is not a ritual; each step is the input-output swap written in algebra. It always produces a candidate inverse; the section “When a function has no inverse” comes back to when that candidate is a genuine function.
Watch it work on . A few input-output pairs show the pattern before the algebra does:
| input | |||
|---|---|---|---|
| output |
The inverse takes each output back to its input, so its pairs run the other way: , , . Write the output as :
Here is the input and is the output. Swap them, so that the letter standing for the output now plays the role of the input we feed in. The letter standing for the input is then the value we want back:
Solve this for by subtracting three and dividing by two:
Rename the result, and the inverse is . The rule “double, then add three” is undone by “subtract three, then halve,” with the steps reversed and each one turned around, exactly as an undo should be.
Worked example 1 Inverting a simple rational,
This rule subtracts three and then takes the reciprocal, and it accepts every input except , where the denominator would be zero. Find its inverse the same way. Start from
Swap and :
Solve for . Taking the reciprocal of both sides clears the fraction, and then add three:
So , defined for every input except . The forbidden inputs have traded places: banned and bans . The next section explains why that swap always happens. A quick check confirms one direction of the reversal, for every , the one input does not accept:
(A later section shows why checking the other direction, , matters too.)
Check your understanding
What is the inverse of ?
Write , swap and , then solve for .
So . Check it: .
Domain and range trade places
The forbidden-input swap you just saw is one instance of a rule that always holds: an inverse turns the domain and range of around. It follows straight from swapping input and output. Every pair of has the form (input from the domain, output from the range). The inverse swaps each pair into (output, input). So the numbers that were outputs are now the inputs of , and the numbers that were inputs are now its outputs. Therefore
- the domain of is the range of (the old outputs are the new inputs), and
- the range of is the domain of (the old inputs are the new outputs).
Return to from the last example. Its domain is every number except , and its range is every number except , because the reciprocal of a nonzero quantity is never . Its inverse has domain every number except and range every number except . Line them up and the trade is exact: the domain of one is the range of the other, both ways.
Check your understanding
Suppose has domain all numbers except and range all numbers except . What are the domain and range of ?
The domain of is the range of , and the range of is the domain of : the two trade places. Since excludes from its domain and from its range, excludes from its domain and from its range.
When a function has no inverse
Every example so far has had a clean inverse, but some functions have none, and it is important to see why. The trouble starts when two different inputs produce the same output. Consider the squaring rule on all numbers, . It sends both and to :
Now ask the inverse to do its job. It must send the output back to the input it came from, but here came from two inputs. Should be or ? There is no honest answer. A function is allowed only one output per input, and this would force the single input to have two outputs. So squaring on all numbers has no inverse function.
The property that avoids this trap has a name. A function is one-to-one when different inputs always give different outputs, that is, when no two inputs share an output. Squaring fails to be one-to-one because and collide. A line like is one-to-one, because two different inputs, stretched and shifted the same way, stay different. In fact a function has an inverse function exactly when it is one-to-one: two colliding inputs always block a reversal, the way and just did, and no collision always allows one.
The horizontal line test
One-to-one has a picture, and it is the mirror image of a test you already know. In the lesson on functions you met the vertical line test: a graph represents a function when no vertical line crosses it more than once. The reason is that a vertical line gathers all the points with a single input, and a function may not give that input two outputs. One-to-one asks the reverse question, so it uses the reverse line.
A horizontal line gathers all the points that share a single output, since every point on the line sits at the same height . If some horizontal line meets the graph in two points, those two points have the same output but different inputs, and the function is not one-to-one. So a graph belongs to a one-to-one function exactly when no horizontal line crosses it more than once. The vertical line test checks “one output per input,” which makes the graph a function. The horizontal line test checks “one input per output,” which makes that function invertible.
The rising line on the left passes: every height is reached exactly once, so it is one-to-one and has an inverse. The parabola on the right fails: the horizontal line hits it twice, at and for the height , the same collision that blocked its inverse.
Check your understanding
The graph of makes a V shape: it touches at and rises in a straight line on both sides. Apply the horizontal line test using the line . How many times does that horizontal line cross the graph, and what does it show?
Both and give , so the horizontal line crosses the V twice. Two crossings mean two different inputs share the output , so on all real numbers is not one-to-one and has no inverse function, the same kind of collision squaring has at every positive output.
A function that fails the test can often be repaired by shrinking its domain until it is one-to-one. Squaring collides because every positive output has two inputs that reach it, a positive one and its negative; only the output is different, since it comes from the single input . Throw away the negative inputs, keeping for , and every output now comes from a single nonnegative input. On that restricted domain squaring is one-to-one, and its inverse is the square root.
Worked example 2 An inverse on a restricted domain
Find the inverse of with the domain restricted to .
With the domain restricted, the rule is one-to-one, so an inverse function exists. Swap and solve, watching the restriction travel with the variable. Start from
Swap and . The condition was a statement about the input of , which becomes the output of , so it attaches to :
Solve for . When , two numbers square to , namely and ; when , the only number that squares to it is itself. Either way, the restriction keeps only the nonnegative choice:
So . The restriction is what rescued the inverse. Without it, would hand back two values of for each positive , which is no function at all. This is the general fix for a rule that fails the horizontal line test. Cut the domain down to a piece on which the rule is one-to-one, then invert that piece.
Check your understanding
Which of these functions is one-to-one on all real numbers, so that it has an inverse function?
A function is one-to-one when no two different inputs share an output, which for a graph is the horizontal line test. The line always rises as grows, so it never returns to a height it already reached, and every horizontal line meets it exactly once. The two squaring rules send and to the same output, and the constant rule sends every input to , so those three are not one-to-one.
Verifying an inverse by composition
You now have a way to find an inverse. But how do you check that a proposed answer is right, or test whether two functions handed to you are really inverses? The definition already said it: and are inverses exactly when they undo each other in both directions,
These are compositions, the operation from the last lesson, so verifying an inverse is just building the two composite functions and checking that each one collapses to , on every input the inside function actually accepts. Both directions are required, and the reason goes back to one-to-one. A single direction can hold while the other fails, and when it does the two functions are not inverses.
Worked example 3 Checking a pair in both directions
Show that and are inverses, then see why one direction alone would not settle it.
Build both compositions. For , drop the whole rule for into :
For , drop the whole rule for into :
Both directions give , so and are inverses.
To see why both were worth checking, look at a pair that passes one test and fails the other. Take on all numbers and . One direction looks perfect:
valid for every that accepts. But the other direction breaks:
which is not for negative inputs. At it gives , not . The square root cannot recover the sign that squaring destroyed. Because fails, squaring on all numbers and the square root are not inverses, exactly as the one-to-one test warned. Only after squaring is restricted to , so that no sign is ever lost, do both directions hold.
Check your understanding
Take for every real number , and . It is true that for every . To show that and are not actually inverses, which input would you plug into to reveal the problem?
Plugging in a positive number does not reveal anything wrong: , right back where it started. The direction that fails needs a negative input, since squaring destroys the sign and the square root can never restore it. At : , not . Checking only would have missed this entirely, which is exactly why both directions have to be checked before calling two functions inverses, the same failure the worked example above found at a different input.
Running a process backward
An inverse earns its keep whenever a function models a process and you need to run that process in reverse. If a rule turns a starting value into a result, its inverse turns the result back into the starting value, which answers a question the forward rule cannot.
Worked example 4 Recovering the input from the output
A phone plan charges a fixed dollars per month plus dollars for each minute of calls, so the monthly cost for minutes, , is . A bill comes to dollars. Find a formula that recovers the minutes from the cost, and use it.
The cost function runs forward, minutes in and dollars out. You want the reverse, dollars in and minutes out, which is the inverse. Write the cost as and solve for :
So the inverse is , which is . Since , the model only ever produces a cost , so this inverse is meant for bills of dollars or more. Apply it to the dollar bill:
The bill accounts for minutes. Check it forward: dollars, the original bill. The inverse turned a known cost back into the minutes that produced it.