Decomposition of the product of matrices

31 Views Asked by At

I have been studying multiple regression recently and $\hat{\beta}$ is derived as $(\mathbf{X}^\top \mathbf{X})^{-1}\mathbf{X}^\top$ where $\mathbf{X}$ is an any matrix. What is wrong if I simplify $\hat{\beta}$ as $(\mathbf{X}^\top \mathbf{X})^{-1}\mathbf{X}^\top$ = $\mathbf{X}^{-1}(\mathbf{X}^\top)^{-1}\mathbf{X}^\top$ = $\mathbf{X}^{-1}$? Thank you.

1

There are 1 best solutions below

1
On

$X$ and $X^T$ need not be square matrices and hence their inverse are not defined.

However, you are right that if $X$ is invertible and you are solving the system

$$X\hat{\beta} = y,$$

then we have

$$\hat{\beta} = X^{-1}y.$$