Existence of an inverse function when the domain is restricted. Okay, so I just want to confirm something that's been bugging me with regards to inverse functions. 
We know that a function $f^{-1}$ is the inverse of $f$ if 


*

*$ \forall x \in \operatorname{Dom}(f), f^{-1}[f(x)]=x $

*$ \forall x \in \operatorname{Dom}(f^{-1}), f[f^{-1}(x)]=x$


Also, the domain of $f$ is the range of $f^{-1}$ and the range of $f$ is the domain of $f^{-1}$.
So am I right in saying that $f(x)=\frac{1}{4}x^2$ where $ x \leq 0$ has no inverse? 
Normally I'd say that $f^{-1}(x)= \pm 2\sqrt{x}$
But the domain of $f$ is $x\leq 0$ therefore the range of $f^{-1}$ is $\leq 0$
So $f^{-1}(x)= - 2\sqrt{x}$ will satisfy this condition
However we now have that $f[f^{-1}(x)]=f[-2\sqrt{x}]=\frac{1}{4}(-2\sqrt{x})^2=x$
BUT
$f^{-1}[f(x)]=f^{-1}[\frac{1}{4}x^2]=-2\sqrt{\frac{1}{4}x^2}=-x \ne x$  
Am I right in saying that this $f(x)$ indeed has no inverse?
 A: Notice that 
$$f^{-1} \left[ \frac14 x^2\right] = -2 \sqrt{\frac14x^2}=-2 \cdot \frac12 \color{blue}{|x|}=-\color{blue}{|x|}=x$$
A: There is a slight misunderstanding about invertible functions.
A function $f:A \to B$ can be thought of as relations $f \subseteq A \times B$ with the special property
$$\text{$(x,a) \in f$ and $(x, b) \in f$ implies $a=b$}$$
The inverse of $f$ is defined as 
$f^{-1} = \{(y,x) : (x,y) \in f \} \subseteq B \times A$, and it always exists; but it is not always a function. A function is invertible if its inverse is also a function.
For the function
\begin{array}{cclc}
f: & (-\infty, \infty) &\to &[0, \infty) \\
   & x &\mapsto &\frac 14x^2
\end{array}
$f^{-1}$ is not a function since $(\frac 14x^2, x) \in f^{-1}$ and 
$(\frac 14x^2, -x)  \in f^{-1}$.
For the function
\begin{array}{cclc}
f: & [0, \infty) &\to &[0, \infty) \\
   & x &\mapsto &\frac 14x^2
\end{array}
$f^{-1}$ is a function and  $f^{-1}(y) = 2 \sqrt y$.
For the function
\begin{array}{cclc}
f: & (-\infty, 0] &\to &[0, \infty) \\
   & x &\mapsto &\frac 14x^2
\end{array}
$f^{-1}$ is a function and  $f^{-1}(y) = -2 \sqrt y$.
