Composition and inverse · Exercise-COMPOSITION-AND-INVERSE-013

Step-by-step solved exercise: Relations and functions

Why does order matter in a composition?

Step by step with comments, a check and common mistakes.

Step-by-step solution

  1. One example suffices: with \(\displaystyle f(x)=x+1\) and \(\displaystyle g(x)=2x\), \(\displaystyle f\circ g\) and \(\displaystyle g\circ f\) differ.

    \[\displaystyle f\circ g\neq g\circ f\]
  2. Also, \(\displaystyle g\circ f\) only exists if the codomain of \(\displaystyle f\) fits in the domain of \(\displaystyle g\).

    \[\displaystyle \operatorname{codom}(f)\subseteq\operatorname{dom}(g)\]
  3. Hence order matters: composition generally does not commute and must match domains and codomains.

Answer

Because in general \(\displaystyle f\circ g\neq g\circ f\) and the domains must also match

🎯 Build my path to this exercise