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.

### Course: Class 12 math (India)>Unit 1

Lesson 5: Verifying inverse functions by composition

# 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?
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(x\right)=\frac{x+1}{3}$ and $g\left(x\right)=3x-1$.
Notice how $f\left(5\right)=2$ and $g\left(2\right)=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(f\left(5\right)\right)=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(g\left(x\right)\right)=x$ for all $x$ in the domain of $g$
• $g\left(f\left(x\right)\right)=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(x\right)=\frac{x+1}{3}$ and $g\left(x\right)=3x-1$.
Let's find $f\left(g\left(x\right)\right)$ and $g\left(f\left(x\right)\right)$.
$f\left(g\left(x\right)\right)$$\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}g\left(f\left(x\right)\right)$
$\begin{array}{rl}f\left(g\left(x\right)\right)& =\frac{g\left(x\right)+1}{3}\\ \\ & =\frac{3x-1+1}{3}\\ \\ & =\frac{3x}{3}\\ \\ & =x\end{array}$$\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\begin{array}{rl}g\left(f\left(x\right)\right)& =3\left(f\left(x\right)\right)-1\\ \\ & =3\left(\frac{x+1}{3}\right)-1\\ \\ & =x+1-1\\ \\ & =x\end{array}$
So we see that functions $f$ and $g$ are inverses because $f\left(g\left(x\right)\right)=x$ and $g\left(f\left(x\right)\right)=x$.

### Example 2: Functions $f$‍  and $g$‍  are not inverses

If $f\left(g\left(x\right)\right)$ or $g\left(f\left(x\right)\right)$ is not equal to $x$, then $f$ and $g$ cannot be inverses.
Let's try this for $f\left(x\right)=5x-7$ and $g\left(x\right)=\frac{x}{5}+7$.
$f\left(g\left(x\right)\right)$$\phantom{\rule{2em}{0ex}}g\left(f\left(x\right)\right)$
$\begin{array}{rl}f\left(g\left(x\right)\right)& =5\left(g\left(x\right)\right)-7\\ \\ & =5\left(\frac{x}{5}+7\right)-7\\ \\ & =x+35-7\\ \\ & =x+28\end{array}\phantom{\rule{2em}{0ex}}$$\phantom{\rule{2em}{0ex}}\begin{array}{rl}g\left(f\left(x\right)\right)& =\frac{f\left(x\right)}{5}+7\\ \\ & =\frac{5x-7}{5}+7\\ \\ & =x-\frac{7}{5}+7\\ \\ & =x+\frac{28}{5}\end{array}$
So functions $f$ and $g$ are not inverses because $f\left(g\left(x\right)\right)\ne x$ and $g\left(f\left(x\right)\right)\ne x$.
(Note here, that we could have concluded that $f$ and $g$ were not inverses after showing that $f\left(g\left(x\right)\right)=x+28$.)

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(x\right)=2x+7$‍  and $h\left(x\right)=\frac{x-7}{2}$‍

Write simplified expressions for $f\left(h\left(x\right)\right)$ and $h\left(f\left(x\right)\right)$ in terms of $x$.
$f\left(h\left(x\right)\right)=$
$h\left(f\left(x\right)\right)=$
Are functions $f$ and $h$ inverses?

### 2) $f\left(x\right)=4x+10$‍  and $g\left(x\right)=\frac{1}{4}x-10$‍

Write simplified expressions for $f\left(g\left(x\right)\right)$ and $g\left(f\left(x\right)\right)$ in terms of $x$.
$f\left(g\left(x\right)\right)=$
$g\left(f\left(x\right)\right)=$
Are functions $f$ and $g$ inverses?

### 3) $f\left(x\right)=\frac{2}{3}x-8$‍  and $h\left(x\right)=\frac{3}{2}\left(x+8\right)$‍

Write simplified expressions for $f\left(h\left(x\right)\right)$ and $h\left(f\left(x\right)\right)$ in terms of $x$.
$f\left(h\left(x\right)\right)=$
$h\left(f\left(x\right)\right)=$
Are functions $f$ and $h$ inverses?

## 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?
• 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
• Is there ever a circumstance where f(g(x)) = x but g(f(x)) isn't equal to x?
• 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!
• Is the third question correct?
because im getting x-4 for h(f(x)) no matter how many times i try
• h(f(x)) = (3/2)( f(x) +8) [write function]
h(f(x)) = (3/2)( ((2/3)x-8) +8) [put f(x) in]
h(f(x)) = (3/2)( ((2/3)x) [-8, +8 cancels out]
h(f(x)) = x [here (3/2)*(2/3)=1]

f(h(x)) = (2/3)(h(x))-8 [write function]
f(h(x)) = (2/3)((3/2)(x+8))-8 [put h(x) in]
f(h(x)) = (2/3)((3/2)(x)(8))-8 [expand, noting that the 3/2 applies to the x and the +8]
f(h(x)) = (2/3)(((3/2)x)+12)-8 [the (3/2)8 simplifies to 12 BUT is still enclosed with the 2/3 bracket]
f(h(x) = x+8-8 [here (2/3)*(3/2) is 1, (2/3)12 is 8]
f(h(x) = x [simplify]

h(f(x)) = x
f(h(x)) = x

The two functions are invertible.
The main point I think you have got caught on is the conversion of +8 to 12 due to the 3/2, but then exiting that out of all of the brackets so that it is then not affected by the 2/3, which would result in x+4, instead of x.

Hope this helps :D
• What happens if both simplify down to x+3 or any other values?
Are they still inverse of each other?
• Would the functions still be inverses if their result was equal but not x? For example f(g(x)) = x - 24 and g(f(x)) = x - 24. Would these functions still be inverses of each other?
• No. If you use "x" as the input to either f(g(x)) or g(f(x)), you must get "x" as the final out. To be inverse functions, each must completely reverse the operations performed by the other function. In your case, your final result is different than "x", so some operations is not being reversed.
• Can anyone SHOW me why f(g(x)) = g(f(x)) = x?
• This might be a bit late...
So, the reason why functions are inverses if f(g(x)) = x and g(f(x)) = x is because of the fundamental definition of inverse functions: that is, the input and output values are switched.
So, let's take f(g(x)) = x. What is it saying? It is saying that if you INPUT the output of function g into function f, you get the input of function g as the OUTPUT. To make it more clear: x is the input of g, and g(x) is the output. However, inputting the output of g into f causes f to output x, which is the input of g.
Now, for g(f(x)) = x, it is essentially the same thing. f(x) = output of f and x = input of f. Now, inputting f(x) - the output of f, into g gets you the output x - the input of f.
See, it's just inverse functions in play.
Hope this helped!
• 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;(
• 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.
• can we find f & g such that f(g(x))=x but g(f(x) does not equal x?