An inverse function reverses the action of a given function so that outputs are returned to their original inputs. If a function f maps x to y, written f(x)=y, an inverse function g undoes that mapping so g(y)=x. When both compositions satisfy g(f(x))=x and f(g(y))=y for all values in the appropriate domains, g is written f^{-1}. This concept is central to algebra and analysis because it expresses when a process can be reversed without loss of information.

Definition, notation and basic facts

Formally, an inverse of f: A\to B is a function g: B\to A such that g(f(x))=x for every x in A and f(g(y))=y for every y in B. The common notation f^{-1} denotes the inverse function, not the reciprocal 1/f. If only one of the compositions equals the identity, the map is called a left or right inverse accordingly. The inverse is unique when it exists. For background on the underlying idea of mapping between sets see function.

When an inverse exists

Existence of an inverse is tied to injectivity and surjectivity. A function that is both one-to-one (injective) and onto (surjective) — collectively called bijective — has a two-sided inverse defined on the whole codomain. If a function is injective but not onto, it has a left-inverse defined on the image; if surjective but not injective, it can have a right-inverse but not a true two-sided inverse. The inverse relation (swap of ordered pairs) may still be defined even when no function inverse exists because of multiple preimages.

How to find an inverse: common techniques and examples

  • Algebraic method: replace f(x) by y, solve y for x, then swap x and y to obtain f^{-1}(x). For example, f(x)=ax+b (a\neq0) gives f^{-1}(x)=(x-b)/a.
  • Restrict the domain: some maps like f(x)=x^{2} are not invertible on the whole real line but become invertible when the domain is restricted (e.g., x\ge0) giving f^{-1}(x)=\sqrt{x} on the image.
  • Transcendental inverses: exponentials and logarithms are inverses (exp and log) on their natural domains; trigonometric functions require principal branches for single-valued inverses, producing arcsin, arctan, etc.
  • Use composition and tables: for commonly used functions, memorize pairs (e^{x}, \ln x), (\sin x, \arcsin x) with their domain restrictions.

Examples illustrate restrictions and notation; see further reading on related function properties at function inverses.

Graphical and differential properties

Graphically, the inverse of a function is obtained by reflecting its graph across the line y=x. Points (a,b) on the graph of f correspond to (b,a) on the graph of f^{-1}. In calculus, the inverse function theorem gives a derivative formula when f is differentiable with nonzero derivative at a point: (f^{-1})'(y)=1/f'(x) where y=f(x). This relation requires f to be locally invertible and f' nonzero at the point of interest.