If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Verifying inverse functions by composition

Learn how to verify whether two functions are inverses by composing them. For example, are f(x)=5x-7 and g(x)=x/5+7 inverse functions?
This article includes a lot of function composition. If you need a review on this subject, we recommend that you go here before reading this article.
Inverse functions, in the most general sense, are functions that "reverse" each other. For example, if a function takes a to b, then the inverse must take b to a.
Let's take functions f and g for example: f, left parenthesis, x, right parenthesis, equals, start fraction, x, plus, 1, divided by, 3, end fraction and g, left parenthesis, x, right parenthesis, equals, 3, x, minus, 1.
Notice how f, left parenthesis, 5, right parenthesis, equals, 2 and g, left parenthesis, 2, right parenthesis, equals, 5.
Here we see that when we apply f followed by g, we get the original input back. Written as a composition, this is g, left parenthesis, f, left parenthesis, 5, right parenthesis, right parenthesis, equals, 5.
But for two functions to be inverses, we have to show that this happens for all possible inputs regardless of the order in which f and g are applied. This gives rise to the inverse composition rule.

The inverse composition rule

These are the conditions for two functions f and g to be inverses:
  • f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis, equals, x for all x in the domain of g
  • g, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis, equals, x for all x in the domain of f
This is because if f and g are inverses, composing f and g (in either order) creates the function that for every input returns that input. We call this function “the identity function".

Example 1: Functions f and g are inverses

Let's use the inverse composition rule to verify that f and g above are indeed inverse functions.
Recall that f, left parenthesis, x, right parenthesis, equals, start fraction, x, plus, 1, divided by, 3, end fraction and g, left parenthesis, x, right parenthesis, equals, 3, x, minus, 1.
Let's find f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis and g, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis.
f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesisg, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis
f(g(x))=g(x)+13=3x1+13=3x3=x\begin{aligned} f(\greenD{g(x)})&=\dfrac{\greenD{g(x)}+1}{3}\\\\&=\dfrac{\greenD{3x-1}+1}{3}\\\\&=\dfrac{3x}{3}\\\\&=x\\\end{aligned}g(f(x))=3(f(x))1=3(x+13)1=x+11=x\qquad\qquad \begin{aligned}g(\purpleC{f(x)})&=3\left(\purpleC{f(x)}\right)-1\\\\&=3\left(\purpleC{\dfrac{x+1}{3}}\right)-1\\\\&=x+1-1\\\\&=x\\\end{aligned}
So we see that functions f and g are inverses because f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis, equals, x and g, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis, equals, x.

Example 2: Functions f and g are not inverses

If f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis or g, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis is not equal to x, then f and g cannot be inverses.
Let's try this for f, left parenthesis, x, right parenthesis, equals, 5, x, minus, 7 and g, left parenthesis, x, right parenthesis, equals, start fraction, x, divided by, 5, end fraction, plus, 7.
f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesisg, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis
f(g(x))=5(g(x))7=5(x5+7)7=x+357=x+28\begin{aligned} f(\greenD{g(x)})&=5(\greenD{g(x)})-7\\\\&=5\left(\greenD{\dfrac{x}{5}+7}\right)-7\\\\&=x+35-7\\\\&=x+28\end{aligned}\qquad g(f(x))=f(x)5+7=5x75+7=x75+7=x+285\qquad\begin{aligned} g(\purpleC{f(x)})&=\dfrac{\purpleC{f(x)}}{5}+7\\\\&=\dfrac{\purpleC{5x-7}}{5}+7\\\\&=x-\dfrac75+7\\\\&=x+\dfrac{28}{5}\\\end{aligned}
So functions f and g are not inverses because f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis, does not equal, x and g, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis, does not equal, x.
(Note here, that we could have concluded that f and g were not inverses after showing that f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis, equals, x, plus, 28.)

Check your understanding

In general, to check if f and g are inverse functions, we can compose them. If the result is x, the functions are inverses. Otherwise, they are not.

1) f, left parenthesis, x, right parenthesis, equals, 2, x, plus, 7 and h, left parenthesis, x, right parenthesis, equals, start fraction, x, minus, 7, divided by, 2, end fraction

Write simplified expressions for f, left parenthesis, h, left parenthesis, x, right parenthesis, right parenthesis and h, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis in terms of x.
f, left parenthesis, h, left parenthesis, x, right parenthesis, right parenthesis, equals
h, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis, equals
Are functions f and h inverses?
Choose 1 answer:

2) f, left parenthesis, x, right parenthesis, equals, 4, x, plus, 10 and g, left parenthesis, x, right parenthesis, equals, start fraction, 1, divided by, 4, end fraction, x, minus, 10

Write simplified expressions for f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis and g, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis in terms of x.
f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis, equals
g, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis, equals
Are functions f and g inverses?
Choose 1 answer:

3) f, left parenthesis, x, right parenthesis, equals, start fraction, 2, divided by, 3, end fraction, x, minus, 8 and h, left parenthesis, x, right parenthesis, equals, start fraction, 3, divided by, 2, end fraction, left parenthesis, x, plus, 8, right parenthesis

Write simplified expressions for f, left parenthesis, h, left parenthesis, x, right parenthesis, right parenthesis and h, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis in terms of x.
f, left parenthesis, h, left parenthesis, x, right parenthesis, right parenthesis, equals
h, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis, equals
Are functions f and h inverses?
Choose 1 answer:

Want to join the conversation?