Trace of positive definite matrix trick

269 Views Asked by At

I’m reading a paper and came across the following simplification

$$ \text{tr}(A^TBA) = \sum_{i}a_i^TBa_i $$

For a positive definite matrix $AA^T$ and orthonormal matrix $B$. Would anyone kindly show how this is the case?

1

There are 1 best solutions below

1
On BEST ANSWER

$$\begin{split}\text{tr}(A^TBA)&=\text{tr}(\begin{pmatrix}a_1&...&a_n\end{pmatrix}^T B\begin{pmatrix}a_1&...&a_n\end{pmatrix})\\ &=\text{tr}(\begin{pmatrix}a_1^T\\ \vdots\\a_n^T\end{pmatrix}\begin{pmatrix}b_1&...&b_n\end{pmatrix}\begin{pmatrix}a_1&...&a_n\end{pmatrix})\\ &=\text{tr}\begin{pmatrix}a_1^Tb_1&...&a_1^Tb_n\\ \vdots&\ddots&\vdots\\ a_n^Tb_1&...&a_n^Tb_n\end{pmatrix}\begin{pmatrix}a_1&...&a_n\end{pmatrix}\\ &=\text{tr}\left(\begin{pmatrix}(a_1^Tb_1...a_1^Tb_n)a_1&...&(a_1^Tb_1...a_1^Tb_n)a_n\\ \vdots&\ddots&\vdots\\(a_n^Tb_1...a_n^Tb_n)a_1&...&(a_n^Tb_1...a_n^Tb_n)a_n\end{pmatrix}\right)\\ &=\sum a_i^TBa_i\end{split}$$