# Injectivity and Surjectivity of a piecewise defined function

Let there be a function $f\colon\def\R{\mathbb R}\R \to \R$ given by $$f(x)= \begin{cases} 5x+2 &x\ge 1 \\ x-1 &x<1 \end{cases}, \qquad x \in \R.$$ Prove that $f$ is not surjective, also prove that $f$ is injective.

I can see that $f$ is not continuous, but how to prove that it is not surjective, and how to prove that it is injective?

-
7, it supposed to be 5x+2 for x=1 or x>1 – arieenhenk Oct 7 '13 at 14:47
OP: Please do not change the content of the question once you received answers. – Did Oct 7 '13 at 16:39

## 1 Answer

It is not surjective because there is no $x$ for which $y=f(x)=5$. That is, not every $y$ in the codomain gets mapped from some $x$.

It is injective because there is no $x$ for which $0\le y<7$, and if $y\ge 7$ then $x=\frac15 (y-2)$ while if $y<0$ then $x=y+1$. That is, for each $y$ there is at most one corresponding $x$ in the domain.

-
Could you help me with the notation of this prove? How do you notate that there is no x for which... I've only worked with, choose x∈R, but how do you notate 'there is no x'? – arieenhenk Oct 7 '13 at 19:54