It is well-known and can easily be proven that if a matrix $A$ is idempotent, then its trace equals its rank:
$$
A^2 = A \Rightarrow \mathrm{tr}(A) = \mathrm{rk}(A)
$$
Does the inverse also hold? If yes, how can this be proven?
idempotentslinear algebramatricesmatrix-ranktrace
It is well-known and can easily be proven that if a matrix $A$ is idempotent, then its trace equals its rank:
$$
A^2 = A \Rightarrow \mathrm{tr}(A) = \mathrm{rk}(A)
$$
Does the inverse also hold? If yes, how can this be proven?
Best Answer
The trace is linear, so we can achieve any desired value by simply multiplying $A$ by some scalar as long as $\operatorname{tr}(A)≠0$. For instance, $\widetilde{A}≔\tfrac{\operatorname{rk(A)}}{\operatorname{tr}(A)}A$ trivially satisfies $\operatorname{tr}(\widetilde{A}) = \operatorname{rk}(\widetilde{A})$.