# If $A$ and $B$ are similar matrices, then the matrices $p(A)$ and $p(B)$ are similar?

$p$ can be any polynomial and the matrices are square matrices

Now I know that by the Cayley–Hamilton theorem any matrice A satisfies it's characteristic polynomial and I feel that the key to the proof lies there, but not sure how to capitalize on it.

My guess is since $A$ and $B$ are similar they have the same $p(\lambda)$ so doesn't that imply (by what was stated earlier) that the matrices $p(A)$ and $p(B)$ are similar?

• What do you mean by "are of quadratic form" ? That they are symmetric ? – Jean Marie Jan 26 '17 at 13:07
• I mean that their dimension is n x n – adadaae12313412 Jan 26 '17 at 13:15
• I understand ! Instead of quadratic, you should use the term "square". – Jean Marie Jan 26 '17 at 13:19

Let $p(x) = \sum_{k=0}^n a_kx^k$.

If $A, B$ are similar, there is an invertible $S$ such that $B = SAS^{-1}$.

Let $p(A) = P$.

What is $p(B)$ ?

$$p(B) = \sum_{k=0}^n a_kB^k = \sum_{k=0}^n a_k(SAS^{-1})^k = \\ \sum_{k=0}^n a_kSA^kS^{-1} = S\left(\sum_{k=0}^n a_kA^k\right)S^{-1} = Sp(A)S^{-1} = SPS^{-1}$$

and the matrices are similar.

• This doesn't answer the question. p is any polynomial. – Igor D. Jan 26 '17 at 13:04
• @IgorD. I had written $0$ instead of $P$ by mistake. Corrected it now. – RGS Jan 26 '17 at 13:08

$A$ is similar to $B$, i.e., there exists $T$ non singular matrix such that $$A = T^{-1}BT.$$ Let $p(\lambda) = a_n \lambda^n + \dots + a_1 \lambda + a_0.$ Thus $$\begin{array}[rcl]~p(A) &=& a_n A^n + \dots + a_1 A + a_0 I \\ &=& a_n (T^{-1}BT)^n + \dots + a_1 T^{-1}BT + a_0 T^{-1}T \\ &=& a_n T^{-1}B^nT + \dots + a_1 T^{-1}BT + a_0 T^{-1}T \\ &=& T^{-1}\bigg( a_n B^n + \dots + a_1 B + a_0 I \bigg) T \\ &=& T^{-1}p(B) T. \end{array}$$ Hence $p(B)$ and $p(A)$ are also similar.

• The usage of $\lambda$ here may be misleading, given that one usually uses it as a letter for the eigenvalues, and not for the independent variable of a generic polynomial. – RGS Jan 26 '17 at 13:10
• Inexperienced mathematicians may become confused because of that. – RGS Jan 26 '17 at 13:10
• I see your point! But I tried to use the same notation used in the question. – Igor D. Jan 26 '17 at 13:12
• Yes, but the $p(\lambda)$ the OP talks about is the characteristic polynomial, not a generic one. And the characteristic polynomial is often written using $\lambda$ as the variable. Thus, your polynomial may be mistaken by a characteristic polynomial of some matrix. – RGS Jan 26 '17 at 13:15