How To Calculate An Inverse Function
By The Calcumatix Team Reviewed by Calcumatix Editorial Review 4 min read
Quick Answer
To find the inverse of a function, replace f(x) with y, swap x and y in the equation, then solve the result for y. The final expression, rewritten as f⁻¹(x), is the inverse function. For f(x) = 2x + 4, swapping gives x = 2y + 4, which solves to f⁻¹(x) = (x - 4) / 2.
An inverse function undoes what the original function does. If the original function turns an input into a specific output, its inverse takes that output and returns the original input. This guide walks through the standard algebraic procedure for finding an inverse function: replace the notation, swap the variables, and solve.
Step by step:
- Rewrite f(x) as y.
- Swap every x with y and every y with x in the equation.
- Solve the new equation for y, then rewrite it as f⁻¹(x).
Step One: Replace The Function Notation With Y
Rewrite f(x) as y. This makes the equation easier to manipulate algebraically in the next step, since you are just working with two variables instead of function notation.
Step Two: Swap X And Y In The Equation
Swap every x in the equation with y, and every y with x. This single move reflects the function across the line y = x, which is exactly what an inverse does. The equation is not yet solved after this step, just rearranged.
Step Three: Solve The New Equation For Y
Use standard algebra, adding, subtracting, multiplying, or dividing both sides, to isolate y on one side of the equation. Once y stands alone, that expression is the inverse function. Rewrite it using inverse function notation, f⁻¹(x).
Worked Example: Finding The Inverse Of A Linear Function
Worked example: Original function is f(x) = 2x + 4. Step 1 (replace notation): y = 2x + 4. Step 2 (swap variables): x = 2y + 4. Step 3 (isolate y): x - 4 = 2y, which gives y = (x - 4) / 2.
Final inverse function: f⁻¹(x) = (x - 4) / 2. This inverse undoes the original function’s steps in reverse order.
Use the inverse functions calculator to find the inverse of any function automatically, and see the math calculators hub for related algebra tools.
Worked Example: Finding The Inverse Of A Rational Function
Linear functions are the simplest case. Rational functions (fractions with a variable in the denominator) follow the exact same three steps, but the algebra to isolate y takes an extra move: clearing the fraction before isolating the variable.
Worked example: Original function is f(x) = 3 / (x - 2), where x cannot equal 2. Step 1 (replace notation): y = 3 / (x - 2). Step 2 (swap variables): x = 3 / (y - 2). Step 3 (isolate y): Multiply both sides by (y - 2) to clear the fraction: x(y - 2) = 3. Distribute: xy - 2x = 3. Add 2x to both sides: xy = 3 + 2x. Divide both sides by x: y = (3 + 2x) / x.
Final inverse function: f⁻¹(x) = (3 + 2x) / x, where x cannot equal 0. Note that the domain restriction moves: the original function excluded x = 2, while the inverse excludes x = 0, since the roles of input and output have swapped.
How Do You Verify An Inverse Function Is Correct?
Substitute the inverse function into the original function, f(f⁻¹(x)). If the algebra was done correctly, the result simplifies to exactly x. If it simplifies to anything else, a step was done incorrectly somewhere in the swap-and-solve process. Testing a specific number through both functions in sequence is a fast way to spot-check the result.
How Do Domain And Range Swap Between A Function And Its Inverse?
The domain of the original function becomes the range of the inverse, and the range of the original function becomes the domain of the inverse. This swap happens because inverting a function reverses the roles of input and output.
For the linear example above, f(x) = 2x + 4 has a domain and range of all real numbers, so its inverse does too, and no restriction was needed. For the rational example, f(x) = 3 / (x - 2) excludes x = 2 from its domain (division by zero is undefined), and that value shows up as the excluded value from the range of f. After inverting, that same value, 2, becomes an excluded output of f⁻¹(x), while the excluded input of f⁻¹(x) becomes 0, which was the excluded output of the original f(x). Tracking this swap prevents a common error: applying the original function’s domain restriction to the inverse instead of translating it correctly.
Sources and References
- OpenStax, College Algebra 2e, inverse function definitions and worked examples.
- Khan Academy, Introduction to Inverse Functions
Disclaimer: This guide is for educational and informational purposes only. It provides general mathematical procedures and should not replace formal academic instruction. Consult your textbook or mathematics instructor for specific academic requirements.
Frequently asked questions
What functions do not have an inverse?
A function only has a true inverse if it passes the horizontal line test, meaning no horizontal line crosses its graph more than once. If a horizontal line crosses the graph twice, multiple inputs share one output, and reversing the function would not produce a valid function. The domain must be restricted before an inverse can be found for such a function.
Can you find the inverse of a quadratic function?
Yes, but only after restricting the domain, since a full parabola fails the horizontal line test. Once restricted, the same swap-and-solve procedure applies. The final answer typically includes a square root step, since taking a square root undoes the squaring operation in the original function.
What is the geometric relationship between a function and its inverse?
A function and its inverse are mirror images of each other across the line y = x. Every point (a, b) on the original function corresponds to a point (b, a) on its inverse. Graphing both together makes this reflection visible and offers a quick visual check on a calculated inverse.
Do all trigonometric functions have an inverse?
The basic trig functions (sine, cosine, tangent) fail the horizontal line test over their full domain, since they repeat periodically. Mathematicians restrict their domains to a single cycle to define inverse trig functions like arcsine and arccosine, which are used to find an angle from a known ratio.
What does the -1 in f⁻¹(x) notation mean?
The -1 in f⁻¹(x) is inverse function notation, not an exponent. It does not mean 1/f(x). It specifically denotes the function that reverses f(x), and should only be applied to the final expression once y has been fully isolated in the swap-and-solve procedure.