# A question about composition of functions

If $f(x)=g(h(x))$, why is $f^{-1}(x)=h^{-1}(g^{-1}(x))$ ?

-
I am trying to show my calculus class how to use stackexchange. – Jeremy Teitelbaum Sep 2 '12 at 18:51
Do you mean that you intend to answer the question yourself? – Sasha Sep 2 '12 at 18:52
Only if absolutely necessary :) – Jeremy Teitelbaum Sep 2 '12 at 18:52
I suppose that you are talking about pre image (inverse image), not about inverse function! – Sigur Sep 2 '12 at 18:53
If getting dressed means first to put on briefs and then trousers, then getting undressed means to first take off the trousers and then the briefs. – Hagen von Eitzen Sep 2 '12 at 18:54

1. Put on socks
2. Put on shoes

What is the reverse of this operation?

1. Remove shoes
2. Remove socks.

You must undo the operations in the reverse order in which you did them.

Now think about f(g(x)): first apply g to x then f.....

-
Simple! Simple! Simple!. All can undrestand what to do here. – Babak S. Sep 2 '12 at 19:00

What gets done last gets undone first. Thus: $$\begin{array}{c} \text{input} & \mapsto & \text{multiply by }5 & \mapsto& \text{add }2 \\[10pt] x & \mapsto & 5x & \mapsto & 5x+2 = y \end{array}$$ The inverse is: $$\begin{array}{c} \text{input} & \mapsto & \text{subtract }2 & \mapsto & \text{divide by }5 \\[10pt] y & \mapsto & y-2 & \mapsto & \frac{y-2}{5} \end{array}$$

-

By definition, $f^{-1}$ is the function with the following properties: for each $x$ in the domain of $f$, $f^{-1}(f(x))=x$, and for each $x$ in the range of $f$, $f(f^{-1}(x))=x$. In other words, $f^{-1}$ undoes the effects of $f$, and $f$ undoes the effects of $f^{-1}$.

If $f(x)=g(h(x))$, then in order to undo the effects of $f$ you have to undo those of $g$ to get at $h(x)$, and then you have to undo those of $h$ to get at $x$. In other words, you must first apply $g^{-1}$ to $f(x)$, and then you must apply $g^{-1}$ to the result. This is actually easier to follow in symbols than in words:

\begin{align*} h^{-1}\Big(g^{-1}\big(f(x)\big)\Big)&=h^{-1}\left(g^{-1}\Big(g\big(h(x)\big)\Big)\right)\\ &\overset{(*)}=h^{-1}\big(h(x)\big)\\ &=x\;. \end{align*}

The starred step makes use of the fact that $g^{-1}\big(g(u)\big)=u$ no matter what $u$ is, provided that it’s in the domain of $g$.

The calculation showing that $g\left(h\Big(h^{-1}\big(g^{-1}(x)\big)\Big)\right)=x$ is entirely similar.

-

If you take each function as a transformation, $g(h(x))$ means first apply the transformation described by $h(x)$ to $x$, then apply the transformation described by $g(x)$ to the result of that.

Therefore, in order to get the original image from the result of these transformations, we first undo the latest transformation (in this case $g(x)$), and then undo the transformation described by $h(x)$.

Therefore, we have $f^{-1}(x)=h^{-1}(g^{-1}(x))$.

-