Let $f: W \rightarrow W$ be defined as $f(n) = n-1$ if $n$ is odd and $f(n) = n+1$ if $n$ is even. Show that $f$ is invertible. Find the inverse of $f$. Here,$W$ is the set of all whole numbers.

Vedclass pdf generator app on play store
Vedclass iOS app on app store
(A) It is given that $f: W \rightarrow W$ is defined as:
$f(n) = \begin{cases} n-1 & \text{if } n \text{ is odd} \\ n+1 & \text{if } n \text{ is even} \end{cases}$
For one-one:
Let $f(n) = f(m)$.
If $n$ is odd and $m$ is even,then $n-1 = m+1 \Rightarrow n-m = 2$. This is impossible as the difference between an odd and an even number is always odd. Similarly,$n$ being even and $m$ being odd is impossible.
Therefore,$n$ and $m$ must have the same parity.
If both are odd,$n-1 = m-1 \Rightarrow n = m$.
If both are even,$n+1 = m+1 \Rightarrow n = m$.
Thus,$f$ is one-one.
For onto:
Any odd number $2r+1$ in the codomain is the image of $2r+2$ (which is even) or $2r$ (which is odd). Specifically,$f(2r+2) = 2r+1$ and $f(2r) = 2r+1$ is not the case here; rather,$f(2r+2) = 2r+3$ and $f(2r+1) = 2r$. Every $m \in W$ has a preimage. Thus,$f$ is onto.
Since $f$ is one-one and onto,it is invertible.
Let $g: W \rightarrow W$ be defined as $g(m) = \begin{cases} m+1 & \text{if } m \text{ is even} \\ m-1 & \text{if } m \text{ is odd} \end{cases}$.
We observe that $f(f(n)) = n$ for all $n \in W$.
If $n$ is odd,$f(n) = n-1$ (even),so $f(f(n)) = f(n-1) = (n-1)+1 = n$.
If $n$ is even,$f(n) = n+1$ (odd),so $f(f(n)) = f(n+1) = (n+1)-1 = n$.
Thus,$f \circ f = I_W$,which implies $f^{-1} = f$.

Explore More

Similar Questions

Let $S = \{1, 2, 3\}$. Determine whether the function $f: S \rightarrow S$ defined as below has an inverse. Find $f^{-1}$,if it exists: $f = \{(1, 1), (2, 2), (3, 3)\}$.

If $f: N \rightarrow N$ and $f(x) = x + 3$,then $f^{-1}(x) =$ . . . . . . .

If $f: R \rightarrow R$ is given by $f(x)=7x+8$ and $f^{-1}(12)=\frac{k}{7}$,then the value of $k$ is

If $g$ is the inverse of $f$ and $f^{\prime}(x)=\frac{1}{1+x^3}$,then $g^{\prime}(x)$ is

Let $f(x) = (x + 2)^2 - 2, x \geq - 2$. Then $f^{-1}(x) =$

Vedclass Products

For Students

Vedclass Test Series

Mock tests in real JEE/NEET style with performance analysis. 5-day free trial.

Start Free Trial
For Teachers

Exam Paper Generator

Generate Set A/B/C/D exam papers from 7.5L+ questions in 2 minutes. 3 chapters free.

Try Free
For Institutes

Online Exam Module

Live online exams with unlimited students, 360° analytics & white-label branding.

See Demo