2

Can anyone explain to me why the function $$ f(x)=|x| $$ is not surjective (onto)?

I think it should be, but my teacher told me it's not.

Lendion
  • 101
  • 1
    What value of $x$ will you put into $f(x)$ in order to get $-1$? – B. Goddard Jul 01 '17 at 12:42
  • 1
    What domain and range are you using for this function? I ask because if you are using domain $(-\infty,+\infty)$ and range $[0,\infty)$ then it is surjective. – Lee Mosher Jul 01 '17 at 13:44

3 Answers3

5

It depends on your definition of $f$. Consider $f : \mathbb R \to \mathbb R$ where $x \mapsto |x|$, this is certainly not surjective because every negative value $(-\infty, 0)$ is not mapped to by $f$.

Whereas one could define $f : \mathbb R \to [0, \infty)$, which would be surjective, but not injective.

Dando18
  • 5,368
3

$f \colon X \to Y$ is said to be onto if for each $y \in Y$, there exists $x \in X$ such that $f(x)=y$.

You have not specified the domain and codomain of the your function.

In fact, it is onto when you consider it as a function from $\mathbb R$ to $[0,\infty)$.

However, it is not onto when considered as a function from $\mathbb R$ to $\mathbb R$ as there does not exist a pre-image for any $x<0$.

Sahiba Arora
  • 10,847
0

hint

Assume $f $ is considered as function defined from $\mathbb R $ to $\mathbb R $.

$$\forall x\in\mathbb R \;\; f (x)=|x|\ge 0$$

$$\implies f (\mathbb R)\subset [0,+\infty)$$ $$\implies f (\mathbb R)\ne \mathbb R $$

$\implies \; f $ is not surjective.