Compute \mathrm{A}^{m} for \mathrm{A}=\left(\begin{array}{rrr}1 & 1 & -2 \\ -1 & 2 & 1 \\ 0 & 1 & -1\end{array}\right).
The characteristic equation of \mathrm{A} is -\lambda^{3}+2 \lambda^{2}+\lambda-2=0 or \lambda^{3}=-2+\lambda+2 \lambda^{2}, and the eigenvalues are \lambda_{1}=-1, \lambda_{2}=1, and \lambda_{3}=2. From the preceding discussion we know that the same coefficients hold in both of the following equations:
\mathrm{A}^{m}=c_{0} \mathrm{I}+c_{1} \mathrm{A}+c_{2} \mathrm{A}^{2} \quad \text { and } \quad \lambda^{m}=c_{0}+c_{1} \lambda+c_{2} \lambda^{2}. (7)
Setting, in turn, \lambda=-1, \lambda=1, \lambda=2 in the last equation generates three equations in three unknowns:
\begin{aligned} (-1)^{m} & =c_{0}-c_{1}+c_{2} \\ 1 & =c_{0}+c_{1}+c_{2} \\ 2^{m} & =c_{0}+2 c_{1}+4 c_{2}. \end{aligned} (8)
Solving (8) gives
\begin{aligned} & c_{0}=\frac{1}{3}\left[3+(-1)^{m}-2^{m}\right], \\ & c_{1}=2\left[1-(-1)^{m}\right], \\ & c_{2}=\frac{1}{6}\left[-3+(-1)^{m}+2^{m+1}\right]. \end{aligned}
After computing \mathrm{A}^{2}, we substitute these coefficients into the first equation of (7) and simplify the entries of the resulting matrix. The result is
\mathrm{A}^{m}=\left(\begin{array}{ccc} \frac{1}{6}\left[9-2^{m+1}-(-1)^{m}\right] & \frac{1}{3}\left[2^{m}-(-1)^{m}\right] & \frac{1}{6}\left[-9+2^{m+1}+7(-1)^{m}\right] \\ 1-2^{m} & 2^{m} & 2^{m}-1 \\ \frac{1}{6}\left[3-2^{m+1}-(-1)^{m}\right] & \frac{1}{3}\left[2^{m}-(-1)^{m}\right] & \frac{1}{6}\left[-3+2^{m+1}+7(-1)^{m}\right] \end{array}\right).
For example, with m=10,
\mathrm{A}^{10}=\left(\begin{array}{rrr} -340 & 341 & 341 \\ -1023 & 1024 & 1023 \\ -341 & 341 & 342 \end{array}\right).