# how to compute the matrix polynomial

Let $$A$$ be the matrix $$A = \begin{pmatrix} 1 & \sqrt{2}\\ -\sqrt{2} & -1\\ \end{pmatrix}$$

Compute the matrix $$B = 3A -2A^2 - A^3 -5A^4 + A^6$$.

Could any one give me any hint for this one? I have calculated the eigenvalues they are $$(1+\sqrt{2}i),(1-\sqrt{2}i)$$

• hint: compute directly $A^2$. – Raymond Manzoni Dec 18 '12 at 14:22
• Find a matrix $P$ to diagonalize the matrix. You can then easily add up the diagonialized matrices and then use $P^{-1}$. Or, you can just brute force it! – Zach L. Dec 18 '12 at 14:29

We have the characteristic polynomial $ch_A(x)=\begin{vmatrix}1-x&\sqrt{2}\\-\sqrt{2}&1-x\end{vmatrix}=(x-1)^2+2=x^2-2x+3$.
Then by Cayley-Hamilton theorem we know that $A^2-2A+3=0$.
So if you divide your polynomial $p(x)$ by $(x^2-2x+3)$ and you get $p(x)=q(x)(x^2-2x+3)+r(x)$, you only need to calculate $r(A)$, i.e., to plug the matrix $A$ into the remainder.
In general if $A$ is similar to $C$ with $A=P^{-1}CP$ for some invertible $P$ then for any polynomial $\phi(x)$: $$\phi(A)=P^{-1}\phi(C)P.$$ In your case use that $A$ is similar to $\begin{pmatrix}1+\sqrt{2}&0\\0&1-\sqrt{2}\end{pmatrix}$.