Question:
Let $f=\{(1,2),(3,5),(4,1))$ and $g=\{(2,3),(5,1),(1,3)\}$. Then, gof $=$ __________and fog = __________.
Solution:
Given: f = {(1, 2), (3, 5), (4, 1)) and g = {(2, 3), (5, 1), (1, 3)}
$f o g(x)=f(g(x))$
$f o g(1)=f(g(1))$
$=f(3)$
$=5$
$f o g(2)=f(g(2))$
$=f(3)$
$=5$
$f o g(5)=f(g(5))$
$=f(1)$
$=2$
Hence, $f o g=\{(1,5),(2,5),(5,2)\}$
$g o f(x)=g(f(x))$
$g o f(1)=g(f(1))$
$=g(2)$
$=3$
$g o f(3)=g(f(3))$
$=g(5)$
$=1$
$g o f(4)=g(f(4))$\
$=g(1)$
$=3$
Hence, $g \circ f=\{(1,3),(3,1),(4,3)\}$
Hence, gof $=\{(1,3),(3,1),(4,3)\}$ and fog $=\{(1,5),(2,5),(5,2)\}$.