What is an inverse function?

In mathematics, the inverse function is a function that undoes another function. For example,  given the function f(x) = 2x. If you input a into the function f, the output is 2a. The inverse function of  f(x)