[Math] Rank = trace for idempotent nonsymmetric matrices

linear algebramatricesmatrix-ranktrace

If $A$ is idempotent and symmetric, one can show that the rank of $A$ equals its trace. Is such equality preserved in general if we only know that $A$ is idempotent and not necessarily symmetric?

Best Answer

If $A^2=A$ then $A$ is the identity on the image of $A$ (and of course zero on the kernel), hence with respect to a suitable basis, $A$ has $\operatorname{rank}A$ ones and otherwise zeroes on the diagonal, so $\operatorname{rank}A=\operatorname{tr}A$