Main content

## Precalculus

### Course: Precalculus > Unit 1

Lesson 5: Verifying inverse functions by composition- Verifying inverse functions from tables
- Using specific values to test for inverses
- Verifying inverse functions by composition
- Verifying inverse functions by composition: not inverse
- Verifying inverse functions by composition
- Verify inverse functions
- Composite and inverse functions: FAQ

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Verifying inverse functions by composition

CCSS.Math: ,

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 parenthesis | g, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis |
---|---|

$\begin{aligned} f(\greenD{g(x)})&=\dfrac{\greenD{g(x)}+1}{3}\\\\&=\dfrac{\greenD{3x-1}+1}{3}\\\\&=\dfrac{3x}{3}\\\\&=x\\\end{aligned}$ | $\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 parenthesis | g, left parenthesis, f, left parenthesis, x, right parenthesis, right parenthesis |
---|---|

$\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$ | $\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.

## Want to join the conversation?

- ARGH! I typed in the exact same answer as the one in the "I need help" paragraph but it won't register?(20 votes)
- It won't work because the fraction is not simplified in 30/4. You have to simplify it into 15/2 and then it will work(34 votes)

- Is there ever a circumstance where f(g(x)) = x but g(f(x)) isn't equal to x?(18 votes)
- Interesting question!

This could occur if f(x) fails to be 1-to-1 (and so fails to be invertible).

For example, if f(x) = x^2 and g(x) = sqrt(x), then f(g(x)) = [sqrt(x)]^2 = x but g(f(x)) = sqrt(x^2) = |x|.

Have a blessed, wonderful day!(36 votes)

- What happens if both simplify down to x+3 or any other values?

Are they still inverse of each other?(6 votes) - i just love math and calculus(4 votes)
- I NEED HELP! I'm working on a problem and have the g(f(x))=2(x+1/2)-1 as a problem I'm just trying to figure it out with the fraction. i stink writing stuff out so if you can understand please help me;((3 votes)
- Your working is wrong bokeum. It will be 2x+2/2 which wil become 2x/2 +2/2 to simplify it. It will become x+1-1 the (-1) from the original question. so it will equal x.(2 votes)

- in 2, how did they get from =4(4/1 x−10)+10 to =x-40+10(2 votes)
- Multiply everything in brackets by 4. 4*x/4 = x 4*-10 = -40

4(x/4 - 10) + 10 = x-40+10. You stated the problem in the wrong form.

It should be 4(x/4 - 10) + 10 instead of 4(4/x - 10) +10(2 votes)

- if i take 2 functions f(x) and g(x) and composite of only one of them results in x , can they be said as inverse functions ?(1 vote)
- For 𝑓 and 𝑔 to be inverse functions, the domain of either function must be equal to the range of the other function.

If 𝑓(𝑎) = 𝑏, but 𝑔(𝑏) ≠ 𝑎,

then 𝑓 maps 𝑎 to 𝑏, but 𝑔 does not map 𝑏 to 𝑎.

This means that the range of 𝑔 is not equal to the domain of 𝑓,

and thereby 𝑓 and 𝑔 are not inverse functions.(3 votes)

- I have a conjecture. Given two functions f and g, f and g are inverses of each other if and only if f and g are invertible and f(g(x)) = x. Can someone help me prove or disprove it?(1 vote)
- To test if 2 functions are inverses, you need to do the test in both directions:

f(g(x)) = x AND g(f(x)) = x(2 votes)

- how do I verify thatf^-1(x)=f(x)(1 vote)
- The inverse function mean that the f(g(x)) multiply g(f(x)) is equal x^2, right? For example, f(x)=2x, g(x)=x/2. f(g(x)) multiply g(f(x)) is x^2.(1 vote)
- No, an inverse function is a function that undoes the affect of an equation. If a coordinate point of one function is (0,4), its inverse is (4,0). So in your case, you have f(x) is the inverse of g(x), and y=2x. In order to undo this and find the inverse, you can switch the x and the y values, and solve for y. 2y=x, and dividing both sides by two, you get x/2. g(x) would be equal to x/2. Does this make sense?(1 vote)