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

Step-by-step solved exercise: Relations and functions

Is \(\displaystyle g\circ f=f\circ g\) always true?

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

Step-by-step solution

  1. Take \(\displaystyle f(x)=x+1\) and \(\displaystyle g(x)=2x\) on \(\displaystyle \mathbb{R}\).

    \[\displaystyle f(x)=x+1,\ g(x)=2x\]
  2. Then \(\displaystyle (g\circ f)(x)=g(x+1)=2x+2\).

    \[\displaystyle (g\circ f)(x)=2x+2\]
  3. And \(\displaystyle (f\circ g)(x)=f(2x)=2x+1\).

    \[\displaystyle (f\circ g)(x)=2x+1\]
  4. Since they differ, composition does not commute in general.

    \[\displaystyle g\circ f\neq f\circ g\]

Answer

No, in general it does not commute

🎯 Build my path to this exercise