when does a function have an inverse function
Inverse function Not all functions have inverse functions. In order for a function f: X → Y to have an inverse,[nb 1] it must have the property that for every y in Y there must be one, and only one x in X so that f(x) = y. This property ensures that a function g: Y → X will exist having the necessary relationship with f.
Return statement In computer programming, a return statement causes execution to leave the current subroutine and resume at the point in the code immediately after where the subroutine was called, known as its return address. The return address is saved, usually on the process's call stack, as part of the operation of making the subroutine call. Return statements in many languages allow a function to specify a return value to be passed back to the code that called the function.