Let \(f:\{1,3,4\}\to\{1,2,5\}\) and \(g:\{1,2,5\}\to\{1,3\}\) be given by \(f=\{(1,2),(3,5),(4,1)\}\) and \(g=\{(1,3),(2,3),(5,1)\}\). Write down \(g\circ f\).
Show solutionHide solution
We are given
\[f=\{(1,2),(3,5),(4,1)\},\qquad g=\{(1,3),(2,3),(5,1)\}.\]The composite \(g\circ f\) is defined by
\[(g\circ f)(x)=g\bigl(f(x)\bigr),\]for every \(x\) in the domain of \(f\), namely \(\{1,3,4\}\). We compute each value in turn.
- For \(x=1\): \(f(1)=2\), and then \(g(2)=3\). Hence \((g\circ f)(1)=3\).
- For \(x=3\): \(f(3)=5\), and then \(g(5)=1\). Hence \((g\circ f)(3)=1\).
- For \(x=4\): \(f(4)=1\), and then \(g(1)=3\). Hence \((g\circ f)(4)=3\).
Therefore
\[g\circ f=\{(1,3),(3,1),(4,3)\}.\]Its domain is \(\{1,3,4\}\) and its range is \(\{1,3\}\), which is contained in the codomain \(\{1,3\}\) of \(g\), as required for the composite to be defined.