Inverse Functions

The inverse of a function undoes what the function does: it maps each output back to the original input. Inverse functions exist precisely when a function is one-to-one, and their graphs are reflections of each other across the line y = x .

Quick Reference

Concept Formula / Rule
Definition x = f 1 ( y ) y = f ( x )
Domain/range swap Dom ( f ) = Rng ( f 1 ) ; Rng ( f ) = Dom ( f 1 )
Cancellation equations f 1 ( f ( x ) ) = x and f ( f 1 ( x ) ) = x
When an inverse exists If and only if f is one-to-one
Graph reflection Graph of f 1 is the reflection of graph of f across y = x
Warning f 1 ( y ) 1 f ( y )

The Idea of Inversion

Consider f ( x ) = x 3 . Given x = 2 , we get f ( 2 ) = 8 . Now suppose we are told that f ( x ) = 27 and asked to find x . We solve x 3 = 27 , giving x = 27 3 = 3 .

In general, for any y in the range of f , the value of x satisfying y = f ( x ) is given by x = y 3 . This defines x as a function of y , which we call g ( y ) = y 3 . The function g is the inverse of f , since it undoes the effect of f :

g ( f ( x ) ) = x 3 3 = x and f ( g ( y ) ) = ( y 3 ) 3 = y .

Definition

Suppose f is a one-to-one function with domain A and range B . The inverse function f 1 is defined by

x = f 1 ( y ) means y = f ( x )

for every y in B .

Diagram showing the relationship between a function f and its inverse g, reversing the mapping between x and y.
The function f and its inverse f 1 undo the effects of each other.

The domain and range of f and f 1 simply swap:

Dom ( f ) = Rng ( f 1 ) , Rng ( f ) = Dom ( f 1 ) .

Important notation warning: The 1 in f 1 denotes an inverse function, not an exponent. In particular, f 1 ( y ) 1 f ( y ) .

Given that f has an inverse and f ( 1 ) = 3 , f ( 2 ) = 4 , and f ( 5 ) = 1 , find f 1 ( 3 ) , f 1 ( 4 ) , and f 1 ( 1 ) .

Solution By the definition of inverse function: f 1 ( 3 ) = 1 because  f ( 1 ) = 3 , f 1 ( 4 ) = 2 because  f ( 2 ) = 4 , f 1 ( 1 ) = 5 because  f ( 5 ) = 1.
Arrow diagram showing specific points mapping from domain to range via f.
Arrow diagram for f : maps 1 to 3, 2 to −4, 5 to −1.
Arrow diagram showing specific points mapping from range to domain via f⁻¹.
Arrow diagram for f 1 : the mapping is exactly reversed.

Verifying an Inverse Function

Let f be a one-to-one function with domain A and range B , and let g be a function with domain B and range A . Then g = f 1 if and only if both of the following hold:

g ( f ( x ) ) = x for every  x A , f ( g ( y ) ) = y for every  y B .
Proof Suppose g = f 1 . By definition, x = g ( y ) y = f ( x ) . Substituting f ( x ) for y gives x = g ( f ( x ) ) . Substituting g ( y ) for x gives y = f ( g ( y ) ) . Both conditions follow. Conversely, suppose (1) and (2) hold. If x = g ( y ) , then by (2), f ( g ( y ) ) = y , i.e., f ( x ) = y . If y = f ( x ) , then by (1), g ( f ( x ) ) = x , i.e., g ( y ) = x . So x = g ( y ) y = f ( x ) , which is the definition of g = f 1 .

Writing the independent variable of f 1 as x (rather than y ), the cancellation equations become:

f 1 ( f ( x ) ) = x for every  x  in the domain of  f , f ( f 1 ( x ) ) = x for every  x  in the domain of  f 1 .

A function has an inverse function if and only if it is one-to-one. Equivalently, every increasing or decreasing (monotonic) function has an inverse function.

Verify that f ( x ) = 5 x 3 + 2 and g ( x ) = x 2 5 3 are inverses of each other.

Solution Both functions have domain . We verify both cancellation equations: f ( g ( x ) ) = f ( x 2 5 3 ) = 5 ( x 2 5 3 ) 3 + 2 = 5 x 2 5 + 2 = x . g ( f ( x ) ) = g ( 5 x 3 + 2 ) = ( 5 x 3 + 2 ) 2 5 3 = 5 x 3 5 3 = x 3 3 = x .

Determine if each function has an inverse. (a) f ( x ) = x 3 + 1 . (b) h ( x ) = x 3 x .

