Choosing the right sign for inverse functions?

If I have to find an inverse function and through the algebra I get a $\pm$ sign how do I know which one to choose from if its in a given interval? For example a question asks:

The function $\left(\frac1{x^2}\right)$ is a one to one function on the interval $(0,\infty$) Find a formula for the inverse function on that domain. Sketch the graph of both functions from $0 < x < 4$

So I found the inverse function by doing this...

$$y = \left(\frac1{x^2}\right)$$ $$x^2 = \left(\frac1y\right)$$ $$x = \pm\left(\frac1{\sqrt{y}}\right)$$ $$y = \pm\left(\frac1{\sqrt{x}}\right)$$

So now I have two inverse equations? How do I know which one to use?

• This is not one-one function, as image of $1$ and $-1$ are same – Bhaskar Vashishth Jun 30 '15 at 4:29
• It is stated that it is a one to one function from the interval 0 to infinity – Panthy Jun 30 '15 at 4:30
• The range of the inverse function is the domain of the original function. – Jonas Meyer Jun 30 '15 at 4:31
• oh oh the domain is $(0,\infty)$, it is one-one in it – Bhaskar Vashishth Jun 30 '15 at 4:31
• The inverse function is the first one (third line). Notice that as $x \to 0$, we see that $y \to \infty$. Similarly, as $x \to \infty$, we have $y \to 0$. What can you deduce from this? Remember that the interval of $x$ is $(0,\infty)$. Try to sketch the function if this was confusing. – Meshal Jun 30 '15 at 4:33

Now since it is bijective on $(0, \infty)$, the inverse exists. Notice that $x>0$, so $x=\frac{1}{\sqrt{y}}$.
As Jonas Meyer noted in a comment, when you apply the inverse function the result has to be in the original function's domain. Since $-\frac{1}{\sqrt y} \not\in (0, \infty),$ that cannot be the correct answer, and there's only one possible answer remaining.
In order to prove that that the only possible remaining answer actually is an answer, you must show that the proposed inverse function is defined everywhere in its domain; in this case it must be defined on $(0,\infty).$ You can do this by showing that the original function is bijective (as explained in mich95's answer).
(Note that $y = \pm\left(\frac1{\sqrt{x}}\right)$ is not equivalent to any of the other equations and should not even be listed here.)