Show that $X^T X = \sum_{i=1}^n \mathbf{x}_i \mathbf{x}_i^T$

727 Views Asked by At

Referring to this post: https://stats.stackexchange.com/questions/164223/proof-of-loocv-formula

The line which says $\sum_{t=1}^TX_t'X_t=X'X$ is the result I'm trying to interpret.

Or in perhaps more standard notation:

Question. Prove that $ X^{T} X = \sum_{i=1}^{n} \mathbf{x}_i \mathbf{x}_i^T $ where $ \mathbf{x}_i $ is the $ i^{th} $ row of a matrix $ X $ (as a column vector).

If someone could please explain why this is true, it would be very helpful. I'm not quite sure how I would come up with this "decomposition" of $X^T X$.

1

There are 1 best solutions below

0
On BEST ANSWER

With implicit summation over indices,$$(X^TX)_{jk}=X^T_{ji}X_{ik}=(x_i)_j(x_i)_k=(x_ix_i^T)_{jk}.$$