# Inverse Functions

Suppose *f* : *A* → *B* is a function whose domain is the set *A* and whose codomain is the set *B*. The function *f* is called invertible if there exists a function *f*^{ −1} : *B* → *A* with the domain *B* and the codomain *A* such that

where *x* ∈ *A*, *y* ∈ *B*.

The function *f*^{ −1} is then called the inverse of *f*.

Not all functions have an inverse. If a function *f* is not injective, different elements in its domain may have the same image:

In this case, the converse relation \({f^{-1}}\) is not a function because there are two preimages \({x_1}\) and \({x_2}\) for the element \({y_1}\) in the codomain \(B.\) So, to have an inverse, the function must be injective.

If a function \(f\) is not surjective, not all elements in the codomain have a preimage in the domain. In this case, the converse relation \({f^{-1}}\) is also not a function.

Thus, to have an inverse, the function must be surjective.

Recall that a function which is both injective and surjective is called bijective. Hence, to have an inverse, a function \(f\) must be bijective. The converse is also true. If \(f : A \to B\) is bijective, then it has an inverse function \({f^{-1}}.\)