Consider a collection of $T$ vectors $x_t \in \mathbb{R}^m$, and $y_t \in \mathbb{R}^n$. We also have matrices $C \in \mathbb{R}^{m \times n}, R \in \mathbb{R}^{m \times m}$.
I cannot follow why the following identity is true:
$\displaystyle\sum_{t=1}^T x'_t R^{-1} x_t - y_t' C' R^{-1} x_t = \text{Tr} \left( \left[ \displaystyle\sum_{t=1}^T x_tx_t' - x_t y_t' C' \right] * R^{-1} \right)$
Where did the trace come from? I think it is using the fact that an inner product is the trace of an outer product but I'd like to be able to show this algebraically? Specifically, I'd like to include a couple of lines of working between the left and right hand sides of the above identity.
Thanks.
Edit: index notation attempt
$(x'_t) _a R^{-1}_{ab} (x_t) _b = (x_t x_t') _{ba} R^{-1}_{ab}$ which is a trace since summed over both indices, right?