Inverse Function: Formula, Rules & Examples

An inverse function reverses the action of another function. If a function f takes an input x and produces an output y, its inverse f⁻¹ takes that output y and returns the original input x.
In symbolic form:
If f(a) = b, then f⁻¹(b) = a
For example, suppose:
f(x) = 2x + 3
This function multiplies an input by 2 and then adds 3. Its inverse must undo those operations in reverse order: subtract 3, then divide by 2.
Therefore:
f⁻¹(x) = (x – 3) / 2
The defining relationship is:
f⁻¹(f(x)) = x
and:
f(f⁻¹(x)) = x
provided the values involved lie in the appropriate domains.
Inverse functions are an important part of algebra because they allow a mathematical relationship to be reversed without changing the underlying input-output correspondence.
What Is an Inverse Function?
An inverse function is a function that undoes another function.
Suppose:
f(4) = 11
If f has an inverse, then:
f⁻¹(11) = 4
The original function sends:
4 → 11
while the inverse sends:
11 → 4
The input and output roles have been exchanged.
Using function notation, this relationship can be expressed generally as:
y = f(x)
and:
x = f⁻¹(y)
An inverse function therefore does not create a new unrelated rule. It reverses the mapping established by the original function.
Inverse Function Formula
There is no single algebraic expression that finds the inverse of every possible function. Instead, an inverse is usually found by reversing the relationship between x and y.
The standard procedure is:
- Write the function as y = f(x).
- Swap x and y.
- Solve the resulting equation for y.
- Rename y as f⁻¹(x).
For example:
f(x) = 3x – 5
Write:
y = 3x – 5
Swap x and y:
x = 3y – 5
Solve for y:
x + 5 = 3y
y = (x + 5) / 3
Therefore:
f⁻¹(x) = (x + 5) / 3
Why Do We Swap x and y?
A function maps inputs to outputs.
If:
y = f(x)
then x is acting as the input and y as the output.
The inverse reverses that mapping, so the former output must become the new input. Swapping x and y represents this reversal algebraically.
For example, if:
f(2) = 9
then the point:
(2, 9)
belongs to f.
The corresponding point on the inverse is:
(9, 2)
This coordinate reversal is why the graphs of a function and its inverse are reflections of each other across the line:
y = x
How to Find an Inverse Function
Consider:
f(x) = 5x + 7
Start by replacing f(x) with y:
y = 5x + 7
Swap x and y:
x = 5y + 7
Subtract 7:
x – 7 = 5y
Divide by 5:
y = (x – 7) / 5
Therefore:
f⁻¹(x) = (x – 7) / 5
The inverse can be checked by composition.
Substitute f(x) into f⁻¹:
f⁻¹(f(x)) = ((5x + 7) – 7) / 5
f⁻¹(f(x)) = 5x / 5
f⁻¹(f(x)) = x
The inverse is correct.
Example 1: Inverse of a Linear Function
Find the inverse of:
f(x) = 4x – 9
Write:
y = 4x – 9
Swap variables:
x = 4y – 9
Add 9:
x + 9 = 4y
Divide by 4:
y = (x + 9) / 4
So:
f⁻¹(x) = (x + 9) / 4
Check:
f⁻¹(f(x)) = ((4x – 9) + 9) / 4
= 4x / 4
= x
Example 2: Inverse of a Function With a Fraction
Suppose:
f(x) = (x + 6) / 3
Write:
y = (x + 6) / 3
Swap x and y:
x = (y + 6) / 3
Multiply by 3:
3x = y + 6
Subtract 6:
y = 3x – 6
Therefore:
f⁻¹(x) = 3x – 6
Notice how the inverse reverses the original operations. The original function adds 6 and divides by 3; the inverse multiplies by 3 and subtracts 6.
Example 3: Inverse of an Affine Function
Find the inverse of:
f(x) = 7 – 2x
Start with:
y = 7 – 2x
Swap:
x = 7 – 2y
Subtract 7:
x – 7 = -2y
Divide by -2:
y = (7 – x) / 2
Therefore:
f⁻¹(x) = (7 – x) / 2
The negative coefficient does not create a problem. Standard algebraic rearrangement is enough.
When Does a Function Have an Inverse?
For an inverse relation to qualify as a function, each output of the original function must correspond to only one input.
Such a function is called one-to-one.
If two different inputs produce the same output, reversing the relationship would cause one inverse input to produce multiple outputs. That would violate the definition of a function.
For example:
f(x) = x²
on all real numbers is not one-to-one because:
f(2) = 4
and:
f(-2) = 4
Reversing these relationships would require 4 to map to both 2 and -2.
Therefore x² does not have an inverse function over its full real domain.
The Horizontal Line Test
A graph can be checked for one-to-one behavior with the horizontal line test.
If every horizontal line intersects the graph at most once, the function is one-to-one and can have an inverse over that domain.
A line such as:
f(x) = 2x + 1
passes the horizontal line test.
A parabola such as:
f(x) = x²
does not pass it over all real numbers because many horizontal lines intersect the graph twice.
This graphical test answers the same fundamental question as the algebraic definition: can each output be traced back to exactly one input?
Restricting a Domain to Create an Inverse
A function that is not one-to-one over its full domain can sometimes become one-to-one after its domain is restricted.
Consider:
f(x) = x²
If the domain is restricted to:
x ≥ 0
then each output has only one permitted input.
Starting with:
y = x²
swap x and y:
x = y²
With y restricted to nonnegative values:
y = √x
Therefore:
f⁻¹(x) = √x
for the appropriately restricted original function.
Conditions such as x ≥ 0 are examples of an inequality being used as a domain restriction rather than merely as an equation-solving exercise.
Domain and Range of an Inverse Function
The domain and range switch when a function is inverted.
If the original function f has:
- domain A
- range B
then f⁻¹ has:
- domain B
- range A
Suppose:
f(x) = 2x + 5
over all real numbers.
Its domain and range are both all real numbers, so its inverse also has all real numbers as its domain and range.
For a restricted function, however, this exchange becomes important.
Suppose:
f(x) = x², x ≥ 0
The original domain is:
[0, ∞)
and the range is:
[0, ∞)
Its inverse:
f⁻¹(x) = √x
has the same numerical domain and range in this particular case.
The endpoint notation used for such restrictions follows the conventions explained under inequalities.
How to Verify Inverse Functions
The strongest algebraic check is composition.
If f and g are inverses, then:
f(g(x)) = x
and:
g(f(x)) = x
on their relevant domains.
Suppose:
f(x) = 3x + 4
and the proposed inverse is:
g(x) = (x – 4) / 3
Check g(f(x)):
g(f(x)) = ((3x + 4) – 4) / 3
= 3x / 3
= x
Now check f(g(x)):
f(g(x)) = 3((x – 4) / 3) + 4
= x – 4 + 4
= x
Therefore g is indeed the inverse of f.
Inverse Function vs Reciprocal
One of the most common notation mistakes is treating:
f⁻¹(x)
as though it means:
1 / f(x)
These expressions are generally different.
Consider:
f(x) = 2x
Its inverse function is:
f⁻¹(x) = x / 2
Its reciprocal is:
1 / f(x) = 1 / (2x)
They are not the same.
The superscript -1 in inverse-function notation means inverse mapping, not a negative exponent applied to the function’s numerical value.
Inverse Function vs Inverse Variation
An inverse function is also different from inverse variation.
An inverse function reverses an input-output mapping:
f(a) = b ⇒ f⁻¹(b) = a
Inverse variation describes a reciprocal relationship between variables, commonly:
y = k / x
The word “inverse” appears in both terms, but the mathematical concepts are distinct.
Inverse Function vs Joint Variation
A joint variation formula describes a quantity varying directly with the product of two or more variables, such as:
z = kxy
Finding an inverse function does not mean identifying a variation constant or changing a direct relationship into a joint one. Instead, it means reversing a one-to-one function’s input-output mapping.
Keeping these concepts separate is especially important when several algebra topics use similar language about relationships between variables.
Finding an Input With an Inverse Function
Inverse functions are useful when an output is known and the original input must be recovered.
Suppose:
f(x) = 5x – 8
and you know:
f(x) = 47
You could solve:
5x – 8 = 47
or use the inverse.
First find:
f⁻¹(x) = (x + 8) / 5
Then:
f⁻¹(47) = (47 + 8) / 5
= 55 / 5
= 11
Therefore the original input was:
x = 11
The inverse turns the output directly back into its corresponding input.
Inverse Functions and Exponential Relationships
Inverse functions become particularly useful when a function contains an exponent.
For example, an exponential function and a logarithmic function can reverse each other’s operations. That relationship allows an unknown exponent to be recovered from a known output.
A similar need can arise when analyzing a geometric series. If the number of terms is unknown, its associated geometric pattern may lead to an exponential equation, and an inverse operation can be used to recover the exponent.
The geometric-series sum itself remains a separate topic; the inverse-function concept explains the broader idea of undoing a function.
Graph of an Inverse Function
The graph of f⁻¹ is the reflection of the graph of f across:
y = x
If a point:
(a, b)
lies on f, then:
(b, a)
lies on f⁻¹.
For example, if:
(2, 7)
is on the original graph, then:
(7, 2)
is on the inverse graph.
Points lying directly on y = x remain unchanged when coordinates are reversed.
A Function Can Be Its Own Inverse
Some functions are self-inverse, meaning:
f⁻¹(x) = f(x)
For example:
f(x) = -x
Apply f twice:
f(f(x)) = -(-x)
= x
Therefore the function undoes itself.
Another example is:
f(x) = 1 / x
for x ≠ 0.
Applying it twice gives:
f(f(x)) = 1 / (1/x)
= x
A self-inverse function has a graph that is symmetric with respect to y = x.
Common Inverse Function Mistakes
Treating f⁻¹(x) as 1/f(x)
An inverse function reverses a mapping. A reciprocal divides 1 by the function value. They are not generally equivalent.
Forgetting to Swap x and y
Simply solving y = f(x) again without exchanging the input and output does not construct the inverse relationship.
Failing to Solve Completely for y
After swapping variables, isolate y before writing f⁻¹(x).
Ignoring Whether the Function Is One-to-One
A relation obtained by swapping x and y may fail to be a function if the original function is not one-to-one.
Ignoring Domain Restrictions
A function such as x² needs a suitable domain restriction before a real inverse function can be defined.
Checking Only One Numerical Example
One successful input-output pair does not prove two functions are inverses. Algebraic composition provides a stronger verification.
Worked Example
Find and verify the inverse of:
f(x) = (2x – 5) / 3
Write:
y = (2x – 5) / 3
Swap x and y:
x = (2y – 5) / 3
Multiply by 3:
3x = 2y – 5
Add 5:
3x + 5 = 2y
Divide by 2:
y = (3x + 5) / 2
Therefore:
f⁻¹(x) = (3x + 5) / 2
Verify:
f⁻¹(f(x)) = (3((2x – 5) / 3) + 5) / 2
Simplify:
= (2x – 5 + 5) / 2
= 2x / 2
= x
The inverse is correct.
Frequently Asked Questions
What is an inverse function?
An inverse function reverses another function’s mapping. If f(a) = b, then f⁻¹(b) = a.
What is the formula for an inverse function?
There is no single formula for every function. A common method is to write y = f(x), swap x and y, solve for y, and then write the result as f⁻¹(x).
How do you know if a function has an inverse?
A function must be one-to-one over the relevant domain. Graphically, it must pass the horizontal line test.
What does f⁻¹(x) mean?
It means the inverse function of f evaluated at x. It does not normally mean 1/f(x).
Why do you swap x and y when finding an inverse?
The original function sends x to y. Its inverse sends that output y back to x, so the input and output roles are exchanged.
How do you check an inverse function?
Verify that:
f(f⁻¹(x)) = x
and:
f⁻¹(f(x)) = x
where both compositions are defined.
Can a quadratic function have an inverse?
A quadratic such as f(x) = x² does not have an inverse function over all real numbers because it is not one-to-one. It can have an inverse after its domain is appropriately restricted.
Do the domain and range change for an inverse function?
Yes. The original function’s range becomes the inverse function’s domain, and the original domain becomes the inverse range.
Is an inverse function the same as inverse variation?
No. An inverse function reverses a mapping. Inverse variation describes a reciprocal relationship such as y = k/x.
Can a function equal its own inverse?
Yes. A self-inverse function satisfies f(f(x)) = x. Examples include f(x) = -x and f(x) = 1/x on the appropriate domains.



