Running a function backwards
Inverses from a table, from a graph, and by swapping x and y in the equation.
A currency converter turns pounds into euros. Standing at the other counter you want the opposite: given the euros, how many pounds was that? The second machine undoes the first, and it is built from the same information.
Start with a function stored as a table and reverse the lookup by hand.
Change the value for key 4 from 14 to 8 and run it again. The backwards table quietly loses an entry, and the next lesson is about why.
Every pair got turned round. Where the original said 3 goes to 11, the reversed one says 11 goes to 3. Sending a value forwards and then backwards returns it unchanged.
The reversed function is called the inverse of the original, and it is written , said as f inverse. Its rule is exactly the promise you watched: it takes an output of and returns the input that produced it.
On a graph: reflect over the line y = x
If is on the graph of , then is on the graph of . Swapping the two coordinates of a point is exactly what reflecting it over the line does. Run it and check the distances.
Add the point (4, 4) to the list and run it again. It is its own reflection, because it already sits on the line .
The midpoint of a point and its partner always has equal coordinates, so it lies on . That is what makes the reflection exact rather than approximate: the line is the mirror.
- 1
- Inverse applied to that
- 2
Drag a and b. The two solid lines are always mirror images in the dashed one, and the second output always comes back to 2.
From the equation: swap and solve
The algebra follows the same swap. Since the pairs turn into , exchange and in the equation and then rearrange to get on its own.
One worked example in full. Find the inverse of .
- Write it with : .
- Swap the letters: .
- Add 4 to both sides: .
- Divide both sides by 3: .
- Write it in the proper notation: .
Test it on a number. , and . The 5 came back.
There is a second way to think about the same work, which some people find faster: list what does to the input in order, then undo each step in the opposite order. For the steps are multiply by 3, then subtract 4. Undone backwards: add 4, then divide by 3. That is the rule derived above.
Change f_inverse to (x - 4) / 3, an easy slip, and run it again. Nothing comes back to where it started.
One more consequence of swapping the pairs, and it is examined often: the domain of is the range of , and the range of is the domain of . The inputs and outputs have traded places, so their sets trade places too.
An example makes that concrete. If has domain and range , then has domain and range . Handing the number 1 is meaningless, because no input to ever produced 1 in the first place.
The undoing-the-steps view also explains why the steps come back in reverse. If getting dressed is socks and then shoes, undressing is shoes and then socks. Since multiplies by 3 and then subtracts 4, its inverse adds 4 and then divides by 3, and doing those two in the other order gives a different rule that does not undo anything.
A function has . What is , and what is ?
, straight from the definition: 9 was produced by 2. cannot be worked out from what you were given; you would need to know which input produces the output 2, and nothing here says. Answering 9 is the trap.