It is given that the function f( x ) is defined in the domain f:N→Z and the function g( x ) is defined in the domain g:Z→Z.
Consider the functions f( x )=x and g( x )=| x |.
First, show that the function g( x ) is not injective.
Let x=1;x=−1
g( −1 )=| −1 | =1 g( 1 )=| 1 | =1
The value of the function g( x ) is same for the two different values of x. So, the function is not injective because g( 1 )=g( −1 ) but 1≠−1.
Substitute x for f( x ) in gof( x ).
gof( x )=g( f( x ) ) =g( x ) =| x |
Now, show that the function gof( x ) is not injective.
gof| x |=gof| y | | x |=| y | x=y
As the value of gof| x |=gof| y |, so the function gof is injective.
Hence, it is proved that gof is injective, but g is not injective.