rearrange matrix equation $s = a^tB^{-1}a$ I have an equation like this:
$s = a^tB^{-1}a$. 
$s$ is a scalar, $a$ is a vector, and $B$ is a length($a$) by length($a$) square matrix. Furthermore $B$ is symmetric and positive semidefinite (it is a covariance matrix). Here is an example: $$\pmatrix{1.0&0.2&0.3\cr0.2&1.0&0.2\cr0.3&0.2&1.0\cr}$$
The quantity $a^ta$ is of interest to me (it is a scalar called the energy). I would like to rearrange the equation so that I have: 
$a^ta= ???$
Can somebody please fill in the right hand side, if this is even possible?
Thanks very much for any help.
 A: I think it's impossible to get the accurate number of $a^{t}a$, but we can get the range of $a^{t}a$. For specific issues, you can see that more clear.
By calculation, we know that $B$ is positive definite, so is $B^{-1}$.
If $s<0$, there is not solution for $a$, in other words, there is no $a$ s.t. $s=a^{t}B^{-1}a$.
If $s=0$, there have the unique trivial solution.
So we can only deal with the case $s>0$.
By calculation, we can get the three eigenvalues of $B$ is $(0<)\frac{7}{10}<\frac{23-\sqrt{41}}{20}<\frac{23+\sqrt{41}}{20}$, denoted them by $\lambda_{1}<\lambda_{2}<\lambda_{3}$.
As $B$ is positive definite, there exist some orthogonal matrix $U$ ($U^{-1}=U^{t}$) such that 
$$U^{-1}BU=\pmatrix{\lambda_{1}&0&0\cr0&\lambda_{2}&0\cr0&0&\lambda_{3}\cr}$$
$$U^{-1}B^{-1}U=\pmatrix{\frac{1}{\lambda_{1}}&0&0\cr0&\frac{1}{\lambda_{2}}&0\cr0&0&\frac{1}{\lambda_{3}}\cr}$$
Then $a^{t}B^{-1}a=s$ equivelent to $a^{t}U(U^{-1}B^{-1}U)U^{t}a=s$ and our work is to calculate $a^{t}a=a^{t}UU^{t}a$.
Set $U^{t}a=\pmatrix{x&y&z\cr}^{t}$, then $\frac{x^{2}}{\lambda_{1}}+\frac{y^{2}}{\lambda_{2}}+\frac{z^{2}}{\lambda_{3}}=s$ and $a^{t}a=x^{2}+y^{2}+z^{2}$, so $\lambda_{1}s\leq a^{t}a\leq\lambda_{3}s$, i.e. $\frac{7}{10}s\leq a^{t}a\leq\frac{23+\sqrt{41}}{20}s$
A: The eigenvalues of $B$ are $u=\frac7{10}$ and $v,w=\frac{23\pm\sqrt{41}}{20}$, numerically $u=.7$, $v=1.47$ and $w=.83$.
Hence $uI\leqslant B\leqslant vI$, $v^{-1}I\leqslant B^{-1}\leqslant u^{-1}I$, $v^{-1}a^ta\leqslant s\leqslant u^{-1}a^ta$ since $s=a^tB^{-1}a$, and $us\leqslant a^ta\leqslant vs$ for every nonnegative $s$, that is $\frac7{10}s\leqslant a^ta\leqslant\frac{23+\sqrt{41}}{20}s$. 
Cases $a^ta=\frac7{10}s$ and $a^ta=\frac{23+\sqrt{41}}{20}s$ can occur, as well as $a^ta=xs$ for every $\frac7{10}\leqslant x\leqslant\frac{23+\sqrt{41}}{20}$. 
If $s\lt0$, there is no solution.
