Question

Show that the function ( f: R rightarrow R: f(x)=|x| ) is neither one-one nor onto.
Solution

We have ( f(-1)=|-1|=1 ) and ( f(1)=|1|=1 ) Thus, two different elements in ( R ) have the same image. ( therefore f ) is not one-one. If we consider -1 in the codomain ( R, ) then it is clear that there is no real number ( x ) whose modulus is -1.
Thus, ( -1 in R ) has no pre-image in ( R ).
( therefore f ) is not onto. Hence, ( f ) is neither one-one nor onto.