# 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?

$\displaystyle \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 $\displaystyle \mathrm{v}$ is a vector, $\displaystyle M$ is a positive definite and symmetric matrix, and $\displaystyle D$ is a symmetric matrix, and dimension is $\displaystyle n$.

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

Use the fact that $\displaystyle v^TM^{-1}=(M^{-1}v)^T$ (because $\displaystyle M^{-1}$ is symmetric) and that $\displaystyle \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)