Linear Algebra · Undergraduate

Diagonalization and Powers of a Matrix

Quick answer

A square matrix with n linearly independent eigenvectors can be written as A = PDP⁻¹, where the columns of P are the eigenvectors and D is the diagonal matrix of matching eigenvalues. In the coordinates given by the eigenvectors, A does nothing but scale each coordinate. That turns powers into a single step, Aᵏ = PDᵏP⁻¹, and explains long-run behavior: the largest eigenvalues dominate. Distinct eigenvalues guarantee diagonalizability; a repeated eigenvalue with too few eigenvectors prevents it.

What you'll learn

  • Diagonalize a matrix as A = PDP⁻¹
  • Compute powers of a matrix from its diagonalization
  • Decide whether a matrix is diagonalizable
  • Find the long-run state of a Markov chain

A matrix in its own coordinates

The matrix B=[4−211]B = \begin{bmatrix} 4 & -2\\ 1 & 1 \end{bmatrix} from the previous lesson has eigenvectors (1,1)(1, 1) for λ=2\lambda = 2 and (2,1)(2, 1) for λ=3\lambda = 3. Put the eigenvectors into the columns of PP and the eigenvalues, in the same order, on the diagonal of DD:

P=[1211]D=[2003]B=PDP−1P = \begin{bmatrix} 1 & 2\\ 1 & 1 \end{bmatrix} \qquad D = \begin{bmatrix} 2 & 0\\ 0 & 3 \end{bmatrix} \qquad B = PDP^{-1}

This is diagonalization. Read right to left, PDP−1xPDP^{-1}\mathbf{x} first finds the coordinates of x\mathbf{x} along the eigenvectors, then scales each coordinate by its eigenvalue, then assembles the result.

Why AP = PD

Column jj of APAP is AvjA\mathbf{v}_j, and column jj of PDPD is λjvj\lambda_j\mathbf{v}_j, since DD multiplies the jjth column of PP by λj\lambda_j. Those are equal exactly because vj\mathbf{v}_j is an eigenvector. So AP=PDAP = PD, and when the eigenvectors are independent, PP is invertible and A=PDP−1A = PDP^{-1}. Diagonalizing is the eigenvector equation written for all nn eigenvectors at once. It works exactly when there are nn independent eigenvectors to fill the columns of PP.

Two facts decide that:

  • nn distinct eigenvalues always give nn independent eigenvectors, so the matrix is diagonalizable.
  • A repeated eigenvalue is fine only if its eigenspace has as many dimensions as the number of times the eigenvalue repeats.

Powers in one step

Multiplying A=PDP−1A = PDP^{-1} by itself, the inner P−1PP^{-1}P pairs cancel:

Ak=PDP−1 PDP−1⋯PDP−1=PDkP−1A^k = PDP^{-1}\,PDP^{-1}\cdots PDP^{-1} = PD^kP^{-1}

and DkD^k is diagonal with entries λ1k,…,λnk\lambda_1^k, \ldots, \lambda_n^k. A hundredth power costs the same two multiplications as a square.

Worked examples

Common mistakes

