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?

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}$.