Solution (a) We show f is one-to-one. If f ( x 1 ) = f ( x 2 ) : x 1 3 + 1 = x 2 3 + 1 x 1 3 = x 2 3 x 1 = x 2 . So f is one-to-one and has an inverse. The graph of f is an upward shift of y = x 3 and passes the horizontal line test.
Graph of y = x³ + 1 which is one-to-one.
f ( x ) = x 3 + 1 passes the horizontal line test.
(b) Note that h ( x ) = x ( x 2 1 ) , so h ( 1 ) = h ( 0 ) = h ( 1 ) = 0 . Three distinct inputs give the same output, so h is not one-to-one and has no inverse.
Graph of y = x³ - x which is not one-to-one.
h ( x ) = x 3 x fails the horizontal line test.

How to Find the Inverse Function

Steps to find f 1 :

  1. Write down the equation y = f ( x ) .
  2. Solve for x in terms of y : x = g ( y ) .
  3. The formula f 1 ( y ) = g ( y ) defines the inverse, with y restricted to the range of f .
  4. If you prefer, replace every y with x to write f 1 ( x ) = g ( x ) .

Given f ( x ) = 2 x 5 + 3 , find its inverse function.

Solution Set y = f ( x ) and solve for x : 2 x 5 + 3 = y 2 x 5 = y 3 x 5 = y 3 2 x = ( y 3 2 ) 1 / 5 . Therefore f 1 ( x ) = ( x 3 2 ) 1 / 5 .

Given g ( x ) = 2 x 1 , find g 1 .

Solution Set y = 2 x 1 and solve: x = y + 1 2 . Replacing y with x : g 1 ( x ) = x + 1 2 . Verification: g ( g 1 ( x ) ) = 2 x + 1 2 1 = x . ✓

Given h ( x ) = 2 x + 3 , find h 1 .

Solution Set y = 2 x + 3 and solve: y 2 = 2 x + 3 , so x = y 2 3 2 . The range of h is [ 0 , ) , so: h 1 ( x ) = x 2 3 2 , x 0.

Given u ( x ) = x 2 + 1 with domain x 0 , find u 1 .

Solution Set y = x 2 + 1 and solve: x = ± y 1 . Since x 0 , we choose x = y 1 . The range is [ 1 , ) : u 1 ( x ) = x 1 , x 1.

Graph of the Inverse Function

If ( a , b ) is a point on the graph of f , then ( b , a ) is on the graph of f 1 . The point ( b , a ) is the reflection of ( a , b ) across the line y = x .

The graphs of a function and its inverse are reflections of one another across the line y = x .

Graph of the polynomial function f(x)=2x⁵ + 3 and its inverse reflected across the line y = x.
(a) f ( x ) = 2 x 5 + 3 and f 1 ( x ) = ( x 3 2 ) 1 / 5 , reflected across y = x .
Graph of the linear function g(x) = 2x - 1 and its inverse reflected across the line y = x.
(b) g ( x ) = 2 x 1 and g 1 ( x ) = x + 1 2 , reflected across y = x .
Graph of the function h(x)=√(2x+3) and its inverse reflected across the line y = x.
(c) h ( x ) = 2 x + 3 and h 1 ( x ) = 1 2 ( x 2 3 ) , x 0 , reflected across y = x .

Given the graph of f ( x ) below, sketch the graph of f 1 ( x ) .

Graph of a function with specific points labeled (2, 4), (3, 2), (4, 1), and (5, 0.5).
Graph of f with points $(2,4)$, $(3,2)$, $(4,1)$, $(5, 0.5)$ labeled.
Solution Reflect across y = x by swapping coordinates: ( 2 , 4 ) ( 4 , 2 ) , ( 3 , 2 ) ( 2 , 3 ) , ( 4 , 1 ) ( 1 , 4 ) , ( 5 , 0.5 ) ( 0.5 , 5 ) .
Solution graph showing the original function and its inverse plotted with reflected points.
The graphs of f and f 1 are reflections of one another across y = x .

Frequently Asked Questions

Is f 1 ( x ) the same as 1 / f ( x ) ? No. The notation f 1 denotes the inverse function, not the reciprocal. For example, if f ( x ) = 2 x + 1 , then f 1 ( x ) = ( x 1 ) / 2 , which is very different from 1 / ( 2 x + 1 ) .

Does every function have an inverse? No. A function has an inverse if and only if it is one-to-one. For instance, f ( x ) = x 2 does not have an inverse on all of because f ( 2 ) = f ( 2 ) = 4 .

What does it mean that f and f 1 are inverses of each other? The relationship is symmetric: if g = f 1 , then g 1 = f . In other words, f and f 1 undo each other in both directions.

Why does the graph of f⁻¹ look like a reflection of f across y = x? Because the roles of x and y are swapped: ( a , b ) is on the graph of f exactly when ( b , a ) is on the graph of f 1 . Swapping coordinates geometrically corresponds to reflecting across the diagonal line y = x .

How does restricting the domain allow us to define an inverse? If a function is not one-to-one on its full domain, we can select a subdomain on which it is one-to-one. For example, u ( x ) = x 2 + 1 restricted to x 0 is strictly decreasing and hence one-to-one, so it has an inverse on that restricted domain.