⚙️ Function Kingdom · Functions
Inverse Functions
Run a function backwards: find the inverse of a linear, rational, radical, cubic, exponential or logarithmic function, verify two functions are inverses by composing them, read an inverse off a table or a graph, and decide when an inverse is a function at all.
In short
- f-1 undoes f: f(a) = b and f-1(b) = a are the same fact read from opposite ends, so an inverse question is always a backwards question.
- To find the rule: write y = f(x), swap x and y, solve for y, rename it f-1(x). The swap is the step that does the reversing.
- The operations of f are undone in the opposite order, so 5x - 8 is inverted by adding 8 first and dividing by 5 second.
- Two functions are inverses only when f(g(x)) = x and g(f(x)) = x — both directions, checked by composing, never by how the rules look.
- The graph of f-1 is the graph of f reflected in y = x, so every point (a, b) becomes (b, a).
- A function has an inverse function exactly when it passes the horizontal line test; when it does not, restricting the domain at the turning point repairs it.
- Exponentials and logarithms are inverses of each other: the inverse of bx is log base b of x, and ln and ex undo one another.
The machine and its undo lever
Every bench in the Hall of Transformations has two levers. One runs the machine forwards, the other runs it back. Technician Mox will not let a machine leave the Hall until both work.
A function is the forward lever. Feed it 4, it hands you back 11. The inverse function, written f-1, is the lever that puts 11 back to 4. Nothing else. If f takes a to b, then f-1 takes b to a — the same fact, read from the other end.
f(4) = 11 means exactly the same as f-1(11) = 4
That one sentence is the whole topic, and almost every question here is a way of asking it. A value read off a table, a point on a graph, a rule found by algebra: all of them are that sentence in different clothes.
Two warnings, right at the start, because both catch nearly everyone.
f-1 is not 1/f. The raised -1 is notation, borrowed from the idea of an opposite, and it is not a power. If f(x) = 2x + 1 then f-1(x) = (x - 1)/2, while 1/f(x) would be 1/(2x + 1) — a completely different machine.
Not every function has one. If two different inputs share an output, the backwards lever has no idea which of them to hand back, and there is nothing to build. That question gets a whole section of its own below.
Swap, then solve
To find the rule for f-1, do this, always in this order:
1. write y = f(x) 2. swap every x with every y 3. solve the new equation for y 4. rename y as f-1(x)
Step 2 is the whole method. The swap is what turns "this is what comes out" into "this is what went in", and skipping it leaves you with f rearranged rather than reversed.
Take f(x) = 5x - 8.
y = 5x - 8 x = 5y - 8 (swapped) x + 8 = 5y y = (x + 8)/5
So f-1(x) = (x + 8)/5. Check it on a number: f(3) = 7, and f-1(7) = 15/5 = 3. The lever works both ways.
Notice how the *order* reverses as well as the operations. f multiplies by 5 and then subtracts 8, so f-1 adds 8 and then divides by 5. Getting dressed and getting undressed use the same garments in opposite orders.
Step 3 can take real work. For f(x) = (2x + 1)/(x - 3) the swap gives x = (2y + 1)/(y - 3), and then you clear the fraction, gather every y term on one side, factor y out and divide:
x(y - 3) = 2y + 1 xy - 3x = 2y + 1 xy - 2y = 3x + 1 y(x - 2) = 3x + 1 y = (3x + 1)/(x - 2)
Factoring y out is the step that gets skipped, and without it there is no way to finish.
Checking with composition
There is one honest test of whether two functions are inverses, and it is not whether the rules look like a matching pair.
Feed one into the other. If f and g really are inverses, then whatever you put in comes straight back out:
f(g(x)) = x and g(f(x)) = x
Both, not one. A pair can pass one composition and land somewhere else on the other, so the definition asks for both directions.
Try f(x) = 4x - 7 and g(x) = (x + 7)/4:
f(g(x)) = 4 * (x + 7)/4 - 7 = x + 7 - 7 = x g(f(x)) = ((4x - 7) + 7)/4 = 4x/4 = x
Both come home, so they are inverses.
Now try f(x) = 4x - 7 and g(x) = (x - 7)/4, which looks nearly the same:
f(g(x)) = 4 * (x - 7)/4 - 7 = x - 7 - 7 = x - 14
That is not x. The multiplier cancels, but the shift is undone the wrong way, so the composition drifts by 14 and the pair are not inverses. This is why "it looks about right" is not a method.
The same idea explains the round trip on a table. If a table says f(3) = 8, then f-1(f(3)) = f-1(8) = 3 — you never even need the rule.
Graphs, y = x, and when there is no inverse
Because (a, b) on f becomes (b, a) on f-1, the two graphs are mirror images in the line y = x. Every point steps across that line to its partner, and the line itself is the mirror. If you know one graph, you know the other.
the point (2, 8) on y = f(x) reflects to (8, 2) on y = f-1(x)
Reflecting swaps the coordinates. It does not change their signs.
That picture also explains which functions have an inverse at all. The graph of f-1 is f turned on its side, so for f-1 to be a function — one output per input — the graph of f must never have two inputs sharing an output. The test is the horizontal line test: if any horizontal line meets the graph of f more than once, f has no inverse function.
x3, 2x - 1 and sqrt(x) pass it. x2, |x| and x2 - 4x do not: a parabola meets almost every horizontal line twice, because a number and its negative square to the same thing.
The repair is to restrict the domain — keep only half the graph, cut at the turning point. For f(x) = (x - 3)2 the vertex is at x = 3, so on the restricted domain x ≥ 3 the curve only rises, the horizontal line test passes, and the inverse exists:
f-1(x) = sqrt(x) + 3
Choosing x ≤ 3 instead keeps the other half and gives f-1(x) = 3 - sqrt(x). Both are honest; the restriction decides which.
The famous pair: exponentials and logarithms
Some inverses have names of their own, and the most useful pair in the whole of mathematics is this one:
the inverse of y = bx is y = log base b of x
That is what a logarithm *is*. "log base 2 of 8" is nothing more than the question "which power of 2 gives 8?", and the answer, 3, is exactly f-1(8) for f(x) = 2x.
The pair runs both ways, which is why they cancel:
the inverse of y = log base b of x is y = bx
Two of them are typed often enough to have short names: ln is the logarithm base e, and log on its own means base 10.
The usual method still applies — swap, then solve — with a logarithm as the tool that frees an exponent:
f(x) = ex + 1 x = ey + 1 (swapped) x - 1 = ey y = ln(x - 1) so f-1(x) = ln(x - 1)
and the other way round:
f(x) = ln(x) - 3 x = ln(y) - 3 (swapped) x + 3 = ln(y) y = ex + 3 so f-1(x) = ex + 3
A root is not a substitute. A root frees the base of a power (the x in x3); a logarithm frees the exponent (the x in 3x). Reaching for the wrong one is the commonest slip in this section.
Worked examples
Example 1
f(x) = -3x + 12. Find f-1(x), and use it to work out f-1(0).
- Write y = -3x + 12, then swap the letters: x = -3y + 12.
- Take the 12 across: x - 12 = -3y.
- Divide by -3: y = (x - 12)/(-3), which tidies to (12 - x)/3.
- So f-1(x) = (12 - x)/3.
- Then f-1(0) = 12/3 = 4, and checking forwards, f(4) = -12 + 12 = 0 as it should.
Example 2
Are f(x) = (x + 5)/2 and g(x) = 2x - 5 inverses of each other?
- Compose one way first: f(g(x)) = ((2x - 5) + 5)/2 = 2x/2 = x.
- Now the other way: g(f(x)) = 2 * (x + 5)/2 - 5 = (x + 5) - 5 = x.
- Both compositions come back to x, so yes, f and g are inverses.
- Sanity check on a number: f(3) = 8/2 = 4, and g(4) = 8 - 5 = 3. The round trip lands where it started.
Example 3
The table gives f(1) = 6, f(2) = -3, f(3) = 0 and f(4) = 9. Work out f-1(0) + f-1(9).
- f-1 asks a backwards question, so each reading is a search in the output column, not the input column.
- The output 0 appears in the row where x = 3, so f-1(0) = 3.
- The output 9 appears in the row where x = 4, so f-1(9) = 4.
- Add the two inputs: f-1(0) + f-1(9) = 3 + 4 = 7.
- Reading the table forwards instead would have given f(0) and f(9), which the table does not even list.
Example 4
f(x) = (x - 4)2 for x ≥ 4. Find f-1(x), and say why the restriction was needed.
- Without a restriction the horizontal line test finds two crossings — (2 - 4)2 and (6 - 4)2 are both 4 — so there is no inverse function.
- The vertex is at x = 4, so the domain x ≥ 4 keeps only the rising half and f is one-to-one on it.
- Now swap: x = (y - 4)2.
- Take the square root. Two branches appear, y - 4 = sqrt(x) and y - 4 = -sqrt(x); the restriction x ≥ 4 says the output of f-1 must be at least 4, so keep the positive one.
- y = sqrt(x) + 4, so f-1(x) = sqrt(x) + 4. On the domain x ≤ 4 the answer would have been 4 - sqrt(x) instead.
Practice problems, with solutions
Three problems of increasing difficulty, each with the full working. In the game these are generated fresh every time; these three are fixed so this page always shows the same ones.
Problem 1
Difficulty 1 of 5f(x) = 3x Work out f-1(21).
Answer: 7
- f-1(21) is the x with f(x) = 21, so solve 3x = 21.
- x = 21 / 3 = 7
- f-1(21) = 7, and checking forwards, f(7) = 21.
Problem 2
Difficulty 3 of 5The table shows some values of a one-to-one function f. Work out f-1(-1).
Answer: 5
- f-1(-1) is the input whose output is -1.
- The f(x) column holds -1 in the row where x = 5.
- So f-1(-1) = 5. Checking forwards, the table gives f(5) = -1.
Problem 3
Difficulty 4 of 5f(x) = 8x + 6 and g(x) = (x - 6)/8. Are f and g inverses of each other?
- no: f(g(x)) = x/8 + 6
- no: f(g(x)) = 64x
- yes: f(g(x)) = x and g(f(x)) = x
- no: f(g(x)) = x + 5
Answer: C. yes: f(g(x)) = x and g(f(x)) = x
- f(g(x)) = 8((x - 6)/8) + 6
- = x - 6 + 6
- = x
- That is x, and composing the other way gives x too, so f and g are inverses.
Common mistakes
- Reading f-1 as one divided by f: writing 1/(2x + 1) instead of (x - 1)/2. The raised -1 is notation for the undo rule, not a power.
- Rearranging without swapping x and y, which produces f written differently rather than the function that reverses it.
- Undoing the operations in the same order f does them, so 5x - 8 comes back as 5(x - 8) instead of (x + 8)/5.
- Letting a shift keep its sign across the swap: writing (x + 8)/5 as the inverse of 5x + 8 when the 8 has to change direction.
- Checking only one composition and declaring a pair inverses, when f(g(x)) = x can hold while g(f(x)) does not.
- Inverting a function that is not one-to-one — writing sqrt(x) as the inverse of x2 with no domain restriction, which quietly throws away every negative input.
- Reflecting a point in y = x by changing the signs instead of swapping the coordinates: (2, 8) becomes (8, 2), not (-2, -8).
- Reading a table forwards when the question asked for f-1: hunting for the value in the x column instead of in the f(x) column.
- Reaching for a root to undo an exponential, as though the inverse of 2x were x1/2. A root frees the base; only a logarithm frees the exponent.
- Stopping before the y terms are gathered and factored when inverting a rational function, so y is left on both sides of the equation.
What you should be able to do
- Find the inverse of a function algebraically by swapping x and y and solving.
- Verify that two functions are inverses by showing f(g(x)) = x and g(f(x)) = x.
- Read values of an inverse from a table or a graph, and reflect a graph in the line y = x.
- Use the horizontal line test, and restrict a domain so that a function has an inverse.
Where this fits in the curriculum
Common Core
- HSF-BF.B.4
High school — Find inverse functions.
- HSF-BF.B.4.A
High school — Solve an equation of the form f(x) = c for a simple function f that has an inverse, and write an expression for the inverse.
- HSF-BF.B.4.B
High school — Verify by composition that one function is the inverse of another.
HSF-BF.B.4.B is a (+) standard — beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II.
- HSF-BF.B.4.C
High school — Read values of an inverse function from a graph or a table, given that the function has an inverse.
HSF-BF.B.4.C is a (+) standard — beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II.
- HSF-BF.B.4.D
High school — Produce an invertible function from a non-invertible function by restricting the domain.
HSF-BF.B.4.D is a (+) standard — beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II.
SAT
- Passport to Advanced Math
Finding and interpreting the inverse of a function, and reading one off a table.