4
$\begingroup$

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.

$\endgroup$
9
$\begingroup$

The first equality is just using the fact that $x^TAx$ is a real number, so when seen as a $1\times 1$ matrix, it's equal to its trace!

The other equalities use the fact that $tr(AB)=tr(BA)$.

$\endgroup$
  • 1
    $\begingroup$ To clarify for the asker: this means that $$ \operatorname{trace}([x^TA][x]) = \operatorname{trace}([x][x^TA]) $$ $\endgroup$ – Omnomnomnom Apr 27 '16 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.