Two Identities Involving Trace

144 Views Asked by At

Let $x$ by a $p \times 1$ vector and $M$, $Q$ be two $p\times p$ matrix. Then it is claimed that $$ \mbox{trace }\left( M^{-1}xx^TM^{-1} \right) = \left\| M^{-1}x \right\|^2, $$ and $$ \mbox{trace }\left( M^{-1}xx^TM^{-1}QM^{-1} + M^{-1}QM^{-1}xx^TM^{-1} \right) = 2 \left( M^{-1}x \right)^TM^{-1}Q M^{-1}x. $$ Could anyone explain how to derive these two formulas, please? Thank you!

1

There are 1 best solutions below

2
On BEST ANSWER

For the first formula, we have $$ \DeclareMathOperator{\tr}{trace} \tr[(M^{-1}x)(x^TM^{-1})] = \tr[(x^TM^{-1})(M^{-1}x)] = x^TM^{-1}M^{-1}x $$ If $M$ is symmetric, we can rewrite the above as $$ x^TM^{-1}M^{-1}x = (M^{-1}x)^T(M^{-1}x) = \|M^{-1}x\|^2 $$ For the next part (assuming both $M$ and $Q$ are symmetric), we're meant to use the same trick: $$ \tr \left[ (M^{-1}x)(x^TM^{-1}QM^{-1}) + (M^{-1}QM^{-1}x)(x^TM^{-1}) \right] =\\ \tr \left[ (M^{-1}x)(M^{-1}QM^{-1} x)^T + (M^{-1}QM^{-1}x)(M^{-1} x)^T \right] =\\ (M^{-1}QM^{-1}x)^T(M^{-1}x) + (M^{-1}x)^T(M^{-1}QM^{-1}x) $$