[Math] Prove that this is one-one, but not onto $\Bbb R$.

algebra-precalculusfunctions

$\Bbb R$ stands for real numbers.

$ f(x) =
\begin{cases}
2-x, & \text{if $x \le 1 \qquad \text{is one to one but not onto } \Bbb R $ } \\
\frac{1}{x} , & \text{if $x >1$ }
\end{cases}$

I know how to prove that this is one to one by saying that an element in the domain maps too exactly one element in the range set.

$x\le1 \;\Rightarrow \; f(x) = f(y) \Rightarrow \; 2-x =2-y \Rightarrow x=y$

$x>1\Rightarrow$ $\frac{1}{x} = \frac{1}{y} \Rightarrow x=y$

We can say from this that this is one-one. I am having trouble understanding why this is not onto. I know that $0 \notin \Bbb x$. This is where I get lost. I know that a function is onto if every element in the range set has a preimage is the domain set. I am just not too sure what that means in applying to this problem.

Best Answer

It is not onto because the value of the function is always above zero. Thus, for example, $0\in\mathbb{R}$ but there is no $x\in\mathbb{R}$ such that $f(x)=0$.

To elaborate on Andre's comment, you need to add this to complete your proof that $f$ is one-to-one: For any $x\leq 1$ and $y>1$, $$f(x)=2-x\geq 1>\frac{1}{y}=f(y).$$

Related Question