[Math] Test for Onto function

functionsproof-explanation

My textbook shows that $f:\Bbb R \to \Bbb R:3-4x$ is an onto function in the following way:

Let,$$y=3-4x.$$
Then,$$x=\frac{(3-y)}{4}$$
Thus,for each $y\in \Bbb R$ (codomain of f) there exists $x=\frac{(3-y)}{4}\in \Bbb R$ such that
$f(x)=f(\frac{(3-y)}{4})=3-(3-y)=y$.

This shows that the every element in the codomain of $f$ has its pre
image in dom$(f)$.That is why, the function is onto.


Now, I try to use the same method(without understanding it) to prove that $f(x)=|x|$ is not an onto function.

$$y=|x|$$If $x>0$ $$y=x$$ If $x<0$ $$y=-x$$……

Now, I can't claim that

thus,for each $y\in \Bbb R$ (codomain of f) there exists $x$….


I come to the conclusion that the only way I can be sure that the particular function is not /is an onto function only by knowing the properties of the function itself.

So, my question is whether the mathematics('method') shown in the book actually proves that the given function is onto or is it some kind of test for onto function.If it is, how?

Best Answer

You may be misunderstanding the method. It's not $x$, but rather $y$ that's given. You have to construct an $x$ with the property that $f(x)$ yields the given value of $y$. For your example, you can do this if and only if the specified $y$ satisfies $y\geq 0$.

The reason is that if $y\geq0$, then you can note that plugging that same value into the function yields the specified $y$: $f(y) = |y|=y$ (because you already know $y$ is not negative). In other words, you may construct $x=y$. Of course, you could also construct another value (namely, $-y$) which also yields $y$: $f(-y) = |-y|=y$ (because you know that since $y$ is nonnegative, then $-y$ is nonpositive, so its absolute value is its opposite $-(-y)\equiv y$).

This shows that at least all nonnegative values are realized as function values.

On the other hand, you can show that no negative value is realized as a function value in a similar way. If $y<0$, then there can be no $x$ with $|x|=y$ (because the left side is nonnegative but the right side is negative).

So in the end you have shown that the image of $f$ is $[0,\infty)$, so $f$ is "onto" if you take the domain and range as $f:\mathbb R\to [0,\infty)$. If you expand the range, the function will no longer be an "onto" function.

Does this make sense?

Related Question