Question
Mathematics Question on Relations and Functions
Given examples of two functions f :N→N and g :N→N such that gof is onto but f is not onto.
(Hint: Consider f(x)=x+1 and g(x)={x−1 1if x≥1 if x = 1
Answer
Define f : N → N by,
f(x) = x + 1
And, g: N → N by,
g(x)={x−1 1if x≥1 if x = 1
We first show that g is not onto.
For this, consider element 1 in co-domain N.
It is clear that this element is not an image of any of the elements in domain N.
∴ f is not onto.
Now, gof : N → N is defined by,
gof (x)= g(f(x))= g(x+1)= (x+1)-1 [x ∈ N =>(x+1)>1]
Then, it is clear that for y ∈ N, there exists x = y ∈ N such that gof( x) = y.
Hence, gof is onto.