In mathematics, if ƒ is a function from a set A to a set B, then an inverse function for ƒ is a function from B to A, with the property that a round trip (a composition) from A to B to A (or from B to A to B) returns each element of the initial set to itself. Thus, if an input x into the function ƒ produces an output y, then inputting y into the inverse function produces the output x, and vice versa.
A function ƒ that has an inverse is called invertible; the inverse function is then uniquely determined by ƒ and is denoted by ƒ−1 (read f inverse, not to be confused with exponentiation).
Let ƒ be a function whose domain is the set X, and whose codomain is the set Y. Then, if it exists, the inverse of ƒ is the function ƒ−1 with domain Y and codomain X, with the property:
Stated otherwise, a function is invertible if and only if its inverse relation is a function, in which case the inverse relation is the inverse function.