# Given $AX = XD$, where $D$ is a diagonal matrix and $A$ is idempotent, is $D$ idempotent as well?

$D$ is a diagonal matrix of eigenvalues and $X$ is a matrix of eigenvectors. Does $AA = A$ make $DD = D$? If so, how can you show that this is true?

-

## migrated from stats.stackexchange.comOct 29 '11 at 20:04

This question came from our site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.

I could be mistaken, but this sounds a little bit like homework. If it is, please be so kind as to add the homework tag. :) –  cardinal Oct 29 '11 at 19:13
Hint: $A(XD) = A(AX) = AX$, so letting $B = AX$ we have $BD = B$ with $D$ being diagonal. Now think about what relationship between the $i$th column of the left-hand side and the $i$th column on the right-hand side must be. (And, be careful not to arrive at *too* strong of a conclusion about $D$ either.) –  cardinal Oct 29 '11 at 19:49
no it's not hw, just something i was wondering about –  Beatrice Oct 30 '11 at 9:41
Were you able to reach a conclusion with the hint and answer I gave? –  cardinal Oct 30 '11 at 11:44
yup, i got the answer i was looking for, thanks! –  Beatrice Oct 30 '11 at 18:34

Hint: $\newcommand{\m}{\mathbf} \m A(\m X \m D) = \m A (\m A\m X) = \m A \m X$, so letting $\m B = \m A \m X$ we have $\m B \m D= \m B$ with $\m D$ being diagonal. Now think about what the relationship between the $i$th column of the left-hand side and the $i$th column of the right-hand side must be. (And, be careful not to arrive at too strong of a conclusion about $\m D$ either.)
Alternatively, and maybe simpler, break down your original matrix relation columnwise. That is, if $\m x_i$ is the $i$th column of $\m X$ and $\lambda_i$ is the corresponding eigenvalue of $\m A$, then
$$\lambda_i \m x_i = \m A \m x_i = \m A^2 \m x_i = \m A (\m A \m x_i) = \m A (\lambda_i \m x_i) = \lambda_i (\m A \m x_i) \> \ldots$$