(I) Introduction and Powers of Matrices

Definition

A diagonal matrix is a matrix where all non-diagonal entries are zero:

\[ D = \begin{bmatrix} \lambda_1 & 0 & \dots & 0 \\ 0 & \lambda_2 & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & \lambda_n \end{bmatrix} \]

A square matrix \(A\) is diagonalizable if \(A\) is similar to a diagonal matrix \(D\). That is, \(A = PDP^{-1}\) for some invertible matrix \(P\).

It is easy to compute powers of a diagonal matrix. For example:

\[ \begin{bmatrix} 5 & 0 \\ 0 & 3 \end{bmatrix}^2 = \begin{bmatrix} 5^2 & 0 \\ 0 & 3^2 \end{bmatrix} \]

In general,

\[ D^k = \begin{bmatrix} \lambda_1^k & 0 & \dots & 0 \\ 0 & \lambda_2^k & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & \lambda_n^k \end{bmatrix} \]

If \(A\) is diagonalizable, then \(A = PDP^{-1}\) for some invertible matrix \(P\). Computing its powers becomes simple:

\( A^2 = (PDP^{-1})^2 = (PDP^{-1})(PDP^{-1}) = P(DP^{-1}P)DP^{-1} = PD^2P^{-1} \)

In general,

\[ A^k = PD^kP^{-1} \]

The next theorem gives a characterization of diagonalizable matrices and tells how to construct a suitable factorization.

Theorem 5 (The Diagonalization Theorem)

An \(n \times n\) matrix \(A\) is diagonalizable if and only if \(A\) has \(n\) linearly independent eigenvectors.

In fact, \(A = PDP^{-1}\) with \(D\) a diagonal matrix if and only if the columns of \(P\) are \(n\) linearly independent eigenvectors of \(A\). In this case, the diagonal entries of \(D\) are eigenvalues of \(A\) that correspond, respectively, to the eigenvectors in \(P\).

Sketch of Proof:

If \(A = PDP^{-1}\), then \(AP = PD\).

Let \(P = \begin{bmatrix} \vec{v}_1 & \dots & \vec{v}_n \end{bmatrix}\) and \(D = \begin{bmatrix} \lambda_1 & \dots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \dots & \lambda_n \end{bmatrix}\).

Then \(AP = A\begin{bmatrix} \vec{v}_1 & \dots & \vec{v}_n \end{bmatrix} = \begin{bmatrix} A\vec{v}_1 & \dots & A\vec{v}_n \end{bmatrix}\).

And \(PD = P\begin{bmatrix} \lambda_1 & \dots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \dots & \lambda_n \end{bmatrix} = \begin{bmatrix} \lambda_1\vec{v}_1 & \dots & \lambda_n\vec{v}_n \end{bmatrix}\).

Equating the columns, we get \(A\vec{v}_i = \lambda_i\vec{v}_i\) for \(i = 1, \dots, n\).

Since \(P\) is invertible, its columns \(\vec{v}_1, \dots, \vec{v}_n\) must be linearly independent and nonzero. Thus, the \(\lambda_i\)'s are eigenvalues of \(A\) and the \(\vec{v}_i\)'s are the corresponding eigenvectors.

Facts and Warnings

  1. An \(n \times n\) matrix is diagonalizable if and only if there are enough eigenvectors to form a basis of \(\mathbb{R}^n\). We call such a basis an eigenvector basis of \(\mathbb{R}^n\).
  2. There is no relation between "\(A\) is diagonalizable" and "\(A\) is invertible".
    Examples:
    \(\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}\) is invertible but not diagonalizable.
    \(\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\) is diagonalizable but not invertible.
  3. False Statements:
    • "A is diagonalizable if and only if A has \(n\) eigenvalues counting multiplicities." (This is false).
    • "A is diagonalizable if and only if A has \(n\) eigenvectors." (This is false; it needs to have \(n\) linearly independent eigenvectors).

(II) Diagonalizing Matrices

Example 1

Diagonalize \(A\) if possible, where \( A = \begin{bmatrix} 1 & 2 & -1 \\ 0 & 3 & -1 \\ 0 & -2 & 2 \end{bmatrix} \).

(That is, find an invertible matrix \(P\) and a diagonal matrix \(D\) such that \(A = PDP^{-1}\)).

Step 1: Find the eigenvalues of \(A\).

\[ \begin{aligned} \det(A - \lambda I) &= \begin{vmatrix} 1-\lambda & 2 & -1 \\ 0 & 3-\lambda & -1 \\ 0 & -2 & 2-\lambda \end{vmatrix} = (1-\lambda) \begin{vmatrix} 3-\lambda & -1 \\ -2 & 2-\lambda \end{vmatrix} \\ &= (1-\lambda)[(3-\lambda)(2-\lambda) - 2] = (1-\lambda)(\lambda^2 - 5\lambda + 4) \\ &= -(\lambda-1)^2(\lambda-4) = 0 \end{aligned} \]

The eigenvalues are \(\lambda_1 = 4\) and \(\lambda_2 = 1\) (multiplicity 2).

Step 2: Find 3 linearly independent eigenvectors of \(A\).

For \(\lambda = 4\):

