Give examples of two functions f: N → Z and g: Z → Z such that g o f is injective but g is not injective.
(Hint: Consider f (x) = x and g(x) = |x|).
Define f: N → Z as f(x) = x and g: Z → Z as g(x) = |x|
Now, we can see that
g(-1) = |-1| = 1
g(1) = |1| = 1
⇒ g(-1) = g(1) , but -1 ≠ 1
⇒ g is not injective.
Now, gof: N → Z is defined as gof(x) = g(f(x)) = g(x) = |x|
Let x, y ϵ N such that gof(x) = gof(y).
⇒ |x| = |y|
⇒ x = y
Therefore, gof is injective.