Now, A = {1, 2, 3, 4, 5};
B = {1, 2, 3, 4, … }
Given f: A → B and f(x) = x2
f(1) = 12 = 1;
f(2) = 4;
f(3) = 9;
f(4) = 16;
f(5) = 25.
Range of f = {1, 4, 9, 16, 25}
Since distinct elements are mapped into distinct images, it is a one-one function.
However, the function is not onto, since 3 ∈ B but there is no x ∈ A such that
f(x) = x2 = 3.