TeX source:
\text{tr}(\langle\psi|\mathbf{A}|\psi\rangle) = \text{tr}(\mathbf{A}|\psi\rangle\langle\psi|)