Show that the function $f:N\to N$, defined by $f(x)=\left\{ \begin{align}
& x+1,\text{ if }x\text{ is odd} \\
& x-1,\text{ if }x\text{ is even} \\
\end{align} \right\}$ is one-one and onto.
Answer
679.2k+ views
Hint: To check whether the given function is one-one or not, assume two elements ${{x}_{1}}\text{ and }{{x}_{2}}$ in the set of the domain of the given function and substitute $f({{x}_{1}})=f({{x}_{2}})$. If ${{x}_{1}}={{x}_{2}}$, then $f(x)$ is one-one and if there is any more relation between ${{x}_{1}}\text{ and }{{x}_{2}}$ other than ${{x}_{1}}={{x}_{2}}$ then $f(x)$ is not one-one. To check whether the given function is onto or not, check if the range of $f(x)$ is equal to co-domain or not. Here, co-domain is the set of all values of $f(x)$ in which the range of the function is constrained.
Complete step-by-step solution -
It is given that function is defined for all natural numbers and over all natural numbers. Therefore, both domain and co-domain of the given function consists of the set of all natural numbers.
First let us show the function is one-one.
Assume two elements ${{x}_{1}}\text{ and }{{x}_{2}}$ in the set of the domain of the given function. Therefore,
\[f({{x}_{1}})=f({{x}_{2}})\]
(i) Considering the case that ‘x’ is odd.
Substituting, ${{x}_{1}}\text{ and }{{x}_{2}}$ in the function, we get,
$\begin{align}
& {{x}_{1}}+1={{x}_{2}}+1 \\
& \Rightarrow {{x}_{1}}={{x}_{2}} \\
\end{align}$
(ii) Considering the case that ‘x’ is even.
Substituting, ${{x}_{1}}\text{ and }{{x}_{2}}$ in the function, we get,
$\begin{align}
& {{x}_{1}}-1={{x}_{2}}-1 \\
& \Rightarrow {{x}_{1}}={{x}_{2}} \\
\end{align}$
Clearly, we can see that, in both the cases when \[f({{x}_{1}})=f({{x}_{2}})\] then, ${{x}_{1}}={{x}_{2}}$. Therefore, $f(x)$ is one-one.
Now, let us show that the given function is onto.
We know that the given function is, $f(x)=\left\{ \begin{align}
& x+1,\text{ if }x\text{ is odd} \\
& x-1,\text{ if }x\text{ is even} \\
\end{align} \right\}$. We can see that if the value of ‘x’ is chosen as an odd natural number then the value of $f(x)$ will be an even natural number. Also, if the value of ‘x’ is chosen as an even natural number then the value of $f(x)$ will be an odd natural number.
Therefore, the range of $f(x)$ is all the natural numbers. Hence, range and codomain of the function are equal.
Therefore, it is proved that $f(x)$ is onto.
Note: One may note that we have to show that the function is one-one for two different cases just as we did above. If in any case the rule fails then the function will not be one-one. Also, we can show that the function is onto by graphical method but that will be somewhat lengthier. Therefore, we have applied a theoretical approach.
Complete step-by-step solution -
It is given that function is defined for all natural numbers and over all natural numbers. Therefore, both domain and co-domain of the given function consists of the set of all natural numbers.
First let us show the function is one-one.
Assume two elements ${{x}_{1}}\text{ and }{{x}_{2}}$ in the set of the domain of the given function. Therefore,
\[f({{x}_{1}})=f({{x}_{2}})\]
(i) Considering the case that ‘x’ is odd.
Substituting, ${{x}_{1}}\text{ and }{{x}_{2}}$ in the function, we get,
$\begin{align}
& {{x}_{1}}+1={{x}_{2}}+1 \\
& \Rightarrow {{x}_{1}}={{x}_{2}} \\
\end{align}$
(ii) Considering the case that ‘x’ is even.
Substituting, ${{x}_{1}}\text{ and }{{x}_{2}}$ in the function, we get,
$\begin{align}
& {{x}_{1}}-1={{x}_{2}}-1 \\
& \Rightarrow {{x}_{1}}={{x}_{2}} \\
\end{align}$
Clearly, we can see that, in both the cases when \[f({{x}_{1}})=f({{x}_{2}})\] then, ${{x}_{1}}={{x}_{2}}$. Therefore, $f(x)$ is one-one.
Now, let us show that the given function is onto.
We know that the given function is, $f(x)=\left\{ \begin{align}
& x+1,\text{ if }x\text{ is odd} \\
& x-1,\text{ if }x\text{ is even} \\
\end{align} \right\}$. We can see that if the value of ‘x’ is chosen as an odd natural number then the value of $f(x)$ will be an even natural number. Also, if the value of ‘x’ is chosen as an even natural number then the value of $f(x)$ will be an odd natural number.
Therefore, the range of $f(x)$ is all the natural numbers. Hence, range and codomain of the function are equal.
Therefore, it is proved that $f(x)$ is onto.
Note: One may note that we have to show that the function is one-one for two different cases just as we did above. If in any case the rule fails then the function will not be one-one. Also, we can show that the function is onto by graphical method but that will be somewhat lengthier. Therefore, we have applied a theoretical approach.
Recently Updated Pages
Which of the following graphs shows the variation of class 12 physics CBSE

Draw a labelled diagram of the human male reproductive class 12 biology CBSE

Describe the experiment to compare the emf of two cells class 12 physics CBSE

What is standard hydrogen electrode

What is conventional current and electric current class 12 physics CBSE

2Bromopentane is treated with an alcoholic KOH solution class 12 chemistry CBSE

Trending doubts
Draw a labelled sketch of the human eye class 12 physics CBSE

Which are the Top 10 Largest Countries of the World?

Differentiate between homogeneous and heterogeneous class 12 chemistry CBSE

Draw ray diagrams each showing i myopic eye and ii class 12 physics CBSE

Which is the correct genotypic ratio of mendel dihybrid class 12 biology CBSE

What is the Full Form of PVC, PET, HDPE, LDPE, PP and PS ?

