I am struggling with this problem:
(a) Let \(f : (-\infty,0) \cup (0,\infty) \to \mathbb{R}\) be defined by \(f(x) = x - \frac{1}{x}.\) Show that \(f\) has no inverse function.
(b) Let \(g : (0,\infty) \to \mathbb{R}\) be defined by \(g(x) = x - \frac{1}{x}.\) Show that \(g\) has an inverse function.
I don't know where to start. So far, I've tried graphing these two functions and using the horizontal line test but I'm not confident with my answer.
Help would be appreciated.