Inverse function of $x^2-4$ The function $h$ is defined by $$h(x)=x^2-4$$. for $$x\leq0$$
Find an expression for $h^{-1}(x)$
My attempt, 
Let $h^{-1}(x)=a$
$x=h(a)$
$x=a^2-4$
$a=\sqrt{x+4}$
$h^{-1}(x)=\sqrt{x+4}$
Am I wrong? Is the answer $-\sqrt{x+4}$?
 A: Other answers have already correctly addressed it, but just for the sake of having another point of view, here's how I'd run through an example when I used to teach it.
We're given:
$$ h(x) = x^2 - 4, \qquad x \le 0 $$
Replace $h(x)$ with $y$:
$$ y = x^2 - 4, \qquad x \le 0 $$
Swap all $x$ and $y$, including in the restriction:
$$ x = y^2 - 4, \qquad y \le 0 $$
Notice now we have $y \le 0$ since we swapped $x$ and $y$ in the restriction!
The next step is to solve for $y$ in the equation:
\begin{align}
  x &= y^2 - 4\\
  x+4 &= y^2\\
  \sqrt{x+4} &= \sqrt{y^2}\\
  \sqrt{x+4} &= |y|\\
  \pm \sqrt{x+4} &= y
\end{align}
As others have pointed out, we must be careful and remember that $\sqrt{y^2} = |y|$ in general.  The very last equality above, i.e., $y = \pm\sqrt{x+4}$, follows from the definition of absolute value.
So now the question is, which root do we take?  The positive or negative root?  Well, remember our restriction earlier.  It says $y \le 0$.  Therefore we must take the negative root:  $y = -\sqrt{x+4}$.  So we have:
$$ y = -\sqrt{x+4}, \qquad y \le 0 $$
Finally, replace $y$ with $h^{-1}(x)$ to get the final result:
$$h^{-1}(x) = -\sqrt{x+4}, \qquad h^{-1}(x) \le 0$$
Notice how the domain of $h(x)$ and range of $h^{-1}(x)$ are the same, as we would expect.  They're both  $(-\infty, 0]$ in interval notation.
A: There is a misstep in your procedure. 
$y = x^2 - 4 \implies x^2 = y + 4\implies \sqrt{x^2} = \sqrt{y+4}$
Note that $\sqrt x^2 = x$ but $\sqrt{x^2} \neq x$ in general. Actually, $\sqrt{x^2} = |x|$, and combined with $|x| = -x$ for $x\leq 0$ we have
$-x = \sqrt{y+4}\implies x=-\sqrt{y+4}\implies h^{-1}(x) = -\sqrt{x+4}$
Quick check gives us
$h(h^{-1}(x)) = h(-\sqrt{x+4})= (-\sqrt{x+4})^2 - 4 = x + 4 - 4 = x$
$h^{-1}(h(x)) = h^{-1}(x^2 - 4) = -\sqrt{x^2-4 + 4} = -\sqrt{x^2} = - |x| = x\quad (x\leq 0)$
A: Suppose 
$$\;x\le 0\;,\;\;y=x^2-4\implies x^2=y+4\implies-x=\sqrt{y+4}\iff x=-\sqrt{y+4}$$
Observe this only applies whenever $\;y\ge-4\;$, which is fine since 
$$x\le 0\implies y=x^2-4\ge-4\;,\;\;\text{since}\;\;x^2\ge0$$
So your answer is correct, and perhaps with this explanation now you can justify it better.
A: I think that the main confusion you have is whether you should take the positive or negative function. In this case an easy thing to do would be to visualize the graph. Notice that the graph is U-shaped and you only wish to take the 'left side' of it. And you also know that the inverse is a reflection across $y = x$. Then you have an idea that the reflection of the 'left arm' will be below the x-axis. And so it is $-\sqrt{x + 4}$ instead of the positive.
Furthermore note that in saying $h(a)$ you imply that $a \le 0 $ and it follows that when you take square roots of $a^2 = x + 4$ you need to keep in mind this restriction, so it has to be $-\sqrt{x+ 4}$
A: $h^{-1}=-\sqrt{x+4}$ but the domain of $h^{-1}$ is the image of $h$, ie, $[-4,+\infty)$.
