The given function f:R→R is defined by f( x )=| x |.
A function f:X→Y is one-one or injective if for every x 1 , x 2 ∈X,f( x 1 )=f( x 2 ) implies, x 1 = x 2 .
Assume x 1 =−2 and x 2 =2.
f( −2 )=| −2 | =2 f( 2 )=| 2 | =2
So, f( x 1 )=f( x 2 ), but x 1 ≠ x 2 .
Thus, f is not one-one.
A function f:X→Y is onto or surjective, if for every y∈Y, there exists an element in X such that, f( x )=y.
For −2∈R, there does not exist any x in R such that,
f( x )=−2
Therefore, f is not onto.
Thus, the modulus function f:R→R, defined by f(x)=| x | is neither one-one nor onto.