How would I find the inverse of the function $f(x)=|x|-2$? I have swapped $x$ and $y$, and tried to isolate $y$, reaching up to $x+2=|y|$
Whenever I see absolute values, I always break the problem up into cases.
Case $1$: $y\ge 0$, $|y|=y$
$y=x+2$
Case $2$: $y<0$, $|y|=-y$
$-y=x+2$
$\implies y=-x-2$
It doesn't seem right that I get two answers... Am I supposed to combine the two into one piecewise function like:
$$f^{-1}(x)=\begin{cases}x+2, \ x\ge 0 \\ -x-2, \ x<0 \\ \end{cases}$$
Any hints on how to do this?
Also, just to clarify, my homework assignment asks me to "Graph the inverse of $f(x)=|x|-2$"

A function is defined on a domain, or a set of inputs. When you talk about a function, you have to talk about its domain and its codomain, or the set the function outputs come from. If we have a function $f$, and sets $A$ and $B$, we write the function $f$ from $A$ to $B$ as
$$ f:A\to B $$
where $f(x)=|x|-2$.
In this case, the implied domain of your original function is $\mathbf{R}$, or the set of all real numbers. We would write that as
$$ f:\mathbf{R}\to \mathbf{R} $$
This function, as Sam said, is not one-to-one, which means that there are outputs which are values at more than one input. As Sam said, this means the function is noninvertible on this domain.
However, as you noticed, if you look at two domains separately ($x \geq 0$ and $x<0$), you can easily find an inverse. Let's define a function g as follows:
$$ g:[0,\infty)\to [-2,\infty) $$
where $g(x)=f(x)$ for all $x\in [0,\infty)$. While $f$ was noninvertible, as you figured out, $g$ is invertible, and
$$ g^{-1}:[-2,\infty)\to [0,\infty) $$
is given by $g^{-1}(x)=x+2$. We can do a similar thing for the rest of the domain.