Recipe
Compute A^k by diagonalization
Use when: you have (or can find) A=PDP^{-1} and need A^k for some integer k, rather than multiplying A by itself k times
Goal: A^k, computed as PD^kP^{-1} at a cost that doesn't grow with k
Taught in Powers of a matrix by diagonalization · extends Diagonalize a matrix
Quick recipe
-
1
If you don't already have P, D, and P^{-1}, find them exactly as in the diagonalize-a-matrix recipe: the eigenvalues, a matching eigenvector for each, checked for independence, assembled into P and D in the same column order, then P^{-1}.
Example
For A = \begin{bmatrix} 4 & -1 \\ 2 & 1 \end{bmatrix}: the eigenvalues are \lambda_1=3, \lambda_2=2, giving D=\begin{bmatrix}3&0\\0&2\end{bmatrix}, with matching eigenvectors assembled into P=\begin{bmatrix}1&1\\1&2\end{bmatrix} and P^{-1}=\begin{bmatrix}2&-1\\-1&1\end{bmatrix}.
Why: A^k=PD^kP^{-1} only holds once A=PDP^{-1} actually does, so this step's work is identical to the diagonalize-a-matrix recipe's own output.
-
2
Because D is diagonal, D^k just raises every diagonal entry to the k-th power — no cross terms, no matrix multiplication needed.
Example
D^4 = \begin{bmatrix} 3^4 & 0 \\ 0 & 2^4 \end{bmatrix} = \begin{bmatrix} 81 & 0 \\ 0 & 16 \end{bmatrix}- k is a positive integer — raise each diagonal entry directly.
- k is negative and every eigenvalue is nonzero — A is invertible; reciprocate each entry (or raise it to the negative power) the same way.
Why: this is the entire reason diagonalization helps here — a diagonal matrix's k-th power costs nothing more than exponentiating n plain numbers, unlike repeated multiplication of the full matrix A.
-
3
Multiply P, D^k, and P^{-1} together in that order — it's most efficient to compute D^kP^{-1} first, then left-multiply the result by P.
Example
D^4P^{-1} = \begin{bmatrix} 81 & 0 \\ 0 & 16 \end{bmatrix}\begin{bmatrix} 2 & -1 \\ -1 & 1 \end{bmatrix} = \begin{bmatrix} 162 & -81 \\ -16 & 16 \end{bmatrix}, \qquad A^4 = \begin{bmatrix} 1 & 1 \\ 1 & 2 \end{bmatrix}\begin{bmatrix} 162 & -81 \\ -16 & 16 \end{bmatrix} = \begin{bmatrix} 146 & -65 \\ 130 & -49 \end{bmatrix}Why: this is exactly the identity A^k=(PDP^{-1})^k=PD^kP^{-1}, every interior P^{-1}P pair having already telescoped away.
-
4
Add the diagonal entries of the computed A^k and confirm the sum equals \lambda_1^k+\cdots+\lambda_n^k.
Example
\operatorname{tr}(A^4) = 146+(-49)=97, and \lambda_1^4+\lambda_2^4 = 81+16=97 — the two match.
Why: the trace of a power always equals the sum of the eigenvalues raised to that power, catching an arithmetic slip in the matrix multiplication without redoing the whole computation.
Common mistakes
- Raising A itself to the k-th power somewhere in the arithmetic instead of raising only D's diagonal entries.
- Multiplying in the wrong order, e.g. P^{-1}D^kP, which doesn't telescope back to A^k.
- Trying a negative power when one eigenvalue is 0 — a matrix with a zero eigenvalue isn't invertible, so no negative power of it exists.
- Skipping diagonalization entirely and assuming this shortcut applies to any matrix — it requires A to actually be diagonalizable first.