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?