Question

( f={(1,2),(3,5),(4,1)} ) and ( g={(1,3),(2,3 ) 3), 1). Find ( (g circ f) ) and ( (f circ g) )
Solution

Here range ( (f)={1,2,5} ) and ( operatorname{dom}(g)={1,2,5} )
Clearly, range ( (f) subseteq operatorname{dom}(g) ). ( therefore(g circ f) ) is defined and ( operatorname{dom}(g circ f)=operatorname{dom}(f)={1,3,4} )
Now, ( (g circ f)(1)=g{f(1)}=g(2)=3 )
( (g circ f)(3)=g{f(3)}=g(5)=1 )
( (g circ f)(4)=g{f(4)}=g(1)=3 )
Hence, ( (g circ f)={(1,3),(3,1),(4,3)} )
Again, range ( (g)={1,3} ) and ( operatorname{dom}(f)={1,3,4} . )
Clearly, range ( (g) subseteq operatorname{dom}(f) ).
( therefore(f circ g) ) is defined and ( operatorname{dom}(f circ g)=operatorname{dom}(g)={1,2,5} )
Now, ( (f circ g)(1)=f{g(1)}=f(3)=5 )
( (f circ g)(2)=f{g(2)}=f(3)=5 )
( (f circ g)(5)=f{g(5)}=f(1)=2 )
Hence, ( (f circ g)={(1,5),(2,5),(5,2)} . )