Proof: let n-order square matrix a satisfy a ^ 2 = a, and prove that the eigenvalue of a is 1 or 0

Proof: let n-order square matrix a satisfy a ^ 2 = a, and prove that the eigenvalue of a is 1 or 0


Let a be the eigenvalue of matrix A and X be the corresponding nonzero eigenvector
Then AX = ax
aX = AX = A^2X = A(AX) = A(aX) = aAX = a(aX) = a^2X,
(a^2 - a)X = 0,
Because x is a nonzero vector, so
0 = a^2 - a = a(a-1),
A = 0 or 1