When introducing the ideas of one-to-one and onto to my students, I like to begin with some
simple pictures so they can "see" what's going on. For example,
Draw a nice little picture of an onto function (the one I've drawn isn't one-to-one). Then add some more dots in the codomain and voila! It's not onto anymore. Draw a few pictures to illustrate one-to-one as well. To picture inverse functions draw a one-to-one, onto function and then "flip" all of the arrows and you've got the inverse.
Draw a bunch of pictures adding and deleting points to make functions one-to-one and/or onto or not.
Next, I'd play around with the example: $f(x)=x^2$.
1) $f: \mathbb{R} \to \mathbb{R}$ is neither one-to-one or onto.
Why? Showing something fails to be onto is simple, merely find something in the codomain
that doesn't get "hit". So for example $-1$ is not in the range. When we try to solve
the equation $f(x)=x^2=-1$, the only solutions we get are $x = \pm \sqrt{-1}$
(which fail to be in our domain). So nothing maps to $-1$. Thus it's not in the range so
not onto.
2) Then ask, "How could we 'fix' the function so it is onto?"
$f: \mathbb{R} \to \mathbb{R}_{\geq 0} = [0,\infty)$. Now the equation $f(x)=x^2=y$
can always be solved: $x = \pm \sqrt{y}$ (which are real since $y \geq 0$.
Next, note that there are two solutions for each (non-zero) $y$. So the function isn't one-to-one.
3) How can we "fix" $f$ again so that it's one-to-one?
$f: [0,\infty) \to [0,\infty)$
Now $f(x)=f(y)$ so $x^2=y^2$ implies that $x=y$.
4) So finally, $f: [0,\infty) \to [0,\infty)$ defined by $f(x)=x^2$ is bijective (one-to-one and onto). How can we find an inverse? Go back to what N.S. suggests: it's all about solving for "x" given the equation $y=x^2$. We solve $x=\pm \sqrt{y}$ remembering that we're only allowed non-negative solutions $x=\sqrt{y}$. So $f^{-1}:[0,\infty) \to [0,\infty)$ is defined by $f^{-1}(x)=\sqrt{x}$.
Make sure to check $f(f^{-1}(x))=(\sqrt{x})^2=x$ (the inverse works on the right because $f$ is onto) and $f^{-1}(f(x))=\sqrt{x^2}=x$ (the inverse works on the left because $f$ is one-to-one).
I hope this gives you a few ideas to help get started. :)
Best Answer
Draw a line through the origin, $y=mx$, and mark the point $(1,m)$. Rotate the drawing by a quarter turn and observe that the point is now at $(-m,1)$.
Old slope: $m$, new slope: $-\frac1m$.