# How to calculate the diagonal matrix

The question says: find the eigenvalues and corresponding eigenvectors of the matrix $A$. This I could do. But then it says: hence find a non-singular matrix $P$ and a diagonal matrix $D$ such that $A + A^2 + A^3 = PDP^{-1}$ , where $$A =\begin{pmatrix} 6 & 4 & 1 \\ -6 & -1 & 3 \\ 8 & 8 & 4 \\ \end{pmatrix}$$

The eigenvalues are $-1, 2, 8$ with corresponding eigenvectors $\begin{pmatrix} 4 \\ -9 \\ 8 \\ \end{pmatrix}$, $\begin{pmatrix} 5 \\ -6 \\ 4 \\ \end{pmatrix}$, $\begin{pmatrix} 1 \\ 0 \\ 2 \\ \end{pmatrix}$

I cannot calculate $A + A^2 + A^3$ numerically, so how can I do this?

• The eigenvectors of $A$ that you have are also eigenvectors of $B=A+A^2+A^3$, and you can easily compute the corresponding eigenvalues. You have a basis of $\mathbb R^3$ consisting of eigenvectors of $B$. Let $S$ be the matrix whose columns are these three eigenvectors. Check (without doing it numerically) that $BS=S\Lambda$, where $\Lambda$ is the diagonal matrix whose entries are the eigenvalues of $B$. – Andrés E. Caicedo Mar 30 '14 at 2:26
• You can use the Cayley-Hamilton theorem to simplify $A+A^2+A^3$. By noting that the characteristic polynomial p(A) = 0. – Mussé Redi Mar 30 '14 at 2:27

Let $A,D,X \in \mathbb C^{n,n}$, $D$ diagonal, $X$ non-singular. Let $\vec x_i$ be i-th column of $X$ and $\lambda_i$ i-th diagonal entry of $D$. Hopefully you can see that if $A = XDX^{-1} \leftrightarrow AX=XD$, that is to say $A$ and $D$ are similar, $A\vec x_i = \lambda_i \vec x_i$ from the way matrix multiplication is defined. It follows that columns of $X$ are the eigenvectors of $A$ and diagonal entries of $D$ are the eigenvalues of $A$.
If you let $A+A^2+A^3 = B = PDP^{-1}$, then the eigenvectors of $B$ are the same as of $A$, eigenvalues of $B$ are therefore $-1, 14, 584$. So
$P = \begin{pmatrix} 4 & 5 & 1 \\ -9 & -6 & 0 \\ 8 & 4 & 2 \\ \end{pmatrix}$ and $D = \begin{pmatrix} -1 & 0 & 0 \\ 0 & 14 & 0 \\ 0 & 0 & 584 \\ \end{pmatrix}$.
You can find $Q$ such that $A=QDQ^{-1}$ with $D$ diagonal, right? Then show that $$A+A^2+A^3=Q(D+D^2+D^3)Q^{-1}$$