Practice problems

  1. Diagonalize [3122]\begin{bmatrix} 3 & 1\\ 2 & 2 \end{bmatrix}.

    Answer

    P=[111−2]P = \begin{bmatrix} 1 & 1\\ 1 & -2 \end{bmatrix}, D=[4001]D = \begin{bmatrix} 4 & 0\\ 0 & 1 \end{bmatrix}

    Full solution

    The eigenvalues are 44 and 11, with eigenvectors (1,1)(1, 1) and (1,−2)(1, -2) from the previous lesson. Place them as columns in the same order as the eigenvalues.

  2. Is [2102]\begin{bmatrix} 2 & 1\\ 0 & 2 \end{bmatrix} diagonalizable?

    Answer

    No

    Full solution

    The eigenvalue 22 repeats, and A−2I=[0100]A - 2I = \begin{bmatrix} 0 & 1\\ 0 & 0 \end{bmatrix} gives only one independent eigenvector.

  3. Is [1203]\begin{bmatrix} 1 & 2\\ 0 & 3 \end{bmatrix} diagonalizable?

    Answer

    Yes

    Full solution

    Two distinct eigenvalues, 11 and 33, guarantee two independent eigenvectors.

  4. For B=[4−211]B = \begin{bmatrix} 4 & -2\\ 1 & 1 \end{bmatrix}, use the formula to find B2B^2, and check by multiplying.

    Answer

    [14−105−1]\begin{bmatrix} 14 & -10\\ 5 & -1 \end{bmatrix}

    Full solution

    With 22=42^2 = 4 and 32=93^2 = 9: −4+18=14-4 + 18 = 14, 8−18=−108 - 18 = -10, −4+9=5-4 + 9 = 5 and 8−9=−18 - 9 = -1. Multiplying BB by itself gives the same matrix.

  5. A=PDP−1A = PDP^{-1} with P=[1101]P = \begin{bmatrix} 1 & 1\\ 0 & 1 \end{bmatrix} and D=[1002]D = \begin{bmatrix} 1 & 0\\ 0 & 2 \end{bmatrix}. Find A3A^3.

    Answer

    [1708]\begin{bmatrix} 1 & 7\\ 0 & 8 \end{bmatrix}

    Full solution

    A3=PD3P−1A^3 = PD^3P^{-1} with D3=diag(1,8)D^3 = \text{diag}(1, 8) and P−1=[1−101]P^{-1} = \begin{bmatrix} 1 & -1\\ 0 & 1 \end{bmatrix}. Then PD3=[1808]PD^3 = \begin{bmatrix} 1 & 8\\ 0 & 8 \end{bmatrix}, and multiplying by P−1P^{-1} gives the answer.

  6. A 3×33 \times 3 matrix has eigenvalues 11, 22 and 22, and the eigenspace for 22 is a line. Is it diagonalizable?

    Answer

    No

    Full solution

    The eigenvalue 22 repeats twice but contributes only one independent eigenvector, so there are only two independent eigenvectors in all.

  7. A Markov chain has M=[0.80.30.20.7]M = \begin{bmatrix} 0.8 & 0.3\\ 0.2 & 0.7 \end{bmatrix}. Find its long-run state.

    Answer

    (0.6,0.4)(0.6, 0.4)

    Full solution

    M−I=[−0.20.30.2−0.3]M - I = \begin{bmatrix} -0.2 & 0.3\\ 0.2 & -0.3 \end{bmatrix} gives 2x1=3x22x_1 = 3x_2, so (3,2)(3, 2) is an eigenvector for 11. Scaled to add to 11, it is (0.6,0.4)(0.6, 0.4). The other eigenvalue is 0.50.5, whose contribution dies away.

  8. A=PDP−1A = PDP^{-1} with D=diag(2,3)D = \text{diag}(2, 3). Find det⁡A\det A.

    Answer

    66

    Full solution

    det⁡A=det⁡P⋅det⁡D⋅det⁡P−1=det⁡D=2⋅3\det A = \det P \cdot \det D \cdot \det P^{-1} = \det D = 2 \cdot 3.

  9. A=PDP−1A = PDP^{-1} with D=diag(1,0.5)D = \text{diag}(1, 0.5). What does AkA^k approach as kk grows?

    Answer

    P diag(1,0) P−1P\,\text{diag}(1, 0)\,P^{-1}

    Full solution

    Dk=diag(1,0.5k)D^k = \text{diag}(1, 0.5^k), and 0.5k→00.5^k \to 0. Only the eigenvector for 11 survives.

  10. A student says [1101]\begin{bmatrix} 1 & 1\\ 0 & 1 \end{bmatrix} is diagonalizable because it is triangular and its eigenvalues are on the diagonal. What went wrong?

    Hint

    Count independent eigenvectors.

    Answer

    It has only one independent eigenvector, so it is not diagonalizable.

    Full solution

    Triangular form gives the eigenvalues, here 11 twice. Diagonalizing needs two independent eigenvectors, and A−I=[0100]A - I = \begin{bmatrix} 0 & 1\\ 0 & 0 \end{bmatrix} has a one-dimensional null space.

Frequently asked questions

What does it mean to diagonalize a matrix?

To write A = PDP⁻¹ with D diagonal. The columns of P are eigenvectors of A, and the diagonal of D holds the matching eigenvalues in the same order.

When is a matrix diagonalizable?

When it has n linearly independent eigenvectors. An n × n matrix with n distinct eigenvalues always does.

Why does diagonalization help with powers?

Aᵏ = PDᵏP⁻¹, and a power of a diagonal matrix raises each diagonal entry to the kth power.

Is every matrix diagonalizable?

No. [[1, 1], [0, 1]] has the single eigenvalue 1 but only one independent eigenvector, so there are not enough columns for P.

What is the steady state of a Markov chain?

The eigenvector for eigenvalue 1, scaled so its entries add to 1. The chain approaches it because every other eigenvalue has size less than 1.

What to learn next