# Thread: Proof of trace of product of vector and matrices

1. ## Proof of trace of product of vector and matrices

Hi, how can one prove the following identity?

$\mathrm{v^T} M^{-1} D M^{-1}\mathrm{v} = \mathrm{trace }\left( (M^{-1}\mathrm{v}) (M^{-1}\mathrm{v}) ^T D\right)$,

where $\mathrm{v}$ is a vector, $M$ is a positive definite and symmetric matrix, and $D$ is a symmetric matrix, and dimension is $n$.

2. ## Re: Proof of trace of product of vector and matrices

Use the fact that $v^TM^{-1}=(M^{-1}v)^T$ (because $M^{-1}$ is symmetric) and that $\operatorname{trace}(ABC)=\operatorname{trace}(CAB )$.

3. ## Re: Proof of trace of product of vector and matrices

Thank you, I got the identity now. We have to use also, in addition to the facts you mentioned, that the trace of a scalar equals the scalar, right? Thanks!
(Now that the question is solved, how can I mark the post as such? Thanks again)

4. ## Re: Proof of trace of product of vector and matrices

That's right.

(you can edit the title in the first post, and add "[Solved]" in)