ƒ

Inverse Function Calculator

f⁻¹(x) · Step-by-Step · Domain & Range · Graph

Find the inverse f⁻¹(x) of linear, power, quadratic, rational, exponential, logarithmic, and square root functions with full derivation, domain/range, and graph.

Quick Examples

What Is an Inverse Function?

An inverse function f⁻¹(x) is a function that "undoes" the action of f(x). If f maps an input a to an output b — that is, f(a) = b — then f⁻¹ maps b back to a: f⁻¹(b) = a. The two functions satisfy the composition identities:

f(f⁻¹(x)) = x for all x in the domain of f⁻¹ f⁻¹(f(x)) = x for all x in the domain of f

Inverse functions are fundamental across mathematics, science, and engineering. The relationship between exponentiation and logarithms, squaring and square roots, and encoding and decoding all rely on the concept of function inversion.

The Horizontal Line Test

A function f(x) has an inverse over its entire domain if and only if it is one-to-one (injective) — meaning each output value corresponds to exactly one input. The horizontal line test provides a graphical check: draw any horizontal line across the graph. If every horizontal line intersects the graph at most once, f is one-to-one and its inverse exists globally.

When a function fails the horizontal line test — such as f(x) = x² over all real numbers — an inverse still exists after restricting the domain. For instance, f(x) = x² on x ≥ 0 gives the well-defined inverse f⁻¹(x) = √x.

How to Find the Inverse Algebraically

The standard algebraic technique for finding inverses follows four steps:

  • Step 1: Replace f(x) with y.
  • Step 2: Swap x and y in the equation.
  • Step 3: Solve the resulting equation for y.
  • Step 4: Write f⁻¹(x) = (the solved expression).

For example, with f(x) = 2x + 3: write y = 2x + 3, swap to get x = 2y + 3, solve to get y = (x − 3)/2, so f⁻¹(x) = (x − 3)/2.

Domain Restrictions and Range

One critical rule: the domain of f equals the range of f⁻¹, and the range of f equals the domain of f⁻¹. Domain restrictions arise naturally when the function is only one-to-one on part of its domain.

f(x)f⁻¹(x)Domain of fDomain of f⁻¹
2x + 3(x−3)/2All realsAll reals
x² (x≥0)√x[0, ∞)[0, ∞)
ln(x)All reals(0, ∞)
log₂(x)(0, ∞)All reals
√(x−1)x²+1 (x≥0)[1, ∞)[0, ∞)

Real-World Applications

Inverse functions appear throughout applied mathematics and computing:

  • Temperature conversion: F = (9/5)C + 32 and its inverse C = (5/9)(F − 32) are linear inverses used daily.
  • Cryptography and data encoding: Encryption and decryption operations (such as RSA exponentiation and its modular inverse) rely on function inversion.
  • Logarithm/exponential pairs: Compound interest uses A = Pe^(rt); solving for t requires the inverse: t = ln(A/P) / r.
  • Signal processing: The inverse Fourier transform inverts the Fourier transform, recovering a signal from its frequency spectrum.
  • Physics: Snell's law gives the refraction angle from incident angle via arcsin — the inverse of sin.

The Inverse Function Theorem (Calculus)

In calculus, the inverse function theorem states that if f is differentiable at a and f'(a) ≠ 0, then f⁻¹ is differentiable at b = f(a) and:

(f⁻¹)'(b) = 1 / f'(a) where b = f(a)

This elegant reciprocal relationship is used to differentiate inverse trigonometric functions (arcsin, arccos, arctan), inverse hyperbolic functions, and complex logarithms — all without needing to solve explicitly for the inverse expression. For example, since d/dx[sin x] = cos x, the derivative of arcsin at a point y is 1/cos(arcsin(y)) = 1/√(1−y²).

Graph Reflection Across y = x

A fundamental geometric fact: the graph of f⁻¹(x) is always the reflection of the graph of f(x) across the line y = x. This is because swapping x and y in the equation geometrically reflects every point (a, b) on f to the point (b, a) on f⁻¹. The line y = x is equidistant from (a, b) and (b, a), making it the exact mirror line. The interactive graph on this page plots both f and f⁻¹ together with the y = x line so you can see this symmetry directly.

Frequently Asked Questions

What is an inverse function?
An inverse function f⁻¹(x) reverses the mapping of f(x). If f maps input a to output b, then f⁻¹ maps b back to a. Formally, f⁻¹(f(x)) = x for all x in the domain of f, and f(f⁻¹(x)) = x for all x in the domain of f⁻¹. Inverse functions only exist for one-to-one (injective) functions.
How do you find the inverse of a function algebraically?
To find the inverse algebraically: (1) Write y = f(x). (2) Swap x and y to get x = f(y). (3) Solve for y in terms of x. (4) Write f⁻¹(x) = (the expression for y). This technique works for linear, rational, power, and square root functions. For exponential functions y = aˣ, swapping gives x = aʸ and solving gives y = log_a(x).
What is the horizontal line test?
The horizontal line test determines whether a function has an inverse. If every horizontal line intersects the graph of f(x) at most once, then f is one-to-one and its inverse exists. If any horizontal line crosses the graph more than once, the function is not one-to-one over its full domain and an inverse only exists after restricting the domain.
Why does the graph of f⁻¹(x) reflect across y = x?
Because swapping x and y geometrically reflects a point (a, b) to (b, a). The line of reflection for points (a, b) and (b, a) is always y = x. So the entire graph of f⁻¹(x) is the mirror image of f(x) across the line y = x. This is why plotting both functions and the line y = x visually confirms the inverse relationship.
What is the domain of an inverse function?
The domain of f⁻¹(x) equals the range of f(x), and the range of f⁻¹(x) equals the domain of f(x). This is because the inverse swaps inputs and outputs. For example, if f(x) = x² on x ≥ 0 has domain [0, ∞) and range [0, ∞), then f⁻¹(x) = √x also has domain [0, ∞) and range [0, ∞).
What is the inverse function theorem in calculus?
The inverse function theorem states that if f is differentiable at a point a and f'(a) ≠ 0, then f⁻¹ is differentiable at f(a) and (f⁻¹)'(f(a)) = 1 / f'(a). Equivalently, if y = f(x), then dy/dx = 1 / (dx/dy). This is used to differentiate inverse trigonometric and inverse hyperbolic functions without explicitly solving for them.
Do all functions have inverses?
No. Only one-to-one (injective) functions have inverses defined over their full domain. A function is one-to-one if each output value corresponds to exactly one input value. Functions like f(x) = x² (full real line) or f(x) = sin(x) are not one-to-one globally, but they have inverses on restricted domains — for example, f⁻¹(x) = √x on x ≥ 0, or arcsin(x) on [−π/2, π/2].