In general, if \(y = f(x)\) is a function, then for each \(x\) in the domain, there is one and only one value of \(y\). The relation obtained by interchanging \(x\) and \(y\) is \(x = f(y)\). If for each \(x\) in the domain, \(y\) is uniquely determined, then this represents a new function, called the inverse function to \(y = f(x)\) and is denoted by \(y = {f^{ - 1}}(x)\).
To obtain the inverse function \(y = {f^{ - 1}}(x)\) from \(y = f(x)\), \(x\) and \(y\) are interchanged and consequently, so are the domains and ranges.
The domain of \(y = {f^{ - 1}}(x)\) is the range of \(y = f(x)\) and the range of \(y = {f^{ - 1}}(x)\) is the domain of \(y = f(x)\).
An example is: \(y = f(x) = 2x + 1\), by interchanging the \(x\) with \(y\) we have \(x = 2y + 1\) and then make \(y\) the subject \(y = {f^{ - 1}}(x) = \dfrac{{x - 1}}{2}\) is its inverse.
A more complex example is \(y = f(x) = {x^2}\) for \(x \ge 0\) here \(x = {y^2} \to y = \pm \sqrt x \)
Remember the domain of \(y = f(x)\) is the range of the inverse hence \({f^{ - 1}}(x) = \sqrt x \).