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(x)=x+13 and g(x)=3x1.
Notice how f(5)=2 and g(2)=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(f(5))=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(g(x))=x for all x in the domain of g
  • g(f(x))=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(x)=x+13 and g(x)=3x1.
Let's find f(g(x)) and g(f(x)).
f(g(x))g(f(x))
f(g(x))=g(x)+13=3x1+13=3x3=xg(f(x))=3(f(x))1=3(x+13)1=x+11=x
So we see that functions f and g are inverses because f(g(x))=x and g(f(x))=x.

Example 2: Functions f and g are not inverses

If f(g(x)) or g(f(x)) is not equal to x, then f and g cannot be inverses.
Let's try this for f(x)=5x7 and g(x)=x5+7.
f(g(x))g(f(x))
f(g(x))=5(g(x))7=5(x5+7)7=x+357=x+28g(f(x))=f(x)5+7=5x75+7=x75+7=x+285
So functions f and g are not inverses because f(g(x))x and g(f(x))x.
(Note here, that we could have concluded that f and g were not inverses after showing that f(g(x))=x+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(x)=2x+7 and h(x)=x72

Write simplified expressions for f(h(x)) and h(f(x)) in terms of x.
f(h(x))=
h(f(x))=
Are functions f and h inverses?
Choose 1 answer:

2) f(x)=4x+10 and g(x)=14x10

Write simplified expressions for f(g(x)) and g(f(x)) in terms of x.
f(g(x))=
g(f(x))=
Are functions f and g inverses?
Choose 1 answer:

3) f(x)=23x8 and h(x)=32(x+8)

Write simplified expressions for f(h(x)) and h(f(x)) in terms of x.
f(h(x))=
h(f(x))=
Are functions f and h inverses?
Choose 1 answer:

Want to join the conversation?