OLS formula is: $(X^TX)^{-1}X^TY$
Is correct that fully spelled-out formula is: $(X^TX)^{-1}(X^TY)$
(i.e. because $((X^TX)^{-1}X^T)Y$ is impossible.)
My calculation
$((X^TX)^{-1}X^T)Y$ seems impossible, if we add dimensions $$((X^T)_{m\times{n}}X_{n\times{m}})^{-1}(X^T)_{m\times{n}}Y_{n\times1} => A_{m\times{m}}(X^T)_{m\times{n}}Y_{n\times1}$$
$A_{m\times{m}}(X^T)_{m\times{n}}$ doesn't work, so there is implied parenthesis, to first do $(X^T)_{m\times{n}}Y_{n\times1}=B_{m\times1}$
- Is this correct?
- Is such implied order of matrix multiplication the norm?
The product of an $m\times m$ matrix with an $m\times n$ matrix is simply a $m\times n$ matrix - there's no problem here.
Furthermore, matrix multiplication is in general associative, so the parentheses are not necessary.