injective or surjective whats the difference?
Mathematics

Tutor: None Selected  Time limit: 0 Hours 
(a) What does it mean for a function to be injective (11)? (b) What does it mean for a function to be surjective (onto)? (c) Give an example of a function on the integers that is 11 but not onto. (d) Give an example of a function on the integers that is onto but not 11.
(a) A function f: X → Y is said to be injective (11) if f(x) = f(y) implies x = y for all x,y ϵ X,
or equivalently, x ≠ y implies f(x) ≠ f(y) for all x,y ϵ X.
(b) A function f: X → Y is said to be surjective (onto) if for all y ϵ Y, there exists x ϵ X such that f(x) = y.
(c) An example of a function f: Z → Z that is 11 but not onto is:
f(x) = 2x
It is easy to check that f is injective (11) since f(x) = f(y) implies 2x = 2y implies x = y. However, f is not surjective (onto) since if y is an odd integer, then there is no such x satisfying f(x) = y.
(d) We can construct a function f: Z → Z
that is onto but not 11 as follow:
f(x) = x for x < 0 (for example f(1) = 1, f(2) = 2, etc)
f(0) = 0
f(1) = 0
f(x) = x  1 for x > 1 (for example, f(2) = 1, f(3) = 2, f(4) = 3, etc)
It is obvious to check that for any y ϵ Z
, we can always find x ϵ Z
such that f(x) = y, so f is onto. However, f is not 11 because we have f(0) = f(1) but 0 ≠ 1.
*Z is denoted to be the set of integers. In question (c) and (d), we have that the domain X and the range Y of the function f are equal to Z.
Secure Information
Content will be erased after question is completed.