Let f : A-> B and g : B -> C be two functions. Then the composition of f and g, denoted by gof, is defined as the function gof : A -> C given by
gof=g(f(x) for all x ∈ A
Example
1. Consider f : N -> N, g : N -> N and h : N -> R defined as
$f(x) = 2x$,$g(y) = 3y + 4$ and $h(z) = sin z$, for x, y and z in N.
Show that ho(gof ) = (hog) of. Solution
We have
ho(gof) (x) = h(gof (x)) = h(g(f (x))) = h(g(2x))
= h(3(2x) + 4) = h(6x + 4) = sin (6x + 4) for x in N.
Also,
((hog)o f ) (x) = (hog) ( f (x)) = (hog) (2x) = h ( g (2x))
= h(3(2x) + 4) = h(6x + 4) = sin (6x + 4), for x in N.
This shows that ho(gof) = (hog) of