# Given the Modulus Function $$f : R \to R$$, given by $$f(x) = |\;x\;|$$, where$$|\;x\;|\; is\; x$$, if $$x$$ is positive or $$0$$ and $$|\;x\;|\; is\;$$ $$-$$$$x$$, if $$x$$ is negative. Is $f$ one-one or onto?

Toolbox:
• A function $f: A \rightarrow B$ where for every $x1, x2 \in X, f(x1) = f(x2) \Rightarrow x1 = x2$ is called a one-one function.
• A function$f : X \rightarrow Y$ is said to be onto or surjective, if every element of Y is the image of some element of X under f, i.e., for every $y \in Y$, there exists an element x in X such that $f(x) = y$.
• |x| is always non negative
Given $f:R \rightarrow R$ defined by $f(x)= |x| = x$ if $x \geq 0$ and $-x$ if $x <0$:
We see that $f(-1)= |-1| = -1$, as $-1 <0$ and $f(1) = |1| = 1$ as $1 \geq 0$.
$\Rightarrow f(-1) = f(1) \rightarrow -1 \neq 1$.
Therefore, $f$ is not one-one.
Given $-1 \in R$ for $f$ to be onto, there must exist an element $x$ in R such that $f(x)=|x|=-1$
However, we know that $f(x) = |x|$ is always non-negative.
Therefore, there cannot be any element $x \in R$ such that $f(x) = |x| = -1$.
Hence $f$ is not onto.
Solution: The modulus function $f$ is neither one-one nor onto