# inverse of composition of functions

###### Theorem.

Let $f$ and $g$ be invertible functions such that their composition^{} $f\mathrm{\circ}g$ is well defined. Then $f\mathrm{\circ}g$ is invertible and

$${(f\circ g)}^{-1}={g}^{-1}\circ {f}^{-1}.$$ |

Before proving this theorem, it should be noted that some students encounter this result long before they are introduced to formal proof. Fortunately, there is an intuitive way to think about this theorem: Think of the function $g$ as putting on one’s socks and the function $f$ as putting on one’s shoes. Then $f\circ g$ denotes the process of putting one one’s socks, then putting on one’s shoes. (Recall that function composition works from right to left.) Note that ${(f\circ g)}^{-1}$ refers to the reverse process of $f\circ g$, which is taking off one’s shoes (which is ${f}^{-1}$) followed by taking off one’s socks (which is ${g}^{-1}$).

Due to the intuitive argument given above, the theorem is referred to as the *socks and shoes rule*. This name is a mnemonic device which reminds people that, in order to obtain the inverse^{} of a composition of functions, the original functions have to be undone in the opposite order.

Now for the formal proof.

###### Proof.

Let $A$, $B$, and $C$ be sets such that $g:A\to B$ and $f:B\to C$. Then the following two equations must be shown to hold:

$({g}^{-1}\circ {f}^{-1})\circ (f\circ g)={\text{id}}_{A}$ | (1) |

$(f\circ g)\circ ({g}^{-1}\circ {f}^{-1})={\text{id}}_{C}$ | (2) |

Note that ${\text{id}}_{X}$ denotes the identity function on the set $X$.

The two equations given above follow easily from the fact that function composition is associative.

$({g}^{-1}\circ {f}^{-1})\circ (f\circ g)$ | $={g}^{-1}\circ (({f}^{-1}\circ f)\circ g)$ | ||

$={g}^{-1}\circ ({\text{id}}_{B}\circ g)$ | |||

$={g}^{-1}\circ g$ | |||

$={\text{id}}_{A}$ |

$(f\circ g)\circ ({g}^{-1}\circ {f}^{-1})$ | $=f\circ ((g\circ {g}^{-1})\circ {f}^{-1})$ | ||

$=f\circ ({\text{id}}_{B}\circ {f}^{-1})$ | |||

$=f\circ {f}^{-1}$ | |||

$={\text{id}}_{C}\mathit{\u220e}$ |

The socks and shoes rule has a natural generalization^{}:

###### Corollary.

Let $n$ be a positive integer and ${f}_{\mathrm{1}}\mathrm{,}\mathrm{\dots}\mathrm{,}{f}_{n}$ be invertible functions such that their composition ${f}_{\mathrm{1}}\mathrm{\circ}\mathrm{\dots}\mathrm{\circ}{f}_{n}$ is well defined. Then ${f}_{\mathrm{1}}\mathrm{\circ}\mathrm{\dots}\mathrm{\circ}{f}_{n}$ is invertible and

$${({f}_{1}\circ \mathrm{\dots}\circ {f}_{n})}^{-1}=f_{n}{}^{-1}\circ \mathrm{\dots}\circ f_{1}{}^{-1}.$$ |

A sketch of a proof is as follows: Using induction^{} on $n$, the socks and shoes rule can be applied with $f={f}_{1}\circ \mathrm{\dots}\circ {f}_{n-1}$ and $g={f}_{n}$.

Title | inverse of composition of functions |
---|---|

Canonical name | InverseOfCompositionOfFunctions |

Date of creation | 2013-03-22 17:47:47 |

Last modified on | 2013-03-22 17:47:47 |

Owner | Wkbj79 (1863) |

Last modified by | Wkbj79 (1863) |

Numerical id | 8 |

Author | Wkbj79 (1863) |

Entry type | Theorem |

Classification | msc 03-00 |

Classification | msc 03E20 |

Classification | msc 97D40 |

Synonym | socks and shoes rule |

Related topic | Function |

Related topic | InverseFormingInProportionToGroupOperation |