How do I expand this equation? (reading a telemetry positioning paper) Question
I'm a biologist reading a paper on telemetry positioning.  While I understand the conceptual premise of the method I'm reading and I can implement the resulting equations in my code and use it, I want to be able to derive the equations the authors present on my own to verify my understanding... and also to just get better at linear algebra.
I'm stuck at one particular expansion in the paper.  It seems like it should be straight forward, but I have no idea why I can't figure it out.  I'm hoping someone can show me how the author substituted (1) into (2), resulting in the quadratic equation shown in (3).
$$\tag{1} x = \frac{1}{2}M^{-1} \left( \Delta -2R_sd \right)$$
$$\tag{2} R_s = \left( x^T x \right)^\frac{1}{2}$$
where $\Delta$, $d$, $x$ are column vectors of length 3 and $M$ is a 3x3 matrix.
By substitution and expansion, the author gets to this result which is a quadratic equation with respect to $R_s$:
$$
\tag{3} 0 = 
R_s^2 \left[4 - 4d^T \left( M^{-1}  \right)^T  M^{-1} d \right] + 
R_s \left[ 2d^T \left( M^{-1} \right)^T M^{-1} \Delta +2\Delta^T \left(M^{-1} \right)^T M^{-1} d  \right] - 
\left[ \Delta^T \left( M^{-1} \right)^T M^{-1} \Delta \right]
$$
I'd appreciate it if someone could show the intermediate steps to get from (1) & (2) to (3).  I'm completely clueless as to how to do this.  My problem is that I don't know if I'm a) messing up some pretty basic operations, or if b) there are some linear algebra methods that I'm not yet aware of required to carry out the expansion.
References

*

*Schau, H. C., Robinson, A. Z.  1987. Passive Source Localisation Employing Intersecting Spherical Surfaces from Time-of-Arrival Differences. IEEE transactions on acoustics, speech, and signal processing.  35(8):1223-1225

 A: Note first that $(AB)^T=B^TA^T,(A+B)^T=A^T+B^T$, where $T$ denotes the transpose of a matrix. Also in an algebra, one can freely move the scalars, for example $a(AB)=A(aB)$ if $a$ is a scalar, i.e. something like a number. In the given question, $R_s$ is a scalar, since it is a square root of a nonnegative number. (Note that for any column vector $v$, $v^Tv$ is basically the same as $v\cdot v\geq 0$, the dot product of $v$ with itself. The square root of this represents the length of this vector.)
Given the above notions, the rest is done by multiplication using the distributive property:
$$R_s^2=x^Tx=\left(\frac 12 M^{-1}(\Delta-2R_sd)\right)^T\left(\frac 12M^{-1}(\Delta-2R_sd)\right),$$ which implies
$$4R_s^2=(\Delta-2R_sd)^T(M^{-1})^TM^{-1}(\Delta-2R_sd)$$
$$=(\Delta^T-2R_sd^T)((M^{-1})^TM^{-1}\Delta-2R_s(M^{-1})^TM^{-1}d)$$
$$=\Delta^T(M^{-1})^TM^{-1}\Delta-2R_s\Delta^T(M^{-1})^TM^{-1}d-2R_sd^T(M^{-1})^TM^{-1}\Delta+4R_s^2d^T(M^{-1})^TM^{-1}d$$
Subtracting the last term from the first term and group in descending order as quadratic polynomial in $R_s$, one has
$$R_s^2(4-4d^T(M^{-1})^TM^{-1}d)+R_s(2\Delta^T(M^{-1})^TM^{-1}d+2d^T(M^{-1})^TM^{-1}\Delta)-\Delta^T(M^{-1})^TM^{-1}\Delta=0.$$ This is the same as the required result, because addition is commutative.
Hope this helps.
