Inverse Functions
Learning goals
- Swap input and output to build the inverse
- Read as the inverse, never the reciprocal
- Find an inverse by swapping and , then solving
- Apply the horizontal line test to spot a one-to-one rule
- Trade domain for range between a function and its inverse
- 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.
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? The choice is a deliberate analogy, and understanding it keeps the two ideas apart for good. For a nonzero number, its multiplicative inverse (its reciprocal) is the number that multiplies with it to give : the reciprocal of is , and . The number is special for multiplication because multiplying by it changes nothing. Functions tell the same story with composition in place of multiplication. The inverse is the function that composes with to give the rule that changes nothing, the identity that returns its input unchanged. That requirement is exactly the statement . So the raised marks “the inverse under the operation in play,” multiplication for a number, composition for a function. Because the two 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 is a different object entirely: it undoes , while 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 every time. 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.
Watch it work on . 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 Find the inverse of
The rule multiplies by four and then subtracts seven, so its inverse should add seven and then divide by four. Confirm it with the swap-and-solve steps. Write the output as :
Swap and , turning the input into the output and the output into the input:
Solve for by adding seven and dividing by four:
So . Check both directions with composition:
Both compositions collapse to , so the two functions undo each other.
Worked example 2 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 the reversal:
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.
Worked example 3 The domain and range of an inverse
Find the inverse of , and confirm that the domain and range swap.
The square root accepts only inputs that are zero or positive, so the domain of is all numbers . Its outputs are the nonnegative square roots, so the range of is all numbers as well. Find the inverse by swapping and solving:
Squaring both sides of undoes the root and gives . A restriction hides here: was the output of a square root, so , and the inverse is for only. Now check the trade. The domain of is , which is exactly the range of , and the range of is , which is exactly the domain of . The square root and squaring, kept to nonnegative numbers, are a matched inverse pair, a fact the next two sections put to work.
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.
Why an inverse needs a one-to-one function#
Suppose is not one-to-one, so two different inputs and , with , share an output: . Any inverse of has one required job, to send each output back to the input that produced it. Applied to , that job is contradictory, because was produced by and also by . The inverse would need and at the same time, giving the single input two different outputs. That is precisely what the definition of a function forbids, so no function can undo .
Now suppose instead that is one-to-one. Then every output of comes from exactly one input, never two. Sending each output back to that one input is therefore an unambiguous rule, with a single result each time. Producing a single result for each input is exactly what it means to be a function. So the reversal is a genuine function, the inverse .
Putting the two halves together, has an inverse function if and only if is one-to-one. The condition is not an extra hoop to clear; it is the exact price of demanding that the reversal be single-valued.
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. (Swapping every point for also reflects a graph across the line . That reflection is how the inverse is drawn in a later lesson; here the only question is whether the inverse exists.)
A function that fails the test can often be repaired by shrinking its domain until it is one-to-one. Squaring collides only because it accepts both a positive and a negative input for each output. Throw away the negatives, keeping for , and every output now comes from a single nonnegative input. On that restricted domain squaring is one-to-one, and it has the inverse you already met, the square root.
Worked example 4 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 . Two numbers square to , namely and , but the restriction keeps only the nonnegative one:
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, so every horizontal line meets it once, and the algebra agrees:
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 . Both 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 5 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.
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 6 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 . 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.