Kindly solve this question based on Functions ?

Which of the following statement(s) is(are) correct, Explain with some example ?

(A) If #f# is a one-one mapping from set A to A , then #f# is onto.

(B) If #f# is an onto mapping from set A to A , then #f# is one-one.

1 Answer
Apr 11, 2017

This is not true for infinite sets.


Counterexample 1:
Let #f(x) = e^x#, which is defined for all x #in# R.
Then f is one-to-one (with its inverse being the natural logarithm), but f is not onto; its range is the positive numbers.

Counterexample 2:
Let f be defined on the natural numbers as follows:
f(1) = 1.
For n > 1, f(n) = n - 1.
Then f(2) = f(1), so f is not one-to-one.
However, every natural number is in the image of the function, so f is onto.

For finite sets it is true that f is one-to-one if and only if f is onto.

Let | A | be the cardinality of the finite set, A, and let |f(A)| be the cardinality of the image of A under f.
Assume f is one-to-one. Then | A | = | f(A) |, by the definition of one-to-one. Since A is finite and #f(A) sube A#, we must have f(A) = A. Thus f is onto.

Assume instead that f is onto. Then for each a #in# A, there is at least one x #in# A such that f(x) = A. Since this is true for all A, then #| A | <= |f^(-1)(A)|#. Since A is finite we must have #| A | = |f^(-1)(A)|#. That is, f is one-to-one. Alternatively, if there were at least one pair, a and b, such that f(a) = f(b), then | f(A) | would be strictly less than A, so that f would not be onto.