If \(A\) is a complex nxn matrix with \(A^2=A\), then rank\(A\)=trace\(A\).
What are the eigenvalues of \(A\)? What is trace in terms of eigenvalues?
If \(v\) is an eigenvector of \(A\) with eigenvalue \(\lambda\) then \(Av=\lambda v\), therefore \(\lambda v=Av=A^2v=\lambda Av =\lambda^2 v\). Therefore, since any eigenvector is non-zero, \(\lambda =0 or 1 \).
Sum of eigenvalues is trace of the matrix. So, trace\(A\)= number of non-zero eigenvalues= total number of eigenvalues – number of 0 eigenvalues
Since \(A\) satisfies the polynomial \(x^2-x\), the minimal polynomial is either \(x\) or \(x-1\) or \(x(x-1)\). This means the minimal polynomial breaks into distinct linear factors, so \(A\) is diagonalizable. Therefore, the algebraic multiplicity of an eigenvalue is same as its geometric multiplicity.
In total there are n eigenvalues (for A is nxn) and the number of 0-eigenvalues is the algebraic multiplicity of 0, which is same as the geometric multiplicity of 0, i.e, the dimension of the kernel of A.
By the rank-nullity theorem, the right hand side of the above equation is rank\(A\).