Does this matrix multiplication property always apply?

38 Views Asked by At

I'm working on a derivation in a statistics textbook and came across the following formula, which I needed to simplify, and I'm wondering if there is a straight forward rule I could've applied.

I got to this point in my simplification: $$ E[(\textbf{y} - E\textbf{y})^TX[(X^TX)^{-1}]^T(X^TX)^{-1}X^T(\textbf{y}-E\textbf{y})] $$

I can see that this is essentially analogous to the univariate formula

$$ E[\frac{(y-Ey)^2x^2}{x^4}] $$

but since the " $x^2$ " matrix-equivalent term in the "numerator" is split on either side of the "denominator" (inverse matrices), I wasn't sure whether it's possible to simply state that they will multiply together with the "denominator" and cancel out (become an identity matrix).

After more work I was able to simplify the equation and get what I wanted, but I'm not sure whether I did extra work and this is a generally applicable rule.