\( A - 4I = \begin{bmatrix} -3 & 2 & -1 \\ 0 & -1 & -1 \\ 0 & -2 & -2 \end{bmatrix} \sim \begin{bmatrix} -3 & 0 & -3 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix} \sim \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix} \)

This yields \(x_1 = -x_3\) and \(x_2 = -x_3\). Choosing \(x_3 = 1\), we get \(\vec{v}_1 = \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix}\) (note: eigenvectors are not unique).

For \(\lambda = 1\):

\( A - I = \begin{bmatrix} 0 & 2 & -1 \\ 0 & 2 & -1 \\ 0 & -2 & 1 \end{bmatrix} \sim \begin{bmatrix} 0 & 2 & -1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} \)

The equations give \(x_1\) is free, \(2x_2 - x_3 = 0 \implies x_2 = \frac{1}{2}x_3\), and \(x_3\) is free.

Writing this in parametric vector form:

\[ \vec{x} = x_1 \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} + x_3 \begin{bmatrix} 0 \\ 1/2 \\ 1 \end{bmatrix} \]

We can select \(\vec{v}_2 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}\) and \(\vec{v}_3 = \begin{bmatrix} 0 \\ 1 \\ 2 \end{bmatrix}\) (scaling the second vector to avoid fractions).

Step 3: Construct \(P\) and \(D\).

\( P = \begin{bmatrix} -1 & 1 & 0 \\ -1 & 0 & 1 \\ 1 & 0 & 2 \end{bmatrix} \quad \text{and} \quad D = \begin{bmatrix} 4 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \)

The order of the eigenvalues in \(D\) must match the order of the eigenvectors in \(P\).

It is always a good idea to check if \(P\) and \(D\) work by verifying \(AP = PD\) to avoid computing \(P^{-1}\).

\( AP = PD = \begin{bmatrix} -4 & 1 & 0 \\ -4 & 0 & 1 \\ 4 & 0 & 2 \end{bmatrix} \)
Example 2

Diagonalize the following matrix if possible:

\[ A = \begin{bmatrix} 2 & 0 & 0 \\ 1 & 5 & 0 \\ 0 & 3 & 5 \end{bmatrix} \]

Solution: Since \(A\) is a triangular matrix, the eigenvalues are the entries on the main diagonal: \(\lambda = 2, 5, 5\).

For \(\lambda = 2\):

\( A - 2I = \begin{bmatrix} 0 & 0 & 0 \\ 1 & 3 & 0 \\ 0 & 3 & 3 \end{bmatrix} \sim \begin{bmatrix} 1 & 3 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix} \sim \begin{bmatrix} 1 & 0 & -3 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix} \)

This gives \(x_1 = 3x_3\), \(x_2 = -x_3\), and \(x_3\) is free. Let \(x_3 = 1\), so \(\vec{v}_1 = \begin{bmatrix} 3 \\ -1 \\ 1 \end{bmatrix}\).

For \(\lambda = 5\):

\( A - 5I = \begin{bmatrix} -3 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & 3 & 0 \end{bmatrix} \sim \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} \)

This gives \(x_1 = 0\), \(x_2 = 0\), and \(x_3\) is free. Let \(x_3 = 1\), so \(\vec{v}_2 = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}\).

There are no other eigenvalues and every eigenvector of \(A\) is a multiple of either \(\vec{v}_1\) or \(\vec{v}_2\). Hence, it is impossible to construct a basis of \(\mathbb{R}^3\) using eigenvectors of \(A\). By Theorem 5, \(A\) is not diagonalizable.

The following theorem provides a sufficient condition for a matrix to be diagonalizable.

Theorem 6

An \(n \times n\) matrix with \(n\) distinct eigenvalues is diagonalizable.

Warning: It is not necessary for an \(n \times n\) matrix to have \(n\) distinct eigenvalues in order to be diagonalizable (as seen in Example 1).

Example 3

Determine if the following matrix is diagonalizable.

\[ \begin{bmatrix} 5 & -8 & 1 & 5 \\ 0 & 0 & 7 & -1 \\ 0 & 0 & -2 & 3 \\ 0 & 0 & 0 & 1 \end{bmatrix} \]

Solution: If an upper triangular matrix has distinct entries on its main diagonal, it has \(n\) distinct eigenvalues. Therefore, it is diagonalizable by Theorem 6.

(III) Matrices whose Eigenvalues are not Distinct

If an \(n \times n\) matrix \(A\) is diagonalizable but has fewer than \(n\) distinct eigenvalues, it is still possible to build \(P\) in a way that makes \(P\) automatically invertible, as the next theorem shows.

Theorem 7

