(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'm really sorry this is last minute for asking for a thorough explanation, but I just got back from the hospital and my homework that I was supposed to do is a lot, so it would be really great if someone could try and do this quickly :(
thank you so much in advance!! <3