How prove that $\text{rank}(X) = r \implies \text{rank}(X(X^TX)^{-1}X^T) = r$

100 Views Asked by At

Apparently, for a projection matrix $P := X(X^TX)^{-1}X^T$, $$\text{rank}(P)= \text{rank}(X)$$ How can this property be proved?

2

There are 2 best solutions below

5
On BEST ANSWER

One issue is that the field is not specified though this is the Hat Matrix from stats so we infer the field is $\mathbb R$ and we should also infer that $X$ is injective (all columns linearly independent).

A nice way of proving this: observe that $P^2=P\implies P$ it is diagonalizable with all eigenvalues being 0 or 1

Alternatively if OP wants to avoid minimal polynomials we can also observe $P=P^T$ so it is diagonalizable and for eigenvector $\mathbf x$
$\lambda^2 \mathbf x = P^2\mathbf x = P\mathbf x = \lambda \mathbf x\implies \lambda^2-\lambda = 0$ i.e. $\lambda \in\{0,1\}$

Thus we have $$ \begin{align} \text{rank}\big(P\big) &=\text{trace}\big(P\big) \\ &= \text{trace}\big(X (X^TX)^{-1}X^T\big) \\ &=\text{trace}\big(X^TX (X^TX)^{-1}\big) \\ &=\text{trace}\big(I_r\big) \\ &= r \\ &=\text{rank}\big(I_r\big) \\ &=\text{rank}\big(X^TX (X^TX)^{-1}\big) \\ &=\text{rank}\big(X^TX \big) \\ &= \text{rank}\big(X \big) \\ \end{align} $$

0
On

Given a linear map $f:V\rightarrow W$, we can compose $f$ with a quotient map $q:W\rightarrow$im$(f)\subseteq W$. Then, it is clear that $q$ has the same rank as $f$ since im$(f)=$im$(q)$. There are many quotient maps with the property that im$(f)=$im$(q)$. Can you show that $q=X(X^TX)\mid_{im(X^T)}^{-1}X^T$ satisfies this property?