I have been preparing for my exam tomorrow and I just can't think of a function that is onto but not one-to-one.
I know an absolute function isn't one-to-one or onto. And an example of a one-to-one function that isn't onto is $f(n)=2n$ where $f:\mathbb{Z}\to\mathbb{Z}$.
Help?
For example, $\sin(x)$ from $\mathbb{R}$ to $[-1,1]$, $x^2$ from $\mathbb{R}$ to $\mathbb{R}_+$, or $x^3+5x^2+x+1$ from $\mathbb{R}$ to $\mathbb{R}$.