Rank = trace for idempotent nonsymmetric matrices 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?

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$
