Counting diagonal matrices that satisfy a certain polynomial equation How many 3x3 diagonal matrices $A$ are there that satisfy $A^2-3A+2I=0$?
I know by factoring this equation that $A=2I$ and $A=I$ satisfy this equation but that answer is supposed to be eight. What are the other six matrices? 
 A: If the $3 \times 3$ diagonal matrix $A$ satisfies
$A^2 - 3A + 2I = 0, \tag{1}$
and we write $A$ as
$A = \begin{bmatrix} a_1 & 0 & 0 \\ 0 & a_2 & 0 \\ 0 & 0 & a_3 \end{bmatrix}, \tag{2}$
then it is easy to see that
$A^2 - 3A + 2 I = \begin{bmatrix} a_1^2 - 3a_1 + 2 & 0 & 0 \\ 0 & a_2^2 - 3a_2 + 2 & 0 \\ 0 & 0 & a_3^2 - 3a_3 + 2 \end{bmatrix} \tag{3}$
simply by performing the operations indicated in (1) on $A$ as in (2).  Thus, again by (1),
$a_i^2 - 3 a_i + 2 = 0, \; \; i = 1, 2, 3; \tag{4}$
the roots of the quadratic(s) in (4) are $a_i = 1, 2$.  Likewise, it easy to see that any diagonal $A$ with each $a_i \in \{ 1, 2 \}$ obeys (1).  Since there are two choices for each $a_i$ and three $a_i$, we have $2 \times 2 \times 2 = 2^3 = 8$ possible matrices, each having $1$ or $2$ in each diagonal position.
Hope this helps.  Cheers,
and as ever,
Fiat Lux!!!
A: The factorization $(A-2I)(A-I)$ is correct, but you've gone on to make the false assumption that this shows $A$ is either $I$ or $2I$. Since there are pairs of nonzero matrices that multiply to zero, this need not be the case. Diagonal $3\times 3$ matrices $B$ and $C$ have $BC=0$ exactly when for each $i=1,2,3$ at least one of $B_{ii},C_{ii}=0$. So you need to think of choices of $A$ that will make some entries of $A-2I$ zero, and some of $A-I$, but not all of either. Do you see how to do it?
