Determine whether f(n) = n^2 is a one-to-one fn and whether it maps Z onto Z. Z is the set of all integers. Prove the answer.
-
It is not one to one because f(-1) = f(1) = 1.
It is not onto because there is no integer n for which f(n) = -1 (that is, -1 has no integer square root).
QED
It is not onto because there is no integer n for which f(n) = -1 (that is, -1 has no integer square root).
QED