0
$\begingroup$

I'm an econometrics student and I'm having a little trouble with lineal algebra.

I have seen that the OLS estimator, given the following regression in matrix form: $$ y=X \beta+u $$ Is: $$ \hat{\beta}=\left(X^{\prime} X\right)^{-1} X^{\prime} y $$ But, at the same time, using some matrix properties: $$ (A . B)^{-1}=B^{-1} \cdot A^{-1} $$ I'm arriving to the following result: $$ X^{-1}\left(X^{\prime}\right)^{-1} X^{\prime} y=X^{-1} I_{n} y=X^{-1} y $$ This isn't right and I know it, but where is the problem?

Thank you in advance.

$\endgroup$
2
  • 3
    $\begingroup$ Your reasoning works only in the special case where $X$ is invertible (i.e. it's square and has full rank). In general, $X^{-1}$ doesn't exist. For example, the number of data points typically differs from the number of features, so $X$ isn't square. $\endgroup$
    – user20160
    Commented Jul 31, 2021 at 17:46
  • $\begingroup$ Oh ok, i didn't check that, thanks! $\endgroup$
    – Nacho
    Commented Jul 31, 2021 at 23:00

1 Answer 1

0
$\begingroup$

The matrix property you use is only true when X is non-singular. Non-singular means that the determinant is non-zero. A matrix can only have a determinant if it is square. In least squares problems you will almost never have a square X matrix since you usually have more observations than explanatory variables. If your number of observations is less than or equal to the number of explanatory variables, then you should be using penalized regression instead of OLS.

$\endgroup$
1
  • $\begingroup$ Yeah, understood, thank you! $\endgroup$
    – Nacho
    Commented Jul 31, 2021 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.