Composition and inverse · Exercise-COMPOSITION-AND-INVERSE-013
Step-by-step solved exercise: Relations and functions
Why does order matter in a composition?
Composition and inverse · Exercise-COMPOSITION-AND-INVERSE-013
Why does order matter in a composition?
One example suffices: with \(\displaystyle f(x)=x+1\) and \(\displaystyle g(x)=2x\), \(\displaystyle f\circ g\) and \(\displaystyle g\circ f\) differ.
Also, \(\displaystyle g\circ f\) only exists if the codomain of \(\displaystyle f\) fits in the domain of \(\displaystyle g\).
Hence order matters: composition generally does not commute and must match domains and codomains.
Because in general \(\displaystyle f\circ g\neq g\circ f\) and the domains must also match