Inverse Function Calculator

An inverse function calculator helps you find the inverse of a mathematical function quickly and accurately. Whether you're working through algebra homework, prepping for a calculus exam, or just need a quick check on your work, this tool takes the guesswork out of the process. Inverse functions essentially "undo" what the original function does. Feed an output back into the inverse, and you get your original input. It's a clean, satisfying relationship once you understand how it works. This page covers everything you need: the formula, step-by-step process, common examples, and where inverse functions actually show up in the real world.

Enter Details

For a linear function f(x) = ax + b.

Result

Enter a and b to find the inverse of f(x) = ax + b.

Supports linear functions of the form f(x) = ax + b (a ≠ 0).

How to Find the Inverse of a Function

Finding the inverse of a function comes down to one core idea: swap the roles of x and y, then solve for y again. That's it. The notation for the inverse of a function f(x) is f⁻¹(x), which is read as "f inverse of x." Be careful not to confuse this with a negative exponent. It's not 1/f(x).

Before you start, it helps to confirm that the function actually has an inverse. A function only has an inverse if it's one-to-one, meaning every output corresponds to exactly one input. You can check this graphically using the horizontal line test: if any horizontal line crosses the graph more than once, the function doesn't have an inverse over its entire domain.

If the function passes the test, you're good to go. Swap x and y, solve for y, and you've got your inverse function. Some functions require restricting the domain first to make them one-to-one before an inverse can exist.

Inverse Function Formula

The formal definition is straightforward. If f is a one-to-one function, then its inverse f⁻¹ satisfies:

  • f(f⁻¹(x)) = x for all x in the domain of f⁻¹
  • f⁻¹(f(x)) = x for all x in the domain of f

In plain terms, applying a function and then its inverse (or vice versa) gets you right back to where you started. This composition property is actually a great way to verify that you've found the correct inverse: plug one into the other and confirm you get x.

For a simple linear function like f(x) = 2x + 3, the inverse is f⁻¹(x) = (x - 3) / 2. You can verify this by computing f(f⁻¹(x)) = 2·((x-3)/2) + 3 = x - 3 + 3 = x. Works perfectly.

Steps to Calculate an Inverse Function

The process follows a consistent pattern no matter how complex the function looks. Here's how to work through it:

  1. Write the function as y = f(x). Replace the f(x) notation with y so it's easier to work with.
  2. Swap x and y. Wherever you see y, write x, and wherever you see x, write y.
  3. Solve for y. Use algebra to isolate y on one side of the equation.
  4. Rename y as f⁻¹(x). This is your inverse function.
  5. Verify by composition. Plug the inverse back into the original and confirm the result is x.

For example, starting with f(x) = 5x - 7: write y = 5x - 7, swap to get x = 5y - 7, solve for y to get y = (x + 7) / 5, and the inverse is f⁻¹(x) = (x + 7) / 5. Plug it back in to double-check.

The trickiest part is usually the algebra in step three. Functions involving fractions, square roots, or multiple terms take a bit more care, but the overall structure of the process stays the same.

Common Functions and Their Inverses

Some inverses come up so often it's worth having them memorized. Here's a quick reference for the most common ones:

Function f(x)Inverse f⁻¹(x)Notes
2x + 3(x - 3) / 2Linear function
√xDomain restricted to x ≥ 0
√xDomain restricted to x ≥ 0
ln(x)Natural log is the inverse of eˣ
ln(x)x > 0 for ln(x)
sin(x)arcsin(x)Domain restricted to [-π/2, π/2]
cos(x)arccos(x)Domain restricted to [0, π]
tan(x)arctan(x)Domain restricted to (-π/2, π/2)

Notice that trig functions need domain restrictions to become one-to-one. That's why your calculator's arcsin function only returns values in a specific range, not every possible angle with that sine value.

Domain and Range of Inverse Functions

Here's one of the most useful properties of inverse functions: the domain and range swap. Whatever was the domain of the original function becomes the range of the inverse, and vice versa.

