In my statistics classes it was stated that if an $n\times n$ matrix $A$ has $k$ zero eigenvalues, we have $\text{rank}(A) = n-k$. Is there any straightforward proof of this? Are there any limitations on the matrix needing to be symmetric?
From the relations $\det(A) = \prod_i \lambda_i$ and $\text{rank}(A) < n \leftrightarrow \det(A) = 0$, I understand that one zero eigenvalue must imply that the rank of $A$ is deficient. But in case of several zeros, why must the number of them equal the number of ranks lost?