
Show that the function $f:N\to N$, given by
\[f(x)=\left\{ \begin{matrix}
x+1, & \text{if }x\text{ is odd} \\
x-1, & \text{if }x\text{ is even} \\
\end{matrix} \right.\]
is both one-one and onto.
Answer
510.6k+ views
Hint: Use the standard procedure to a check whether a function one-one or onto. The test for one-one determines whether a one element from the domain is mapped to exactly one element from the range. The test determines whether all elements of the range are mapped to an element of the domain set. In symbols, if a function $f:A\to B$ is one-one, then for some $\text{ }{{x}_{1}},{{x}_{2}}\in A$ and $f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right)$ then ${{x}_{1}}={{x}_{2}}$. Similarly, if the function $f:A\to B$ is onto the for every $y\in B$, there exists $x\in A$ such that $y=f\left( x \right)$.
Complete step by step answer:
The given function sends a natural number to another natural number and is defined as,
\[f(x)=\left\{ \begin{matrix}
x+1, & \text{if }x\text{ is odd} \\
x-1, & \text{if }x\text{ is even} \\
\end{matrix} \right.\]
Case-1: when $x$ is odd
Testing one-one using standard procedure, for some odd ${{x}_{1}},{{x}_{2}}\in N$ we assume \[f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right)\] then,
\[\begin{align}
& f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right) \\
& \Rightarrow {{x}_{1}}+1={{x}_{2}}+1 \\
& \Rightarrow {{x}_{1}}={{x}_{2}} \\
\end{align}\]
So $f$ is one-one for all odd $x$.
Testing onto with using standard procedure,
Let $y=f\left( x \right)$ for some $y\in N$ and for some odd $x\in N$ .Then,
\[\begin{align}
& y=f(x) \\
& \Rightarrow y=x+1 \\
& \Rightarrow x=y-1 \\
\end{align}\]
So for every $y\in N$, we can find an odd natural number $x\in N$ such that $y=f(x)$ in the form of $y-1$. Hence $f$ is onto.\[\]
Case-2: when $x$ is even \[\]
Testing one-one using standard procedure, for some odd ${{x}_{1}},{{x}_{2}}\in N$ we assume $f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right)$ then,
\[\begin{align}
& f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right) \\
& \Rightarrow {{x}_{1}}-1={{x}_{2}}-1 \\
& \Rightarrow {{x}_{1}}={{x}_{2}} \\
\end{align}\]
So $f$ is one-one for all even $x$.
Testing onto with using standard procedure,
Let $y=f\left( x \right)$ for some $y\in N$ and for some even $x\in N$ .Then,
\[\begin{align}
& y=f(x) \\
& \Rightarrow y=x-1 \\
& \Rightarrow x=y+1 \\
\end{align}\]
So for every $y\in N$, we can find an even natural number $x\in N$ such that $y=f(x)$ in the form of $y+1$. Hence $f$ is onto.
From case-1 and case-2 we can conclude that $f$ is both one-one and onto for all $x\in N$.
Note: The questions tests your basic knowledge of one-one and onto functions. The other name of one-one is injective and the other name of onto is surjective. You need to be careful when you apply the standard tests. A function which is both one-one and onto is called bijective function. The question can also be directly framed as to test bijectivity of the function.
Complete step by step answer:
The given function sends a natural number to another natural number and is defined as,
\[f(x)=\left\{ \begin{matrix}
x+1, & \text{if }x\text{ is odd} \\
x-1, & \text{if }x\text{ is even} \\
\end{matrix} \right.\]
Case-1: when $x$ is odd
Testing one-one using standard procedure, for some odd ${{x}_{1}},{{x}_{2}}\in N$ we assume \[f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right)\] then,
\[\begin{align}
& f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right) \\
& \Rightarrow {{x}_{1}}+1={{x}_{2}}+1 \\
& \Rightarrow {{x}_{1}}={{x}_{2}} \\
\end{align}\]
So $f$ is one-one for all odd $x$.
Testing onto with using standard procedure,
Let $y=f\left( x \right)$ for some $y\in N$ and for some odd $x\in N$ .Then,
\[\begin{align}
& y=f(x) \\
& \Rightarrow y=x+1 \\
& \Rightarrow x=y-1 \\
\end{align}\]
So for every $y\in N$, we can find an odd natural number $x\in N$ such that $y=f(x)$ in the form of $y-1$. Hence $f$ is onto.\[\]
Case-2: when $x$ is even \[\]
Testing one-one using standard procedure, for some odd ${{x}_{1}},{{x}_{2}}\in N$ we assume $f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right)$ then,
\[\begin{align}
& f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right) \\
& \Rightarrow {{x}_{1}}-1={{x}_{2}}-1 \\
& \Rightarrow {{x}_{1}}={{x}_{2}} \\
\end{align}\]
So $f$ is one-one for all even $x$.
Testing onto with using standard procedure,
Let $y=f\left( x \right)$ for some $y\in N$ and for some even $x\in N$ .Then,
\[\begin{align}
& y=f(x) \\
& \Rightarrow y=x-1 \\
& \Rightarrow x=y+1 \\
\end{align}\]
So for every $y\in N$, we can find an even natural number $x\in N$ such that $y=f(x)$ in the form of $y+1$. Hence $f$ is onto.
From case-1 and case-2 we can conclude that $f$ is both one-one and onto for all $x\in N$.
Note: The questions tests your basic knowledge of one-one and onto functions. The other name of one-one is injective and the other name of onto is surjective. You need to be careful when you apply the standard tests. A function which is both one-one and onto is called bijective function. The question can also be directly framed as to test bijectivity of the function.
Recently Updated Pages
Earth rotates from West to east ATrue BFalse class 6 social science CBSE

The easternmost longitude of India is A 97circ 25E class 6 social science CBSE

Write the given sentence in the passive voice Ann cant class 6 CBSE

Convert 1 foot into meters A030 meter B03048 meter-class-6-maths-CBSE

What is the LCM of 30 and 40 class 6 maths CBSE

What is history A The science that tries to understand class 6 social science CBSE

Trending doubts
Father of Indian ecology is a Prof R Misra b GS Puri class 12 biology CBSE

Who is considered as the Father of Ecology in India class 12 biology CBSE

Enzymes with heme as prosthetic group are a Catalase class 12 biology CBSE

A deep narrow valley with steep sides formed as a result class 12 biology CBSE

An example of ex situ conservation is a Sacred grove class 12 biology CBSE

Why is insulin not administered orally to a diabetic class 12 biology CBSE
