Let D be an n x n diagonal matrix whose diagonal entries are either 0 or 1
a) Show that D is idempotent
b) Show that if X is a nonsingular matrix and A=XD(X)-1 , then A is idempotent
The Attempt at a Solution
a) I tried it, and it works for a specific matrix, say 3x3... but I don't know if it's really a proof.
I need to show that
b) I solved this part
is (AB)2= A2*B2