Mathwords logoMathwords

Inverse of a Function — Definition, Formula & Examples

The inverse of a function is a new function that reverses the original, swapping every input-output pair so that if f(a)=bf(a) = b, then f1(b)=af^{-1}(b) = a. In other words, applying a function and then its inverse (or vice versa) returns you to the value you started with.

Given a one-to-one function f:ABf: A \to B, the inverse function f1:BAf^{-1}: B \to A is the unique function satisfying f1(f(x))=xf^{-1}(f(x)) = x for all xAx \in A and f(f1(y))=yf(f^{-1}(y)) = y for all yBy \in B. A function possesses an inverse if and only if it is bijective (both one-to-one and onto).

Key Formula

f1(f(x))=xandf(f1(x))=xf^{-1}(f(x)) = x \quad \text{and} \quad f(f^{-1}(x)) = x
Where:
  • ff = The original function
  • f1f^{-1} = The inverse function (not a reciprocal)
  • xx = Any value in the appropriate domain

How It Works

To find the inverse of a function algebraically, start by replacing f(x)f(x) with yy. Then swap xx and yy in the equation, and solve for yy. The result is f1(x)f^{-1}(x). Graphically, the inverse is the reflection of the original function across the line y=xy = x. Before finding an inverse, check that the function is one-to-one — meaning it passes the horizontal line test — because only one-to-one functions have inverses that are also functions.

Worked Example

Problem: Find the inverse of f(x)=3x+6f(x) = 3x + 6.
Step 1: Replace f(x)f(x) with yy.
y=3x+6y = 3x + 6
Step 2: Swap xx and yy.
x=3y+6x = 3y + 6
Step 3: Solve for yy: subtract 6 from both sides, then divide by 3.
y=x63y = \frac{x - 6}{3}
Step 4: Write the result using inverse notation.
f1(x)=x63f^{-1}(x) = \frac{x - 6}{3}
Answer: f1(x)=x63f^{-1}(x) = \dfrac{x - 6}{3}. You can verify: f(f1(x))=3 ⁣(x63)+6=xf(f^{-1}(x)) = 3\!\left(\dfrac{x-6}{3}\right) + 6 = x.

Another Example

Problem: Find the inverse of g(x)=x2+1g(x) = x^2 + 1 for x0x \geq 0.
Step 1: Replace g(x)g(x) with yy.
y=x2+1y = x^2 + 1
Step 2: Swap xx and yy.
x=y2+1x = y^2 + 1
Step 3: Solve for yy: subtract 1 and take the square root. Since the domain was restricted to x0x \geq 0, choose the positive root.
y=x1y = \sqrt{x - 1}
Answer: g1(x)=x1g^{-1}(x) = \sqrt{x - 1}, with domain x1x \geq 1. Notice the domain restriction on gg was essential — without it, gg would not be one-to-one.

Visualization

Why It Matters

Inverse functions are central to Algebra 2 and Precalculus, where you use them to solve equations by "undoing" operations — logarithms undo exponentials, and arcsine undoes sine. In fields like cryptography and computer science, invertible functions are the backbone of encoding and decoding data. Understanding inverses also prepares you for calculus topics such as the inverse function theorem and implicit differentiation.

Common Mistakes

Mistake: Confusing f1(x)f^{-1}(x) with 1f(x)\dfrac{1}{f(x)}.
Correction: The notation f1f^{-1} means the inverse function, not the reciprocal. The reciprocal would be written (f(x))1(f(x))^{-1} or 1f(x)\dfrac{1}{f(x)}.
Mistake: Forgetting to swap xx and yy before solving.
Correction: If you skip the swap and just solve the original equation for xx, you get the right algebraic expression but with the wrong variable names. Always swap first, then solve for yy.

Related Terms