Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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|cite|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
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\left(x+\frac{b}{a}y\right)^{2}+\left(d-\frac{b^{2}}{a}\right)y^{2}.$$

If $A$ and $D$ are symmetric square matrices, and $B$ is $n \times m$, then

$$ \left[ {\begin{array}{cc} x \\ y \\ \end{array} } \right]^T \left[ {\begin{array}{cc} A & B \\ B^T & D \\ \end{array} } \right] \left[ {\begin{array}{cc} x \\ y \\ \end{array} } \right] = \left(x+A^{-1}By\right)^{T}A\left(x+A^{-1}By\right)+y^{T}\left(D-BA^{-1}B\right)y $$
Note that the left hand side of your equation can be written as

$$ \left[ {\begin{array}{cc} A^T & B^T \\ \end{array} } \right] \left[ {\begin{array}{cc} T & Q \\ U & R \\ \end{array} } \right] \left[ {\begin{array}{cc} A \\ B \\ \end{array} } \right]. $$

Hope this helps.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.