To prove,
$x'Ax=\mathrm{tr}(xAx')=\mathrm{tr}(Axx')=\mathrm{tr}(xx'A)$
where
- $A$ is a square matrix.
- $x'$ is the transpose of $x$.
- For each $x,x'$ are column vector, row vector.
2 Answers
$\begingroup$Hint: note that so long as $A$ and $B$ are compatible (that is, $A$ is $m \times n$ and $B$ is $n \times m$), we have trace$(AB) = $ trace$(BA)$, so that $$ \mathrm{tr}(x'(Ax)) = \mathrm{tr}((Ax)x') \\ \mathrm{tr}((xx')A) = \mathrm{tr}(A(xx')) $$ All you have to show then is that $x'Ax = \mathrm{tr}(x'Ax)$.
$\endgroup$ 4 $\begingroup$$$xAx'=\sum_{i=1}^{n}\sum_{j=1}^{n}x_{i}x_{j}a_{ij}=(x_{i}x_{j}) \cdot (a_{ij})=tr(xx'A)$$
$\endgroup$ 2