# Determine whether F is injective and surjective

Let $f:\mathbb{R} \to \mathbb{R}$ be a function. Determine whether or not f is injective and surjective where $f(x)=|x|$

So if i'm right, it is not injective and it is not surjective. For a proof, i'll do a counter example:

injective counter example: let $x=-1$ and $x=1,$ you will get $y=1$ meaning two x is mapped to one in the codomain.

surjective counter example: there is no $x$ which lets you obtain $y=-1$

anyone can verify?

• You are correct. Feb 21, 2015 at 22:50
• That's it. Good job. Feb 21, 2015 at 22:56

By definition, $f(x) \geq 0$, so your second counterexample is correct. So is your first,for obvious reasons. But it's interesting to note if we redefine the domain and range as follows: $f:\mathbb{R^{+}} -> \mathbb{R^{+}}$ where $R^{+} =\{x\in R | x\geq 0\}$ or $f:\mathbb{R^{-}} -> \mathbb{R^{-}}$ where $R^{-} =\{x\in R | x\leq 0\}$ . Then it's easy to show this is a bijection.
Not injective: $|-1|=|1|$ but $1\neq{-1}$.
Not surjective: the image $[0, \infty)$ is different to codomain $\mathbb{R}$.