Method · Graphing
How to Find an Inverse Function: Step by Step
Finding an inverse is running the order of operations backward — the last thing done to x is the first thing undone.
The three-step method
Every algebraic inverse follows the same three steps, in this order.
- Write the function as y = f(x).
- Solve for x — undo each operation applied to x, working from the outside in.
- Swap x and y, so the inverse is named f⁻¹(x) with x as its input again.
The middle step is where the real work happens, and it is exactly the order of operations in reverse: the last operation applied to x when building f(x) is the first one undone when solving for x. What this method finds is, precisely, the function that composes with f to give the identity — check the inverse by confirming that composition of functions, f followed by f⁻¹, really does return x.
A simple linear example, worked in full
- y = 2x + 3write it as y = f(x)
- y − 3 = 2xundo the last operation first: subtract 3
- (y − 3) / 2 = xundo the multiplication: divide by 2
- f⁻¹(x) = (x − 3) / 2swap x and y
The order matters. f(x) was built by multiplying by 2 first, then adding 3 — so undoing it subtracts 3 first, then divides by 2. Doing it in the original order gives a different, wrong function.
Undoing a function inside a function
When x sits inside another operation — a square root, an exponent, a trig function — undo the outside layer first, exactly as if you were peeling operations off one at a time.
- y = √(x + 1)write it as y = f(x)
- y² = x + 1undo the square root: square both sides
- y² − 1 = xundo the addition: subtract 1
- f⁻¹(x) = x² − 1swap x and y
Squaring both sides is the step people distrust, but it is the direct undo of a square root — the two operations cancel by definition.
Exponentials and logarithms undo each other
eˣ and ln x are inverses of each other by definition, so a function built from one is undone with the other.
- y = ex − 5write it as y = f(x)
- y + 5 = exundo the subtraction: add 5
- ln(y + 5) = xundo the exponential: take ln of both sides
- f⁻¹(x) = ln(x + 5)swap x and y
The same pattern works for any base: aˣ is undone by log base a, which is why log base 2 appears when inverting 2ˣ, and natural log appears when inverting eˣ.
When a function cannot be undone this way
The method above needs x to appear exactly once. (x + 1)/(x − 1) has x on both the top and the bottom — there is no single chain of operations to peel back, because undoing the division would need to know which x it is solving for. Finding this kind of inverse means solving an equation for x algebraically, a different and harder problem than undoing a chain of operations.
Remember the domain restriction on x² and trig functions
Squaring both sides, as in the square-root example above, is safe because the original function's own domain (x ≥ −1, so the output was non-negative) already picks out the right branch. But finding the inverse of f(x) = x² directly needs a stated restriction — usually x ≥ 0 — since without it, both x and −x would square to the same value and √x could not tell them apart.
The same care applies to sin, cos and tan: their inverses, arcsin, arccos and arctan, are only true inverses on their usual principal branch, not across every real number.
Checking the result, always
Compose your candidate inverse with the original function and confirm you get x back: f(f⁻¹(x)) should simplify to x. This check requires no new technique — it is direct substitution — and it catches an error in the peeling order immediately, since a wrong inverse essentially never composes back to x by accident.
The calculator on this site runs exactly this check numerically, at several points, before showing any result — and reports 'could not be verified' rather than an unchecked answer if the composition fails.
Before you start: is it even one-to-one?
The method above assumes f is one-to-one — that undoing the operations in reverse will land on a single, unambiguous answer. The horizontal line test is the quick way to check this on a graph: if any horizontal line crosses the curve more than once, the function needs a restricted domain before it has a genuine inverse, the way x² does with x ≥ 0.
Once a candidate inverse exists, one more sanity check costs nothing: the domain and range should have swapped between f and f⁻¹. If f's domain was x ≥ 0, f⁻¹'s range should come out as y ≥ 0 too — and if it does not, an operation was undone with the wrong sign or the wrong sequence.
Questions about how to find an inverse function
What are the steps to find an inverse function?
Write y = f(x), undo each operation applied to x working from the outside in, then swap x and y so the result is named f⁻¹(x).
Why do I undo the operations in reverse order?
Because that is the order they were applied to x. f(x) = 2x + 3 multiplies first, then adds — so finding the inverse subtracts first, then divides, undoing the last operation first.
Why can't I find the inverse of (x+1)/(x-1) this way?
Because x appears twice, so there is no single chain of operations to undo. That kind of function needs solving an equation for x directly, a different technique.
How do I check an inverse function is correct?
Compose it with the original: f(f⁻¹(x)) should simplify back to x. If it does not, an operation was undone in the wrong order or with the wrong operation.