Science:Math Exam Resources/Courses/MATH220/April 2011/Question 09 (b)/Solution 1

From UBC Wiki

We showed in part (a) that the function g will always be surjective, this question asks us to give an example to illustrate why the function f doesn't have to be necessarily.

For example, consider the case where the set A is all the natural numbers including zero: A={ 0, 1, 2, ... } and the set B is all the integers: B = { ..., -2, -1, 0, 1, 2, ... }. Now the function f just maps a natural number to itself, so

and the function g maps an integer to its absolute value, so

Then the function is clearly surjective since it takes a natural number back to itself. That is, for all .

But the function f isn't surjective since it doesn't map to any negative integer (no negative number has a pre-image under the function f). Notice that as shown in part (a) the function g is, and has to be, surjective.