Let Z be the set of all integers. Which of the following functions \(f : Z \to Z\) is both one-one and onto?
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → \(f(x) = x + 2\)
One-one: if \(x_1 + 2 = x_2 + 2\), then \(x_1 = x_2\).
Onto: for any integer y, the integer \(x = y - 2\) gives
\(f(y - 2) = (y - 2) + 2 = y\)
So \(f(x) = x + 2\) is one-one and onto.
Why the other options are incorrect
Option (1) \(f(x) = x^{3}\) — Incorrect. It is one-one, but 2 is not the cube of any integer, so it is not onto.
Option (2) \(f(x) = 2x + 1\) — Incorrect. It is one-one, but \(2x + 1\) is always odd, so an even integer such as 2 has no pre-image.
Option (4) \(f(x) = x^{2} + 1\) — Incorrect. \(f(1) = f(-1) = 2\), so it is not one-one.