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:N→Nand g:N→Nsuch that gof is onto but f is not onto.
Solution
Hint: Consider example of f(x)=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:N→N. Then prove gof is onto. Find the composite of g and f ⇒(gof)(x)=g(f(x)). Thus prove gof is onto.
Complete step-by-step answer:
Given to us two functions of f:N→Nand g:N→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:N→Nbe f(x)=x+1.
And g:N→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:N→Nbe f(x)=x+1
Let us considery=f(x), where y∈N.