Inverse Function Calculator

Solve y = f(x) for x step by step, check one-to-one, and see the reflection across y = x.

Inverse Function Calculator

What Is an Inverse Function?

The inverse of a function f, written f⁻¹, runs f backwards: if f sends 4 to 11, then f⁻¹ sends 11 back to 4. Formally, f⁻¹(f(x)) = x and f(f⁻¹(x)) = x, each function undoes the other completely. Conversion functions come in such pairs (Celsius↔Fahrenheit), as do encode/decode, encrypt/decrypt, and every "solve for the input given the output" question in science.

Not every function has an inverse. Reversal requires that no output be produced by two different inputs, f must be one-to-one (injective), which the horizontal line test checks graphically: no horizontal line may cross the graph twice. x² fails (both 2 and −2 map to 4: which should 4 map back to?); x³ passes. Monotonic functions, always increasing or always decreasing, pass automatically, which is why calculus's derivative test (f′ never changes sign) is the practical certificate of invertibility.

How to Use This Calculator

Enter f(x). The tool first runs a numeric horizontal-line check on [−6, 6], reporting whether f is one-to-one there. Then it attempts the symbolic algorithm, solve y = f(x) for x by peeling operations off layer by layer, then swap variables, and prints each undo step. When the algebra is beyond it (or x appears in multiple places), it still delivers the geometric truth: the graph of f reflected across the line y = x, which is the inverse relation. The plot always shows all three: f in indigo, f⁻¹ in red, and the dashed mirror line y = x between them.

Worked Example

Find the inverse of f(x) = 2x + 3. Write y = 2x + 3 and solve for x: subtract 3 (y − 3 = 2x), divide by 2 (x = (y − 3)/2), then swap the variable names:

f⁻¹(x) = (x − 3)/2

The undo order is the algebra's point: f multiplies then adds; f⁻¹ subtracts then divides, reverse operations in reverse order, like unwrapping a package. Verify by composition: f⁻¹(f(x)) = ((2x + 3) − 3)/2 = x ✓. The second chip stacks more layers: y = x³ − 2 undoes as add 2, then cube-root, f⁻¹(x) = (x + 2)^(1/3), while for rational functions like (x − 1)/(x + 2), the manual trick is cross-multiplying to y(x + 2) = x − 1 and collecting the x terms, yielding f⁻¹(x) = (−2x − 1)/(x − 1).

The Reflection Picture

Graphically, f⁻¹ is f reflected across the line y = x, because inverting swaps the roles of input and output, i.e. swaps the axes. Every point (a, b) on f becomes (b, a) on f⁻¹. The picture carries real information: domains and ranges swap (the range of f is the domain of f⁻¹), intersections of f with the line y = x are fixed points shared by both, and slopes invert reciprocally, if f passes through (a, b) with slope m, then f⁻¹ passes through (b, a) with slope 1/m. That last fact is the inverse function theorem of calculus, (f⁻¹)′(b) = 1/f′(a), and it's how the derivatives of ln, arcsin, and arctan are derived from those of exp, sin, and tan.

Common Mistakes to Avoid

  • Reading f⁻¹ as 1/f. The superscript is function inverse, not reciprocal: sin⁻¹(x) = arcsin(x) ≠ 1/sin(x) = csc(x). This notation collision causes genuine errors well beyond precalculus.
  • Inverting a non-one-to-one function without restricting. x² has no inverse on ℝ; restricted to x ≥ 0 its inverse is √x. Every "inverse trig" function is exactly such a restriction (arcsin inverts sin only on [−π/2, π/2]), the restriction is part of the definition, not a footnote.
  • Swapping variables before solving. The algorithm is solve-then-swap (or swap-then-solve, but pick one); mixing them mid-computation produces formulas that pass no checks. Always finish with the composition test f(f⁻¹(x)) = x.
  • Forgetting domains swap. f(x) = eˣ has range (0, ∞), so f⁻¹ = ln x has domain (0, ∞). Quoting an inverse without its (swapped) domain invites evaluating it where it doesn't exist.

Real-World Applications

Inverse functions answer "what input produced this output?", half of applied mathematics. Exponential growth forward, logarithm backward: carbon dating inverts decay to get age; pH inverts hydrogen concentration; the Richter and decibel scales invert energy to readable numbers. Finance inverts compound growth to get the rate (yield) or the time (doubling); medicine inverts dose-response curves to find the dose achieving a target effect (ED₅₀).

Engineering leans on inverses computationally: sensor calibration curves are inverted so raw voltage reads out as temperature or pressure; robotics' inverse kinematics inverts the joint-angles→position map to aim an arm; and cryptography's entire premise is functions easy to compute forward, infeasible to invert without the key. When the symbolic inverse is unavailable (as this calculator sometimes reports), practitioners invert numerically, Newton's method solving f(x) = y for x is the standard machine, which is literally "inverse function, evaluated on demand."

Frequently Asked Questions

How do I check that two functions are inverses?

Compose both ways: f(g(x)) = x AND g(f(x)) = x, on the appropriate domains. One direction alone can mislead when domains are restricted, the pair (x², √x) satisfies √(x²) = |x| ≠ x on negatives. The composite calculator automates the check.

Why does the calculator sometimes give only the reflection, not a formula?

Because some inverses have no elementary formula: y = x + eˣ is strictly increasing (inverse exists!) but solving for x is impossible in elementary terms. Existence and expressibility are different questions, the reflection shows the inverse that algebra can't write down.

What are the fixed points on the line y = x?

Points where f(x) = x, unchanged by the function, there, f and f⁻¹ intersect each other and the mirror line. (Caution: f and f⁻¹ can also cross off the line when f is decreasing, try f(x) = −x³, where the graphs coincide entirely.)

How does restricting a domain create an inverse?

Cut the graph down to a piece that passes the horizontal line test, usually between turning points found via critical points. x² restricted to [0, ∞) gives √x; sin restricted to [−π/2, π/2] gives arcsin. The art is choosing the branch your application actually uses.

What is the derivative of an inverse function?

(f⁻¹)′(y) = 1/f′(x) where y = f(x): slopes at mirrored points are reciprocals. It's how d/dx ln x = 1/x falls out of (eˣ)′ = eˣ in one line, and it fails exactly where f′ = 0, horizontal tangents on f become vertical tangents on f⁻¹.

Is the inverse of an odd/even function odd/even?

Invertible odd functions have odd inverses (∛x inverts x³, both odd). Even functions are never invertible on a symmetric domain, evenness f(−x) = f(x) is a maximal violation of one-to-one, requiring a half-domain restriction before any inverse exists.