If $\mathbf{x} \in R^n,M \in R^{n \times n}$,and trace(.) is the sum of the diagonal elements of a matrix,whether the above conclusion is hold,if so,how to prove,thanks in advance
Asked
Active
Viewed 52 times
-1
-
$x^T M x$ is a scalar, and $xx^T M$ is a matrix – thewatcher Mar 09 '22 at 05:12
-
1@thewatcher doesn't matter. the trace is scalar – Golden_Ratio Mar 09 '22 at 05:14
-
Quick beginner guide for asking a well-received question + please avoid "no clue" questions, and type your question inside the body on your post, not only (and not even necessarily) in the title. – Anne Bauval May 23 '23 at 12:48
-
Multiduplicate: How to prove $\operatorname{Tr}(AB) = \operatorname{Tr}(BA)$?. Simply apply this to the two matrices $A=x\in\Bbb R^{n\times1}$ and $B=x^TM\in\Bbb R^{1\times n}.$ – Anne Bauval May 23 '23 at 12:58
1 Answers
1
Correct. More generally, the trace is invariant to cyclic permutations:
$$Tr(ABC)=Tr(BCA)=Tr(CAB).$$
You can prove this using the regular trace identity
$$Tr(XY)=Tr(YX),$$
and let $X=AB,Y=C$ or let $X=A,Y=BC.$
Golden_Ratio
- 12,591
-
-
@TiantianHe Of course, a vector is just an $n\times 1$ matrix. The identity is true so long as the matrices are conformable (i.e. their products are well defined) – Golden_Ratio Mar 09 '22 at 05:18