# How do I prove this equality holds? If A is similar to a diagonal matrix with diagonal $a_1,…,a_n$ then $(A-a_1I)(A-a_2I)…(A-a_nI)=0$

I'm not quite sure how to prove whats written in the title. We have a field $$F$$ and a matrix $$A$$ that is similar to the diagonal matrix $$D=\operatorname{diag}(a_1,...,a_n)=\begin{bmatrix} a_1& 0 &0&. . .& 0 \\ 0& a_2 &0&...&0 \\ . \\. \\.\\0&0&0 &...&a_n\end{bmatrix}$$
I need to show that $$(A-a_1I) \cdot (A-a_2I) \cdot ... \cdot (A-a_nI)=0$$.
I tried this for long time but I am not sure how to do this. I know there is a matrix $$P$$ such that $$A=P^{-1}DP$$, but I'm not sure how that helps. It was written that it is enough to prove this for n=2 (n is the number of rows and columns of A) and I was able to do this for n=2 but I don't know how that helps me to prove this generally. If anyone can provide any help (I'd love to get some hints first, and only then the full solution if I'm still stuck), It will help me a lot. Thanks!
**All I know about similar matrices is that there exists $$P$$ such that $$A=P^{-1}BP$$, so the solution should be quite basic, using that fact only.

• Hint: Prove that similar matrices has the same characteristic polynomial and the fact a matrix satisfies its own characteristic polynomial. – dezdichado Dec 28 '18 at 21:01
• @dezdichado Hi, I haven't learnt about characterisitc polynomial yet, all I know about similar matrices is that there exists P such that A=P^-1*B*P, and that's it. They said in the question that it is enough to show this for n=2 and than explain how that also implies it for all values of n. sorry for not mentioning that, I'll edit my post now. – Omer Dec 28 '18 at 21:07

Hint:

First check that $$\;A-\alpha I=P^{-1}DP-\alpha I=P^{-1}(D-\alpha I)P$$.

Second, check that $$\;(D-\alpha_1I)(D-\alpha_2I)\dots(D-\alpha_nI)=0$$

Prove that if $$p(x)=c_0+c_1x+\dots+c^kx^k$$ is a polynomial and $$p(B)=c_0I_n+c_1B+\dots+c_kB^k=0$$ (briefly, $$B$$ satisfies $$p$$) then also $$p(A)=0$$, whenever $$A$$ is similar to $$B$$.

Next prove that $$D=\operatorname{diag}(a_1,\dots,a_n)$$ (the diagonal matrix with the given elements on the diagonal) satisfies $$p(x)=(x-a_1)(x-a_2)\dots(x-a_n)$$.

Hint: PT $$A= P^{-1}\begin{bmatrix} a_1 & & \\ &a_2 & \\ & & \ddots \\ \end{bmatrix}P\implies A-a_{1}I= P^{-1}\begin{bmatrix} 0 & & \\ &a_{2}-a_{1} & \\ & & \ddots \end{bmatrix}P$$

then multiply all the $$A-a_{i}I$$.

Let $$P$$ be as in the OP and let $$e_k$$; $$k=1,2,\ldots, n$$ denote the vector such that the $$k$$-th component is 1 and every other component is 0.

Fact 1: Then on the one hand, the $$P^{-1}e_k$$s span $$\mathbb{F}^n$$, so if there is a matrix $$B$$ such that $$B(P^{-1}e_k)$$ is 0 for all $$k$$, then $$B$$ must be the 0 matrix.

[Make sure you see why Fact 1 is true.]

On the other hand, $$A(P^{-1} e_k) = P^{-1}DP (P^{-1}e_k) = P^{-1}D(PP^{-1})e_k$$ $$= P^{-1}De_k = P^{-1} a_ke_k = a_kP^{-1}e_k$$. Thus $$(A-a_kI)(P^{-1}e_k) = 0$$ for each such $$k$$.

This implies $$[\prod_{l=1}^n (A-a_lI)](P^{-1}e_k) = 0$$ for each such $$k$$. This and Fact 1 implies $$[\prod_l (A-a_lI)]$$ is the 0 matrix.