Relations and functions · Definition
Composition and inverse
Before you start you need to know
Composing functions chains transformations between sets, and the inverse sends each element back to its origin. Both ideas underpin much of the work with functions.
Definition
The composition \(g\circ f\) applies \(f\) first and then \(g\). The inverse \(f^{-1}\) exists when \(f\) is bijective and undoes its action.
Given \(f\colon A\to B\) and \(g\colon B\to C\), the composition \(g\circ f\colon A\to C\) is defined by \((g\circ f)(x)=g(f(x))\). For it to make sense, the codomain of \(f\) must be contained in the domain of \(g\). Composition is associative but, in general, not commutative.
A function \(f\colon A\to B\) has an inverse \(f^{-1}\colon B\to A\) exactly when it is bijective. Then \(f^{-1}\circ f=\mathrm{id}_A\) and \(f\circ f^{-1}=\mathrm{id}_B\), and the inverse is unique. If \(f\) is only injective, an inverse can be defined on its image, but not on all of \(B\).
If \(f\) and \(g\) are bijective, \((g\circ f)^{-1}=f^{-1}\circ g^{-1}\): the order reverses, as when undoing the steps of a recipe. Common mistake: writing \(g^{-1}\circ f^{-1}\) without checking it. Worked example: with \(f(x)=x+1\) and \(g(x)=2x\) on \(\mathbb{R}\), \((g\circ f)(x)=2x+2\), and its inverse is \(\frac{x-2}{2}\).
Think about it
Why does the inverse of \(g\circ f\) reverse the order of \(f\) and \(g\)?
Because undoing the steps means undoing the last one first, \(g\), and then \(f\).
Step-by-step solved exercises
- ZW-COMPOSITION-AND-INVERSE-001 What does it mean for \(f\colon A\to B\) to have an inverse \(f^{-1}\colon B\to A\)?
- ZW-COMPOSITION-AND-INVERSE-002 If \(f\colon A\to B\) and \(g\colon B\to C\), from which set to which set does \(g\circ f\) go?
- ZW-COMPOSITION-AND-INVERSE-003 What is the inverse of the identity \(\mathrm{id}_A\)?
Exercises 30
- What does it mean for \(f\colon A\to B\) to have an inverse \(f^{-1}\colon B\to A\)?
- If \(f\colon A\to B\) and \(g\colon B\to C\), from which set to which set does \(g\circ f\) go?
- What is the inverse of the identity \(\mathrm{id}_A\)?
- Let \(f=\{(1,b),(2,c),(3,a)\}\) be a bijection from \(\{1,2,3\}\) onto \(\{a,b,c\}\). What is \(f^{-1}(a)\)?
- Which identity does the inverse \(f^{-1}\) of a bijection \(f\colon A\to B\) satisfy?
- With \(f(x)=x+1\) and \(g(x)=x^2\) on \(\mathbb{R}\), what is \((g\circ f)(2)\)?
- Is \(g\circ f=f\circ g\) always true?
- If \(f\) and \(g\) are bijections, what is \((g\circ f)^{-1}\)?
- Let \(f\colon A\to B\) and \(h\colon B\to A\) satisfy \(h\circ f=\mathrm{id}_A\). What can be said about \(f\)?
- If \(g\circ f\) is surjective, what follows about \(g\)?
- If \(g:M\to N\) and \(f:N\to P\), what does \((f\circ g)(x)\) mean?
- If \(f\) and \(g\) are invertible, which formula respects the correct order?
- Why does order matter in a composition?
- If \(g\circ f\) is injective, what can be said about \(g\)?
- Which law of composition always holds?
- What does \(\operatorname{id}_M\) do to a point \(x\in M\)?
- If \(f\colon A\to B\), why is \(f\circ\mathrm{id}_A=f\)?
- If \(f:M\to N\), which composition is well typed?
- What distinguishes the identity from a nontrivial deformation?
- Find a false statement about \(\operatorname{id}_M\).
- In general, if \(f:A\to B\) and \(g:C\to D\), what condition makes \(g\circ f\) well defined?
- If \(f:A\to B\) is bijective, what do \(f^{-1}\circ f\) and \(f\circ f^{-1}\) satisfy?
- If \(f(x)=x+1\) and \(g(x)=2x\), what is \((f\circ g)(x)\)?
- In \(\dot{\varphi}_t=v_t\circ\varphi_t\), what does the composition contribute?
- List all valid laws of function composition.
- If \(f:A\to B\) is bijective and \(x\in A\), what is \(f^{-1}(f(x))\)?
- Why does \(\varphi_0=\operatorname{id}\) appear at the start of a registration flow?
- If \(f:A\to B\) and \(g:B\to C\) are bijective, where does \((g\circ f)^{-1}\) go from and to?
- What does the identity do to the points of \(M\), unlike a nontrivial deformation?
- List all properties of \(\operatorname{id}_M\).
What comes next
References
- Herbert B. Enderton, Elements of Set Theory, 1st edition, Academic Press, 1977.
- Thomas Jech, Set Theory (The Third Millennium Edition), 3rd millennium edition, Springer, 2003.
- John M. Lee, Introduction to Smooth Manifolds, 2nd edition, Springer, 2013.