So if f(x) has a domain of [2, 10] and a range of [0, 4], then f⁻¹(x) has a domain of [0, 4] and a range of [2, 10]. This makes sense once you remember that the inverse swaps x and y, which naturally swaps the input and output sets.

This is especially important when working with restricted domains. Take f(x) = x² restricted to x ≥ 0. Its range is [0, ∞). The inverse is f⁻¹(x) = √x, which has domain [0, ∞) and range [0, ∞). The restrictions have to be consistent for the relationship to hold up.

When you're given a function with a specific domain, always state the domain of the inverse explicitly. Leaving it implied can lead to errors, particularly when dealing with square roots or logarithms where negative inputs aren't allowed.

Graph of a Function and Its Inverse

Visually, the inverse of a function is its reflection across the line y = x. That diagonal line acts like a mirror: every point (a, b) on the original graph corresponds to the point (b, a) on the inverse graph.

This is a handy sanity check. If you've calculated what you think is an inverse, plot both functions and the line y = x. If the two curves are mirror images of each other across that line, you've done it right. If they're not, something went wrong in the algebra.

For example, the graphs of eˣ and ln(x) are perfect reflections of each other across y = x. Same with x² (for x ≥ 0) and √x. This reflection relationship is a direct visual consequence of the x-y swap that defines the inverse.

One practical note: the horizontal line test we mentioned earlier corresponds to checking whether that reflected graph would still be a function (passing the vertical line test). If the original fails the horizontal line test, its reflection would fail the vertical line test, confirming there's no valid inverse without restricting the domain.

Examples of Inverse Function Calculations

Working through a few concrete examples really cements the process. Here are three with different levels of complexity.

Example 1: Linear function
Find the inverse of f(x) = 3x - 9.
Write y = 3x - 9. Swap: x = 3y - 9. Solve: x + 9 = 3y, so y = (x + 9) / 3.
Answer: f⁻¹(x) = (x + 9) / 3

Example 2: Rational function
Find the inverse of f(x) = (2x + 1) / (x - 3), where x ≠ 3.
Write y = (2x + 1) / (x - 3). Swap: x = (2y + 1) / (y - 3). Cross-multiply: x(y - 3) = 2y + 1. Expand: xy - 3x = 2y + 1. Collect y terms: xy - 2y = 3x + 1. Factor: y(x - 2) = 3x + 1. Solve: y = (3x + 1) / (x - 2).
Answer: f⁻¹(x) = (3x + 1) / (x - 2), where x ≠ 2.

Example 3: Function with a square root
Find the inverse of f(x) = √(x - 4), where x ≥ 4.
Write y = √(x - 4). Swap: x = √(y - 4). Square both sides: x² = y - 4. Solve: y = x² + 4.
Answer: f⁻¹(x) = x² + 4, with domain x ≥ 0 (matching the range of the original).

Applications of Inverse Functions

Inverse functions aren't just a math class exercise. They show up in a surprising number of practical contexts.

  • Cryptography: Encryption algorithms apply a function to scramble data. Decryption uses the inverse to recover the original information. Without a well-defined inverse, you'd have no way to decode the message.
  • Engineering and physics: Many formulas are used in both directions. If you have a formula that gives distance as a function of time, the inverse gives you time as a function of distance. Same relationship, different perspective.
  • Logarithms and exponentials: Exponential growth models are common in finance and biology. Logarithms, as the inverse, let you solve for the unknown exponent. For instance, figuring out how long it takes an investment to double requires the inverse (log) of an exponential function.
  • Temperature conversion: Converting Celsius to Fahrenheit uses one formula. Converting Fahrenheit back to Celsius uses its inverse. Simple, but a real-world example of inverse functions in daily life.
  • Statistics: The inverse of the cumulative distribution function is used to find critical values in hypothesis testing, a core part of statistical analysis.

Understanding inverse functions gives you a more complete picture of how mathematical relationships work in both directions. Once you get comfortable with them, a lot of other concepts in math and science start to click into place.

Other Maths Calculators

Explore all