Let matrices $A, B \in \mathbb{R}^{n \times n}$ be positive semidefinite (PSD). Let $B = V V^T$, where $V \in \mathbb{R}^{n \times n}$. Why does the last equality hold in the following?
$$ \mbox{tr} (A B) = \mbox{tr} \left(A V V^T\right) = \mbox{tr} \left(V^T A V\right)$$
That's due to the cyclic property of the trace operator: $$\operatorname{tr}(\mathbf{A}\mathbf{B}\mathbf{C}\mathbf{D}) = \operatorname{tr}(\mathbf{B}\mathbf{C}\mathbf{D}\mathbf{A}) = \operatorname{tr}(\mathbf{C}\mathbf{D}\mathbf{A}\mathbf{B}) = \operatorname{tr}(\mathbf{D}\mathbf{A}\mathbf{B}\mathbf{C}).$$