Let \(A\) be an \(n \times n\) matrix whose distinct eigenvalues are \(\lambda_1, \dots, \lambda_p\).

  1. For \(k = 1, \dots, p\), the dimension of the eigenspace for \(\lambda_k\) (geometric multiplicity) is less than or equal to the multiplicity of the eigenvalue \(\lambda_k\) (algebraic multiplicity).
  2. \(A\) is diagonalizable if and only if the sum of the dimensions of the eigenspaces equals \(n\), and this happens if and only if:
    • the characteristic polynomial factors completely into linear factors, and
    • the dimension of the eigenspace for each \(\lambda_k\) equals the algebraic multiplicity of \(\lambda_k\).
  3. If \(A\) is diagonalizable and \(\mathcal{B}_k\) is a basis for the eigenspace corresponding to \(\lambda_k\) for each \(k\), then the total collection of vectors in the sets \(\mathcal{B}_1, \dots, \mathcal{B}_p\) forms an eigenvector basis for \(\mathbb{R}^n\).
Example 4

Let \(A\) be a \(4 \times 4\) matrix having 3 distinct eigenvalues. One of the eigenspaces is 2-dimensional. Is it possible that \(A\) is not diagonalizable?

Solution: The dimensions of the eigenspaces must be at least 1. If one is 2-dimensional, the sum of the dimensions of the eigenspaces is at least \(2 + 1 + 1 = 4\).

Since the sum is exactly 4, \(A\) is diagonalizable. It is not possible for \(A\) to be non-diagonalizable under these conditions.

Example 5

Determine if \( A = \begin{bmatrix} 1 & 0 & 5 \\ 0 & 1 & 4 \\ 0 & 0 & 3 \end{bmatrix} \) and \( B = \begin{bmatrix} 1 & 2 & 5 \\ 0 & 1 & 4 \\ 0 & 0 & 3 \end{bmatrix} \) are diagonalizable.

Solution: Both matrices are upper triangular, so their eigenvalues are the diagonal entries: \(\lambda = 1, 1, 3\). Checking \(\lambda = 1\) (algebraic multiplicity 2) is enough.

For Matrix A:

\[ A - I = \begin{bmatrix} 0 & 0 & 5 \\ 0 & 0 & 4 \\ 0 & 0 & 2 \end{bmatrix} \sim \begin{bmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} \]

There are 2 free variables (\(x_1\) and \(x_2\)). Thus, the dimension of the eigenspace for \(\lambda = 1\) is 2. Since Geometric Multiplicity = Algebraic Multiplicity, \(A\) is diagonalizable.

For Matrix B:

\[ B - I = \begin{bmatrix} 0 & 2 & 5 \\ 0 & 0 & 4 \\ 0 & 0 & 2 \end{bmatrix} \sim \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix} \]

There is only 1 free variable (\(x_1\)). Thus, the dimension of the eigenspace for \(\lambda = 1\) is 1. Since Geometric Multiplicity < Algebraic Multiplicity, \(B\) is not diagonalizable.

Example 6

Let \( A = \begin{bmatrix} -6 & 8 \\ -4 & 6 \end{bmatrix} \). Find a formula for \(A^k\).

Solution:

First, find the eigenvalues:

\[ \det(A - \lambda I) = \begin{vmatrix} -6-\lambda & 8 \\ -4 & 6-\lambda \end{vmatrix} = (-6-\lambda)(6-\lambda) - (-32) = \lambda^2 - 36 + 32 = \lambda^2 - 4 = 0 \]

So, \(\lambda = \pm 2\).

For \(\lambda = 2\):

\[ A - 2I = \begin{bmatrix} -8 & 8 \\ -4 & 4 \end{bmatrix} \sim \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix} \implies \vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} \]

For \(\lambda = -2\):

\[ A + 2I = \begin{bmatrix} -4 & 8 \\ -4 & 8 \end{bmatrix} \sim \begin{bmatrix} 1 & -2 \\ 0 & 0 \end{bmatrix} \implies \vec{v}_2 = \begin{bmatrix} 2 \\ 1 \end{bmatrix} \]

Form \(P\) and find \(P^{-1}\):

\[ P = \begin{bmatrix} 1 & 2 \\ 1 & 1 \end{bmatrix} \]

To find \(P^{-1}\), we calculate \(\frac{1}{\det P} = \frac{1}{1 - 2} = -1\):

\[ P^{-1} = -1 \begin{bmatrix} 1 & -2 \\ -1 & 1 \end{bmatrix} = \begin{bmatrix} -1 & 2 \\ 1 & -1 \end{bmatrix} \]

Now, calculate \(A^k = PD^kP^{-1}\):

\( A^k = \begin{bmatrix} 1 & 2 \\ 1 & 1 \end{bmatrix} \begin{bmatrix} 2^k & 0 \\ 0 & (-2)^k \end{bmatrix} \begin{bmatrix} -1 & 2 \\ 1 & -1 \end{bmatrix} \)
\( = \begin{bmatrix} 2^k & 2(-2)^k \\ 2^k & (-2)^k \end{bmatrix} \begin{bmatrix} -1 & 2 \\ 1 & -1 \end{bmatrix} \)
\( = \begin{bmatrix} -2^k + 2(-2)^k & 2\cdot 2^k - 2(-2)^k \\ -2^k + (-2)^k & 2\cdot 2^k - (-2)^k \end{bmatrix} \)

Simplifying the exponents:

\( = \begin{bmatrix} -2^k - (-2)^{k+1} & 2^{k+1} + (-2)^{k+1} \\ -2^k + (-2)^k & 2^{k+1} - (-2)^k \end{bmatrix} \)