I wanted to find the maximum likelihood estimator for $\mathbf{\Sigma}$ in the multivariate gaussian.
I was anticipating the solution would be a bit involved and messy, if not 'brute-forced', but I was surprised to find an elegant and clever shortcut known as the trace trick.
For a vector $\mathbf{x}$ and a matrix $\mathbf{A}$, $\mathbf{x}^T\mathbf{Ax} = tr (\mathbf{x}^T\mathbf{Ax}) = tr (\mathbf{xx}^T\mathbf{A}) = tr (\mathbf{Axx}^T)$.
I am not sure how this can be true. Any insight/rough sketch of proof would be great.