Take the 2-minute tour ×  I have this paragraph in the book I
cannot understand (this is not the first time I encounter this
thing but I usually move on).  $$A^\prime TA+A^\prime
QB+B^\prime UA+B^\prime RB = (A+T^{-1}QB)^\prime
T(A+T^{-1}QB)+B^\prime (R-UT^{-1}Q)B$$  I can do the calculus in
the reverse order, but I don’t know how is someone supposed to
figure out how to do it, and I don’t understand why such a
procedure is called “completing the squares”.  Can someone
please elaborate on that?  NOTE: prime stands for transpose and
those are all matrices.  share|improve this question Just
curious, what book are you using? –  Edison Jun 20 '11 at 20:07
Various: System Identification (Stoica), Estimation with
application to tracking and navigation (Li, Bar-Shalon)... – 
gurghet Jun 20 '11 at 21:03 add comment  1 Answer  up vote 4
down vote accepted  Completing the square for a quadratic
polynomial of the form $ax^{2}+2bxy+dy^{2}$ is given by $$ a\lef
t(x+\frac{b}{a}y\right)^{2}+\left(d-\frac{b^{2}}{a}\right)y^{2