# Consider f : N → N, g : N → N and h : N → R defined as f(x) = 2x, g(y) = 3y + 4

Question:

Consider $f: N \rightarrow N, g: N \rightarrow N$ and $h: N \rightarrow R$ defined as $f(x)=2 x, g(y)=3 y+4$ and $h(z)=\sin z$ for all $x, y, z \in N$. Show that ho $(g \circ f)=($ hog $)$ of.

Solution:

Given, $f: N \rightarrow N, g: N \rightarrow N$ and $h: N \rightarrow R$

$\Rightarrow$ gof $: N \rightarrow N$ and $h o g: N \rightarrow R$

$\Rightarrow$ ho $(g \circ f): N \rightarrow R$ and $(h o g)$ of $: N \rightarrow R$

So, both have the same domains.

$(g o f)(x)=g(f(x))=g(2 x)=3(2 x)+4=6 x+4 \ldots(1)$

$(h o g)(x)=h(g(x))=h(3 x+4)=\sin (3 x+4) \quad \ldots(2)$

Now,

$(h o(g o f))(x)=h((g o f)(x))=h(6 x+4)=\sin (6 x+4) \quad[$ from $(1)]$

$((h o g) o f)(x)=(h o g)(f(x))=(h o g)(2 x)=\sin (6 x+4) \quad[$ from $(2)]$

So, $(h o(g o f))(x)=((h o g) o f)(x), \forall x \in N$

Hence, $h o(g o f)=(h o g) o f$