Inverse functions undo a map—only when it is bijective
The inverse of f is the function that reverses f’s operation, written f⁻¹ when it exists. Existence demands a bijection: every output hit exactly once. For f(x) = 5x − 7, undo by adding 7 and dividing by 5, recovering the input.
Formally, a function f from a set X to a set Y is invertible when some g running back from Y to X satisfies g of f of x equals x for every x and f of g of y equals y for every y. When such a g exists it is unique. The first condition forces f to be one-to-one and the second forces it to cover all of Y, which is why invertibility and bijectivity coincide. The inverse can then be described directly: it sends each y to the single x that f maps onto it. In composition language, the two conditions say that composing in either order gives an identity function, and category theory adopts exactly that as its definition of an inverse morphism.
The superscript notation was introduced by John Herschel in 1813 and fits the habit of writing f to the n for n repeated applications; composing the inverse with f to the n gives f to the n minus 1. It can be confused with a reciprocal, however, since f of x raised to minus one means one over f of x. For that reason inverse trigonometric functions often carry the prefix arc, from Latin arcus, so the inverse of sine is written arcsin, while other inverse special functions sometimes take the prefix inv.
Squaring on all real numbers cannot be undone, because x and minus x give the same square. Restricting the domain to the non-negative reals fixes this, and the resulting inverse is the positive square root function.
Algebraic formulas often yield a formula for the inverse by solving for the input. If y equals the cube of 2x plus 8, taking the cube root, subtracting 8 and halving gives the inverse: the cube root of y, minus 8, all over 2. Not every bijection allows a closed form, and some inverses can only be written as infinite series.
Source: Inverse function