Solveeit Logo

Question

Question: Give examples of two functions \(f:N\to N\) and \(g:N\to N\) such that gof is onto but f is not onto...

Give examples of two functions f:NNf:N\to N and g:NNg:N\to N such that gof is onto but f is not onto.

Explanation

Solution

Hint: Use the conditions for surjectivity for taking the right examples.

Complete step-by-step answer:
Consider examples of f(x)=x+1f\left( x \right)=x+1and g\left( x \right)=\left\\{ \begin{matrix} x-1,x>1 \\\ 1,x=1 \\\ \end{matrix} \right..
First prove that f is not onto by proving the digit formed is not a natural number. As mentioned in f:NNf:N\to N. Then prove gof is onto. Find the composite of g and f(gof)(x)=g(f(x))\Rightarrow \left( gof \right)\left( x \right)=g\left( f\left( x \right) \right). Thus prove gof is onto.
Given to us two functions of f:NNf:N\to Nand g:NNg:N\to N.
We need to prove that gof is onto and f is not onto.
Onto function could be explained by considering two sets, set A and set B which consist of elements. If for every element of B there is at least one or more than one element matching with A, then the function is said to be onto.
Let us consider f:NNf:N\to Nbe f(x)=x+1f\left( x \right)=x+1.
And g:NNg:N\to Nbe taken as g\left( x \right)=\left\\{ \begin{matrix} x-1,x>1 \\\ 1,x=1 \\\ \end{matrix} \right..
We will first show that f is not onto.
Let f:NNf:N\to Nbe f(x)=x+1f\left( x \right)=x+1
Let us considery=f(x)y=f\left( x \right), where yNy\in N.

& f\left( x \right)=x+1\Rightarrow y=x+1 \\\ & \therefore x=y-1 \\\ \end{aligned}$$ Let us put $$y=1$$, $$x=1-1=0$$ We get x = 0, which is not a natural number. It is said that $$f:N\to N$$i.e. natural numbers. But zero is not a natural number. So f is not onto and it doesn’t belong in the elements of natural numbers. If given functions f and g with domains and target sets consisting sets consisting of real numbers, the composite of g and f is the new function gof defined as, $$\left( gof \right)\left( x \right)=g\left( f\left( x \right) \right)$$ Here, we need to find gof. Let us consider $$f\left( x \right)=x+1$$and $$g\left( x \right)=\left\\{ \begin{matrix} x-1,x>1 \\\ 1,x=1 \\\ \end{matrix} \right.$$. $$f\left( x \right)=x+1,g\left( x \right)=1$$ Since, $$g\left( x \right)=1$$, for x = 1. $$\begin{aligned} & g\left( f\left( x \right) \right)=1 \\\ & \therefore gof=1 \\\ \end{aligned}$$ Since, $$g\left( x \right)=x-1,x>1$$ $$g\left( f\left( x \right) \right)=f\left( x \right)-1$$, put, $$x=f\left( x \right)$$. $$\begin{aligned} & gof=\left( x+1 \right)-1 \\\ & \Rightarrow gof=x \\\ & \therefore gof=\left\\{ \begin{matrix} x,x>1 \\\ 1,x=1 \\\ \end{matrix} \right. \\\ \end{aligned}$$ Let us consider, $$gof=y$$, where $$y\in N$$. $$\therefore y=\left\\{ \begin{matrix} x,x>1 \\\ 1,x=1 \\\ \end{matrix} \right.$$ Here, y is a natural number, as y = x. So, x is also a natural number. $$\therefore $$gof is onto, as y is a natural number and y = gof. Hence, we proved that gof is onto and f is not onto. Note: Remember what is onto function. We can only prove a function is not onto, if the elements found don’t belong to it. In the case of $$f:N\to N$$, the element was zero, which is not a natural number and doesn’t belong to f. If it was any number greater than zero, then it would belong to $$f:N\to N$$and f would be an onto function.