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→N and g:N→N such that gof is onto but f is not onto.
Solution
Hint: Use the conditions for surjectivity for taking the right examples.
Complete step-by-step answer:
Consider examples 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.
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.