**Question:**

Given examples of two functions $t: \mathbf{N} \rightarrow \mathbf{N}$ and $g: \mathbf{N} \rightarrow \mathbf{N}$ such that got is onto but $f$ is not onto.

(Hint: Consider $f(x)=x+1$ and $g(x)= \begin{cases}x-1 & \text { if } x>1 \\ 1 & \text { if } x=1\end{cases}$

**Solution:**

Define *f*: N → N by,

*f*(*x*) =* x *+ 1

And, *g*: N → N by,

$g(x)= \begin{cases}x-1 & \text { if } x>1 \\ 1 & \text { if } x=1\end{cases}$

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, *g*o*f*: N → N is defined by,

Then, it is clear that for $y \in \mathbf{N}$, there exists $x=y \in \mathbf{N}$ such that gof $(x)=y$.

Hence, *g*o*f* is onto.

Click here to get exam-ready with eSaral

For making your preparation journey smoother of JEE, NEET and Class 8 to 10, grab our app now.