Show solutionHide solution
Part 1: Show that \(f:\mathbf{R}^*\to\mathbf{R}^*\), \(f(x)=\dfrac1x\), is one-one and onto.
One-one. Let \(x_1,x_2\in\mathbf{R}^*\) with \(f(x_1)=f(x_2)\). Then \(\dfrac{1}{x_1}=\dfrac{1}{x_2}\). Since \(x_1,x_2\neq 0\), cross-multiplication gives \(x_2=x_1\). Hence \(f\) is one-one.
Onto. Let \(y\in\mathbf{R}^*\). Take \(x=\dfrac1y\). Since \(y\neq 0\), we have \(x\in\mathbf{R}^*\) and \(f(x)=\dfrac{1}{1/y}=y\). Thus every element of the codomain has a preimage, so \(f\) is onto.
Therefore \(f\) is one-one and onto.
Part 2: Replace the domain \(\mathbf{R}^*\) by \(\mathbf{N}\), keeping the codomain \(\mathbf{R}^*\).
Now consider \(g:\mathbf{N}\to\mathbf{R}^*\), \(g(x)=\dfrac1x\).
One-one. If \(g(x_1)=g(x_2)\), then \(\dfrac{1}{x_1}=\dfrac{1}{x_2}\), so \(x_1=x_2\). Hence \(g\) is one-one.
Not onto. For example, \(2\in\mathbf{R}^*\), but there is no \(x\in\mathbf{N}\) with \(\dfrac1x=2\), since that would require \(x=\dfrac12\notin\mathbf{N}\). Thus \(g\) is not onto.
So the result is not true when the domain is replaced by \(\mathbf{N}\) with the same codomain \(\mathbf{R}^*\): the function remains one-one but is no longer onto.