I was going through the solution for least square linear regression that comes out to be $$ w_{ls} = {(X^TX)}^{-1} X^Ty $$
Now, this exist when ${(X^TX)}^{-1}$ exist, which means ${(X^TX)}$ is invertible. Now I know that a matrix is invertible when its full rank or its determinant is non zero.
Intuitively speaking it exists when the matrix M is not squishing the space into lower dimension.
Now the derivation i am going through claims that ${(X^TX)}$ is full rank when, when the $n * d$ matrix X, has at least d linearly independent rows?
I know ${(X^TX)}$ should have all linearly independent columns for the inverse to exist , but how do we proceed to show that X should have at least d linearly independent rows?