Question
Mathematics Question on Relations and Functions
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= IxI )
Answer
Define f : N → Z as f(x) = x and g : Z → Z as g(x) = ∣x∣ .
We first show that g is not injective.
It can be observed that:
g(-1)=I-1I=1.
g(1) =I1I=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)=IxI.
Let x, y ∈ N such that gof(x) = gof(y).
⇒ IxI=IyI.
Since x and y ∈ N, both are positive.
Therefore IxI=IyI ⇒ x=y
Hence, gof is injective