Diagonalization
Powers of a matrix · The Diagonalization Theorem · The diagonalization algorithm · Matrices that are not diagonalizable · Repeated eigenvalues
By the end of this week you will be able to:
- compute \(D^k\) for a diagonal matrix \(D\), and use a factorization \(A=PDP^{-1}\) to find a formula for \(A^k\);
- state the Diagonalization Theorem and explain, column by column, why \(AP=PD\) says that the columns of \(P\) are eigenvectors of \(A\);
- diagonalize a \(2\times 2\) or \(3\times 3\) matrix with the four-step algorithm, and check the result with \(AP=PD\);
- decide whether a matrix is diagonalizable by comparing the dimension of each eigenspace with the multiplicity of its eigenvalue;
- explain why "diagonalizable" and "invertible" are different properties.
This week has two class days. There is no homework this week because of the Thanksgiving break.
Day 1: The Diagonalization Theorem and the Algorithm
Today we factor a matrix as \(A=PDP^{-1}\) with \(D\) diagonal, and we use the factorization to compute powers of \(A\).
1.1 Powers of a diagonal matrix
A diagonal matrix is a square matrix whose entries off the main diagonal are all \(0\). Powers of a diagonal matrix are easy to compute.
Let \(D=\begin{bmatrix} 5 & 0\\ 0 & 3\end{bmatrix}\). Compute \(D^2\) and \(D^3\), and give a formula for \(D^k\).
Solution
Multiply row by column. Each product has only one nonzero term:
\[D^2=\begin{bmatrix} 5 & 0\\ 0 & 3\end{bmatrix}\begin{bmatrix} 5 & 0\\ 0 & 3\end{bmatrix}=\begin{bmatrix} 5^2 & 0\\ 0 & 3^2\end{bmatrix},\qquad D^3=D\,D^2=\begin{bmatrix} 5 & 0\\ 0 & 3\end{bmatrix}\begin{bmatrix} 5^2 & 0\\ 0 & 3^2\end{bmatrix}=\begin{bmatrix} 5^3 & 0\\ 0 & 3^3\end{bmatrix}.\]Every further multiplication by \(D\) raises each exponent by one, so
\[D^k=\begin{bmatrix} 5^k & 0\\ 0 & 3^k\end{bmatrix}\qquad\text{for } k\ge 1.\]The same holds for every diagonal matrix: \(D^k\) is obtained by raising each diagonal entry of \(D\) to the power \(k\). If a matrix \(A\) that is not diagonal can be written as \(A=PDP^{-1}\) with \(D\) diagonal, then the powers of \(A\) are also easy to compute.
Let \(A=\begin{bmatrix} 7 & 2\\ -4 & 1\end{bmatrix}\). In Week 12 we verified that \(A=PDP^{-1}\), where
\[P=\begin{bmatrix} 1 & 1\\ -1 & -2\end{bmatrix}\qquad\text{and}\qquad D=\begin{bmatrix} 5 & 0\\ 0 & 3\end{bmatrix}.\]Find a formula for \(A^k\).
Solution
The \(2\times 2\) inverse formula with \(\det P=(1)(-2)-(1)(-1)=-1\) gives
\[P^{-1}=\frac{1}{-1}\begin{bmatrix} -2 & -1\\ 1 & 1\end{bmatrix}=\begin{bmatrix} 2 & 1\\ -1 & -1\end{bmatrix}.\]Matrix multiplication is associative, so the parentheses can be moved. The factors \(P^{-1}P\) in the middle give \(I\):
\[A^2=(PDP^{-1})(PDP^{-1})=PD\,(P^{-1}P)\,DP^{-1}=PD\,D\,P^{-1}=PD^2P^{-1}.\]In the same way,
\[A^3=(PDP^{-1})\,A^2=(PDP^{-1})(PD^2P^{-1})=PD\,(P^{-1}P)\,D^2P^{-1}=PD^3P^{-1}.\]Each further multiplication by \(A\) repeats this step, so \(A^k=PD^kP^{-1}\) for \(k\ge 1\). With \(D^k\) from Example 1:
\[A^k=\begin{bmatrix} 1 & 1\\ -1 & -2\end{bmatrix}\begin{bmatrix} 5^k & 0\\ 0 & 3^k\end{bmatrix}\begin{bmatrix} 2 & 1\\ -1 & -1\end{bmatrix} =\begin{bmatrix} 5^k & 3^k\\ -5^k & -2\cdot 3^k\end{bmatrix}\begin{bmatrix} 2 & 1\\ -1 & -1\end{bmatrix} =\begin{bmatrix} 2\cdot 5^k-3^k & 5^k-3^k\\ 2\cdot 3^k-2\cdot 5^k & 2\cdot 3^k-5^k\end{bmatrix}.\]Check with \(k=2\): the formula gives \(\begin{bmatrix} 50-9 & 25-9\\ 18-50 & 18-25\end{bmatrix}=\begin{bmatrix} 41 & 16\\ -32 & -7\end{bmatrix}\), and direct multiplication gives \(A^2=\begin{bmatrix} 49-8 & 14+2\\ -28-4 & -8+1\end{bmatrix}=\begin{bmatrix} 41 & 16\\ -32 & -7\end{bmatrix}\).
A square matrix \(A\) is diagonalizable if \(A\) is similar to a diagonal matrix, that is, if \(A=PDP^{-1}\) for some invertible matrix \(P\) and some diagonal matrix \(D\). To diagonalize \(A\) means to find such a \(P\) and \(D\).
The matrix \(A=\begin{bmatrix} 7 & 2\\ -4 & 1\end{bmatrix}\) of Example 2 is diagonalizable. In Example 2 the matrices \(P\) and \(D\) were given. The next section shows where they come from.
1.2 The Diagonalization Theorem
Multiply the equation \(A=PDP^{-1}\) on the right by \(P\). The result is \(AP=PD\). Now compare the two sides column by column. Let \(P\) have the columns \(\mathbf v_1,\dots,\mathbf v_n\) and let \(D\) have the diagonal entries \(\lambda_1,\dots,\lambda_n\).
By the definition of the matrix product, column \(j\) of \(AP\) is \(A\) times column \(j\) of \(P\):
\[AP=A\begin{bmatrix} \mathbf v_1 & \mathbf v_2 & \cdots & \mathbf v_n\end{bmatrix}=\begin{bmatrix} A\mathbf v_1 & A\mathbf v_2 & \cdots & A\mathbf v_n\end{bmatrix}.\]Multiplying \(P\) on the right by a diagonal matrix multiplies column \(j\) of \(P\) by the \(j\)th diagonal entry. For \(n=2\):
\[\begin{bmatrix} a & b\\ c & d\end{bmatrix}\begin{bmatrix} \lambda_1 & 0\\ 0 & \lambda_2\end{bmatrix}=\begin{bmatrix} \lambda_1 a & \lambda_2 b\\ \lambda_1 c & \lambda_2 d\end{bmatrix},\qquad\text{and in general}\qquad PD=\begin{bmatrix} \lambda_1\mathbf v_1 & \lambda_2\mathbf v_2 & \cdots & \lambda_n\mathbf v_n\end{bmatrix}.\]Two matrices are equal exactly when their columns are equal. So
\[AP=PD\quad\Longleftrightarrow\quad A\mathbf v_1=\lambda_1\mathbf v_1,\ \ A\mathbf v_2=\lambda_2\mathbf v_2,\ \ \dots,\ \ A\mathbf v_n=\lambda_n\mathbf v_n.\]This equivalence holds for every matrix \(P\), invertible or not. If \(P\) is invertible, its columns are nonzero and linearly independent, so they are \(n\) linearly independent eigenvectors of \(A\). In the other direction, if \(\mathbf v_1,\dots,\mathbf v_n\) are linearly independent eigenvectors, then \(P\) is invertible, and multiplying \(AP=PD\) on the right by \(P^{-1}\) gives \(A=PDP^{-1}\). This proves the following 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 the eigenvalues of \(A\) that correspond, in the same order, to the eigenvectors in \(P\).
In other words, \(A\) is diagonalizable if and only if there are enough eigenvectors to form a basis of \(\mathbb R^n\). Such a basis is called an eigenvector basis of \(\mathbb R^n\). The matrix \(P^{-1}\) in the factorization is the ordinary inverse of the matrix \(P\).
Let \(A=\begin{bmatrix} 3 & -1\\ -2 & 2\end{bmatrix}\), \(\mathbf v_1=\begin{bmatrix} 1\\ 2\end{bmatrix}\) and \(\mathbf v_2=\begin{bmatrix} 1\\ -1\end{bmatrix}\). Show that \(\mathbf v_1\) and \(\mathbf v_2\) are eigenvectors of \(A\), and use them to diagonalize \(A\).
Solution
\[A\mathbf v_1=\begin{bmatrix} 3-2\\ -2+4\end{bmatrix}=\begin{bmatrix} 1\\ 2\end{bmatrix}=1\,\mathbf v_1,\qquad A\mathbf v_2=\begin{bmatrix} 3+1\\ -2-2\end{bmatrix}=\begin{bmatrix} 4\\ -4\end{bmatrix}=4\,\mathbf v_2.\]So \(\mathbf v_1\) is an eigenvector for \(\lambda=1\) and \(\mathbf v_2\) is an eigenvector for \(\lambda=4\). Neither vector is a multiple of the other, so the two vectors are linearly independent. By Theorem 5, \(A=PDP^{-1}\) with
\[P=\begin{bmatrix} \mathbf v_1 & \mathbf v_2\end{bmatrix}=\begin{bmatrix} 1 & 1\\ 2 & -1\end{bmatrix},\qquad D=\begin{bmatrix} 1 & 0\\ 0 & 4\end{bmatrix}.\]The eigenvalue \(1\) is in the first diagonal position because \(\mathbf v_1\) is the first column of \(P\). Check with \(AP=PD\), which avoids computing \(P^{-1}\):
\[AP=\begin{bmatrix} 3 & -1\\ -2 & 2\end{bmatrix}\begin{bmatrix} 1 & 1\\ 2 & -1\end{bmatrix}=\begin{bmatrix} 1 & 4\\ 2 & -4\end{bmatrix},\qquad PD=\begin{bmatrix} 1 & 1\\ 2 & -1\end{bmatrix}\begin{bmatrix} 1 & 0\\ 0 & 4\end{bmatrix}=\begin{bmatrix} 1 & 4\\ 2 & -4\end{bmatrix}.\]The factorization has a geometric meaning. Since \(\{\mathbf v_1,\mathbf v_2\}\) is a basis of \(\mathbb R^2\), every vector is a combination \(\mathbf x=c_1\mathbf v_1+c_2\mathbf v_2\), and by linearity
\[A\mathbf x=c_1A\mathbf v_1+c_2A\mathbf v_2=1\cdot c_1\mathbf v_1+4\cdot c_2\mathbf v_2.\]Multiplication by \(A\) multiplies the weight on \(\mathbf v_1\) by \(1\) and the weight on \(\mathbf v_2\) by \(4\), exactly as the diagonal matrix \(D\) multiplies the first entry of a vector by \(1\) and the second by \(4\). For example, for \(\mathbf x=\mathbf v_1+\mathbf v_2=(2,1)\) we get \(A\mathbf x=\mathbf v_1+4\mathbf v_2=(5,-2)\).
1.3 Diagonalizing a matrix: four steps
Theorem 5 turns diagonalization into a search for eigenvectors.
- Find the eigenvalues of \(A\). Solve the characteristic equation \(\det(A-\lambda I)=0\).
- Find \(n\) linearly independent eigenvectors of \(A\). Find a basis for each eigenspace. If the bases contain fewer than \(n\) vectors in total, \(A\) is not diagonalizable.
- Construct \(P\) from the vectors in step 2. The vectors may be listed in any order.
- Construct \(D\) from the corresponding eigenvalues. The order of the eigenvalues must match the order of the columns of \(P\).
Check: verify that \(AP=PD\) and that \(P\) is invertible.
Diagonalize the following matrix, if possible.
\[A=\begin{bmatrix} 1 & 3 & 3\\ -3 & -5 & -3\\ 3 & 3 & 1\end{bmatrix}\]Solution
Step 1. Find the eigenvalues. A cofactor expansion of \(\det(A-\lambda I)\) gives a cubic polynomial that can be factored:
\[\det(A-\lambda I)=-\lambda^3-3\lambda^2+4=-(\lambda-1)(\lambda+2)^2.\]The eigenvalues are \(\lambda=1\), with multiplicity \(1\), and \(\lambda=-2\), with multiplicity \(2\).
Step 2. Find three linearly independent eigenvectors. Three vectors are needed because \(A\) is \(3\times 3\). For \(\lambda=1\), row reduce the augmented matrix of \((A-I)\mathbf x=\mathbf 0\):
\[\left[\begin{array}{ccc|c} 0 & 3 & 3 & 0\\ -3 & -6 & -3 & 0\\ 3 & 3 & 0 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 0 & 3 & 3 & 0\\ -3 & -6 & -3 & 0\\ 0 & 0 & 0 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 1 & 2 & 1 & 0\\ 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 1 & 0 & -1 & 0\\ 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 0\end{array}\right].\]The row operations are \(R_3\to R_3+R_2\) and \(R_3\to R_3+R_1\); then \(R_1\leftrightarrow R_2\), \(R_1\to-\tfrac13R_1\) and \(R_2\to\tfrac13R_2\); then \(R_1\to R_1-2R_2\). The variable \(x_3\) is free, \(x_1=x_3\) and \(x_2=-x_3\). With \(x_3=1\):
\[\text{Basis for }\lambda=1:\quad \mathbf v_1=\begin{bmatrix} 1\\ -1\\ 1\end{bmatrix}.\]For \(\lambda=-2\), row reduce the augmented matrix of \((A+2I)\mathbf x=\mathbf 0\) with \(R_2\to R_2+R_1\), \(R_3\to R_3-R_1\) and \(R_1\to\tfrac13R_1\):
\[\left[\begin{array}{ccc|c} 3 & 3 & 3 & 0\\ -3 & -3 & -3 & 0\\ 3 & 3 & 3 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 1 & 1 & 1 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\end{array}\right].\]The variables \(x_2\) and \(x_3\) are free and \(x_1=-x_2-x_3\), so \(\mathbf x=x_2\begin{bmatrix} -1\\ 1\\ 0\end{bmatrix}+x_3\begin{bmatrix} -1\\ 0\\ 1\end{bmatrix}\):
\[\text{Basis for }\lambda=-2:\quad \mathbf v_2=\begin{bmatrix} -1\\ 1\\ 0\end{bmatrix}\ \text{ and }\ \mathbf v_3=\begin{bmatrix} -1\\ 0\\ 1\end{bmatrix}.\]There are three eigenvectors in total. They are linearly independent if the matrix that has them as columns is invertible; this is checked in step 3.
Step 3. Construct \(P\). Using the order chosen in step 2,
\[P=\begin{bmatrix} \mathbf v_1 & \mathbf v_2 & \mathbf v_3\end{bmatrix}=\begin{bmatrix} 1 & -1 & -1\\ -1 & 1 & 0\\ 1 & 0 & 1\end{bmatrix}.\]A cofactor expansion across row 3 gives \(\det P=1\cdot\begin{vmatrix} -1 & -1\\ 1 & 0\end{vmatrix}+1\cdot\begin{vmatrix} 1 & -1\\ -1 & 1\end{vmatrix}=1\cdot 1+1\cdot 0=1\). Since \(\det P\ne 0\), \(P\) is invertible and \(\{\mathbf v_1,\mathbf v_2,\mathbf v_3\}\) is linearly independent.
Step 4. Construct \(D\). The eigenvalue \(-2\) is used twice, once for each of the eigenvectors \(\mathbf v_2\) and \(\mathbf v_3\):
\[D=\begin{bmatrix} 1 & 0 & 0\\ 0 & -2 & 0\\ 0 & 0 & -2\end{bmatrix}.\]Check. Since \(P\) is invertible, \(A=PDP^{-1}\) is equivalent to \(AP=PD\):
\[AP=\begin{bmatrix} 1 & 3 & 3\\ -3 & -5 & -3\\ 3 & 3 & 1\end{bmatrix}\begin{bmatrix} 1 & -1 & -1\\ -1 & 1 & 0\\ 1 & 0 & 1\end{bmatrix}=\begin{bmatrix} 1 & 2 & 2\\ -1 & -2 & 0\\ 1 & 0 & -2\end{bmatrix},\] \[PD=\begin{bmatrix} 1 & -1 & -1\\ -1 & 1 & 0\\ 1 & 0 & 1\end{bmatrix}\begin{bmatrix} 1 & 0 & 0\\ 0 & -2 & 0\\ 0 & 0 & -2\end{bmatrix}=\begin{bmatrix} 1 & 2 & 2\\ -1 & -2 & 0\\ 1 & 0 & -2\end{bmatrix}.\]The two products are equal, so \(A=PDP^{-1}\).
Self-check only. These exercises are not graded. Entries may be typed as integers, decimals (1.5 or 1,5) or simple fractions (3/2).
Let \(A=\begin{bmatrix} 4 & -3\\ 2 & -1\end{bmatrix}\). Then \(A=PDP^{-1}\) with \(P=\begin{bmatrix} 1 & 3\\ 1 & 2\end{bmatrix}\) and \(D=\begin{bmatrix} 1 & 0\\ 0 & 2\end{bmatrix}\). Compute \(A^8\).
\(\det P=(1)(2)-(3)(1)=-1\), so \(P^{-1}=\dfrac{1}{-1}\begin{bmatrix} 2 & -3\\ -1 & 1\end{bmatrix}=\begin{bmatrix} -2 & 3\\ 1 & -1\end{bmatrix}\). The diagonal entries of \(D^8\) are \(1^8=1\) and \(2^8=256\). Then
\[A^8=PD^8P^{-1}=\begin{bmatrix} 1 & 3\\ 1 & 2\end{bmatrix}\begin{bmatrix} 1 & 0\\ 0 & 256\end{bmatrix}\begin{bmatrix} -2 & 3\\ 1 & -1\end{bmatrix}=\begin{bmatrix} 1 & 768\\ 1 & 512\end{bmatrix}\begin{bmatrix} -2 & 3\\ 1 & -1\end{bmatrix}=\begin{bmatrix} 766 & -765\\ 510 & -509\end{bmatrix}.\]Without the factorization, \(A^8\) needs repeated matrix multiplications.
Self-check only.
Diagonalize \(A=\begin{bmatrix} 2 & 3\\ 4 & 1\end{bmatrix}\): enter an invertible matrix \(P\) and a diagonal matrix \(D\) with \(A=PDP^{-1}\). Any correct pair is accepted.
Step 1. \(\det(A-\lambda I)=(2-\lambda)(1-\lambda)-12=\lambda^2-3\lambda-10=(\lambda-5)(\lambda+2)\). The eigenvalues are \(5\) and \(-2\).
Step 2. For \(\lambda=5\): \(A-5I=\begin{bmatrix} -3 & 3\\ 4 & -4\end{bmatrix}\), so \(x_1=x_2\) and \(\mathbf v_1=\begin{bmatrix} 1\\ 1\end{bmatrix}\). For \(\lambda=-2\): \(A+2I=\begin{bmatrix} 4 & 3\\ 4 & 3\end{bmatrix}\), so \(4x_1+3x_2=0\) and \(\mathbf v_2=\begin{bmatrix} 3\\ -4\end{bmatrix}\). The two eigenvectors correspond to distinct eigenvalues, so they are linearly independent (Theorem 2).
Steps 3 and 4. One correct answer is
\[P=\begin{bmatrix} 1 & 3\\ 1 & -4\end{bmatrix},\qquad D=\begin{bmatrix} 5 & 0\\ 0 & -2\end{bmatrix}.\]Check. \(AP=\begin{bmatrix} 2+3 & 6-12\\ 4+1 & 12-4\end{bmatrix}=\begin{bmatrix} 5 & -6\\ 5 & 8\end{bmatrix}\) and \(PD=\begin{bmatrix} 5 & -6\\ 5 & 8\end{bmatrix}\).
Day 2: Which Matrices Are Diagonalizable?
Today we see how diagonalization can fail, and we learn to decide from the eigenvalues and the eigenspaces whether a matrix is diagonalizable.
2.1 Matrices that are not diagonalizable
Not every matrix has enough eigenvectors.
Show that \(A=\begin{bmatrix} 1 & 1\\ 0 & 1\end{bmatrix}\) is not diagonalizable.
Solution
\(A\) is triangular, so its eigenvalues are the diagonal entries. The only eigenvalue is \(\lambda=1\), with multiplicity \(2\). The eigenspace is the solution set of \((A-I)\mathbf x=\mathbf 0\):
\[A-I=\begin{bmatrix} 0 & 1\\ 0 & 0\end{bmatrix},\qquad\text{so } x_2=0 \text{ and } x_1 \text{ is free}:\qquad \mathbf x=x_1\begin{bmatrix} 1\\ 0\end{bmatrix}.\]Every eigenvector of \(A\) is a multiple of \(\begin{bmatrix} 1\\ 0\end{bmatrix}\). Two eigenvectors of \(A\) are therefore always linearly dependent. \(A\) does not have two linearly independent eigenvectors, so by the Diagonalization Theorem \(A\) is not diagonalizable.
Geometrically, multiplication by this matrix does not move the vectors on the \(x_1\)-axis. Every other vector is pushed sideways, parallel to the \(x_1\)-axis, off its own line through the origin, so it is not an eigenvector.
Diagonalize the following matrix, if possible.
\[A=\begin{bmatrix} 2 & 4 & 3\\ -4 & -6 & -3\\ 3 & 3 & 1\end{bmatrix}\]Solution
Step 1. A cofactor expansion gives the characteristic polynomial
\[\det(A-\lambda I)=-\lambda^3-3\lambda^2+4=-(\lambda-1)(\lambda+2)^2.\]The eigenvalues are \(\lambda=1\), with multiplicity \(1\), and \(\lambda=-2\), with multiplicity \(2\).
Step 2. For \(\lambda=1\), row reduce the augmented matrix of \((A-I)\mathbf x=\mathbf 0\) with \(R_2\to R_2+4R_1\) and \(R_3\to R_3-3R_1\); then \(R_3\to R_3+R_2\) and \(R_2\to\tfrac19R_2\); then \(R_1\to R_1-4R_2\):
\[\left[\begin{array}{ccc|c} 1 & 4 & 3 & 0\\ -4 & -7 & -3 & 0\\ 3 & 3 & 0 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 1 & 4 & 3 & 0\\ 0 & 9 & 9 & 0\\ 0 & -9 & -9 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 1 & 4 & 3 & 0\\ 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 1 & 0 & -1 & 0\\ 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 0\end{array}\right].\]One free variable, \(x_3\), with \(x_1=x_3\) and \(x_2=-x_3\). A basis for the eigenspace is \(\mathbf v_1=\begin{bmatrix} 1\\ -1\\ 1\end{bmatrix}\).
For \(\lambda=-2\), row reduce the augmented matrix of \((A+2I)\mathbf x=\mathbf 0\) with \(R_2\to R_2+R_1\) and \(R_3\to\tfrac13R_3\); then \(R_1\leftrightarrow R_3\) and \(R_2\leftrightarrow R_3\); then \(R_2\to R_2-4R_1\), \(R_2\to-R_2\) and \(R_1\to R_1-R_2\):
\[\left[\begin{array}{ccc|c} 4 & 4 & 3 & 0\\ -4 & -4 & -3 & 0\\ 3 & 3 & 3 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 4 & 4 & 3 & 0\\ 0 & 0 & 0 & 0\\ 1 & 1 & 1 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 1 & 1 & 1 & 0\\ 4 & 4 & 3 & 0\\ 0 & 0 & 0 & 0\end{array}\right]\sim\left[\begin{array}{ccc|c} 1 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0\end{array}\right].\]There is only one free variable, \(x_2\), with \(x_1=-x_2\) and \(x_3=0\). A basis for the eigenspace is \(\mathbf v_2=\begin{bmatrix} -1\\ 1\\ 0\end{bmatrix}\). The eigenspace for \(\lambda=-2\) is a line, although the multiplicity of \(-2\) is \(2\).
There are no other eigenvalues, so every eigenvector of \(A\) is a multiple of \(\mathbf v_1\) or a multiple of \(\mathbf v_2\). Among any three eigenvectors, two are multiples of the same vector, so three eigenvectors are always linearly dependent. By the Diagonalization Theorem, \(A\) is not diagonalizable.
The characteristic polynomial \(-(\lambda-1)(\lambda+2)^2\) of Example 2 is also the characteristic polynomial of \(\begin{bmatrix} 1 & 3 & 3\\ -3 & -5 & -3\\ 3 & 3 & 1\end{bmatrix}\), which was diagonalized on Day 1. Two matrices with the same characteristic polynomial can behave differently: the eigenvalues alone do not decide whether a matrix is diagonalizable. The dimensions of the eigenspaces decide.
2.2 Distinct eigenvalues
In one case no eigenspace has to be computed.
An \(n\times n\) matrix with \(n\) distinct eigenvalues is diagonalizable.
Proof. Let \(\mathbf v_1,\dots,\mathbf v_n\) be eigenvectors corresponding to the \(n\) distinct eigenvalues of \(A\). By Theorem 2, \(\{\mathbf v_1,\dots,\mathbf v_n\}\) is linearly independent. So \(A\) has \(n\) linearly independent eigenvectors and is diagonalizable by the Diagonalization Theorem. \(\blacksquare\)
Determine whether each matrix is diagonalizable.
Solution
Theorem 6 gives a sufficient condition, not a necessary one. The matrix \(\begin{bmatrix} 2 & 0\\ 0 & 2\end{bmatrix}\) has only one eigenvalue, and it is diagonalizable because it is already diagonal (take \(P=I\)). A matrix with a repeated eigenvalue may or may not be diagonalizable.
2.3 Repeated eigenvalues
When an eigenvalue is repeated, the dimension of its eigenspace must be compared with its multiplicity.
Let \(A\) be an \(n\times n\) matrix whose distinct eigenvalues are \(\lambda_1,\dots,\lambda_p\).
The proof of Theorem 7 is omitted. Three remarks on its use:
- The eigenspace of an eigenvalue contains a nonzero vector, so its dimension is at least \(1\). By part (a), an eigenvalue of multiplicity \(1\) has an eigenspace of dimension exactly \(1\). Only the repeated eigenvalues need to be examined.
- Part (b) is a counting test: add the dimensions of the eigenspaces and compare the sum with \(n\).
- Part (c) says that in step 2 of the algorithm no separate independence check is needed: the bases of the different eigenspaces, put together, are automatically linearly independent.
| Matrix | Eigenvalue | Multiplicity | Dimension of eigenspace | Sum of dimensions |
|---|---|---|---|---|
| \(\begin{bmatrix} 1 & 1\\ 0 & 1\end{bmatrix}\) | \(1\) | \(2\) | \(1\) | \(1\), less than \(n=2\) |
| \(\begin{bmatrix} 2 & 4 & 3\\ -4 & -6 & -3\\ 3 & 3 & 1\end{bmatrix}\) | \(1\) | \(1\) | \(1\) | \(2\), less than \(n=3\) |
| \(-2\) | \(2\) | \(1\) |
Diagonalize the following matrix, if possible.
\[A=\begin{bmatrix} 5 & 0 & 0\\ 0 & 5 & 0\\ 1 & 4 & -3\end{bmatrix}\]Solution
Step 1. \(A\) is triangular, so the eigenvalues are the diagonal entries: \(\lambda=5\), with multiplicity \(2\), and \(\lambda=-3\), with multiplicity \(1\).
Step 2. For \(\lambda=5\), the augmented matrix of \((A-5I)\mathbf x=\mathbf 0\) is
\[\left[\begin{array}{ccc|c} 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 1 & 4 & -8 & 0\end{array}\right].\]The only equation is \(x_1+4x_2-8x_3=0\). The variables \(x_2\) and \(x_3\) are free and \(x_1=-4x_2+8x_3\), so \(\mathbf x=x_2\begin{bmatrix} -4\\ 1\\ 0\end{bmatrix}+x_3\begin{bmatrix} 8\\ 0\\ 1\end{bmatrix}\):
\[\text{Basis for }\lambda=5:\quad \mathbf v_1=\begin{bmatrix} -4\\ 1\\ 0\end{bmatrix}\ \text{ and }\ \mathbf v_2=\begin{bmatrix} 8\\ 0\\ 1\end{bmatrix}.\]The eigenspace has dimension \(2\), equal to the multiplicity of \(5\). For \(\lambda=-3\), the augmented matrix of \((A+3I)\mathbf x=\mathbf 0\) is
\[\left[\begin{array}{ccc|c} 8 & 0 & 0 & 0\\ 0 & 8 & 0 & 0\\ 1 & 4 & 0 & 0\end{array}\right].\]The first two rows give \(x_1=0\) and \(x_2=0\); the third row then reads \(0=0\). The variable \(x_3\) is free:
\[\text{Basis for }\lambda=-3:\quad \mathbf v_3=\begin{bmatrix} 0\\ 0\\ 1\end{bmatrix}.\]The dimensions of the eigenspaces add up to \(2+1=3=n\). By Theorem 7(b), \(A\) is diagonalizable, and by Theorem 7(c), \(\{\mathbf v_1,\mathbf v_2,\mathbf v_3\}\) is linearly independent.
Steps 3 and 4. The eigenvalue \(5\) is used twice in \(D\), once for \(\mathbf v_1\) and once for \(\mathbf v_2\):
\[P=\begin{bmatrix} -4 & 8 & 0\\ 1 & 0 & 0\\ 0 & 1 & 1\end{bmatrix},\qquad D=\begin{bmatrix} 5 & 0 & 0\\ 0 & 5 & 0\\ 0 & 0 & -3\end{bmatrix}.\]Check.
\[AP=\begin{bmatrix} 5 & 0 & 0\\ 0 & 5 & 0\\ 1 & 4 & -3\end{bmatrix}\begin{bmatrix} -4 & 8 & 0\\ 1 & 0 & 0\\ 0 & 1 & 1\end{bmatrix}=\begin{bmatrix} -20 & 40 & 0\\ 5 & 0 & 0\\ 0 & 5 & -3\end{bmatrix},\qquad PD=\begin{bmatrix} -20 & 40 & 0\\ 5 & 0 & 0\\ 0 & 5 & -3\end{bmatrix}.\]Decide whether each matrix is diagonalizable.
Solution
2.4 Diagonalizable does not mean invertible
The two properties answer different questions. \(A\) is invertible exactly when \(0\) is not an eigenvalue of \(A\). \(A\) is diagonalizable exactly when \(A\) has \(n\) linearly independent eigenvectors. Neither property implies the other; all four combinations occur.
| Matrix | Eigenvalues | Invertible? | Diagonalizable? |
|---|---|---|---|
| \(\begin{bmatrix} 2 & 0\\ 0 & 3\end{bmatrix}\) | \(2,\ 3\) | Yes: \(0\) is not an eigenvalue. | Yes: the matrix is diagonal. |
| \(\begin{bmatrix} 1 & 0\\ 0 & 0\end{bmatrix}\) | \(1,\ 0\) | No: \(0\) is an eigenvalue. | Yes: the matrix is diagonal. |
| \(\begin{bmatrix} 1 & 1\\ 0 & 1\end{bmatrix}\) | \(1,\ 1\) | Yes: \(0\) is not an eigenvalue. | No: the eigenspace for \(1\) has dimension \(1\) (Example 1). |
| \(\begin{bmatrix} 0 & 1\\ 0 & 0\end{bmatrix}\) | \(0,\ 0\) | No: \(0\) is an eigenvalue. | No: \(A\mathbf x=\mathbf 0\) gives \(x_2=0\), so the eigenspace for \(0\) has dimension \(1\). |
When a matrix has both properties, the factorization also gives the inverse. If \(A=PDP^{-1}\) and no diagonal entry of \(D\) is \(0\), then \(D^{-1}\) is the diagonal matrix with the entries \(1/\lambda_1,\dots,1/\lambda_n\), and \(A^{-1}=PD^{-1}P^{-1}\), because \((PDP^{-1})(PD^{-1}P^{-1})=PD\,(P^{-1}P)\,D^{-1}P^{-1}=P\,(DD^{-1})\,P^{-1}=I\).
Self-check only.
Each matrix has the eigenvalues shown. Answer the two questions for each matrix.
Self-check only.
The matrix \(A=\begin{bmatrix} 4 & 0 & -2\\ 2 & 5 & 4\\ 0 & 0 & 5\end{bmatrix}\) has the characteristic polynomial \(-(\lambda-5)^2(\lambda-4)\). Diagonalize \(A\): enter an invertible matrix \(P\) and the diagonal entries of \(D\), in the matching order. Any correct answer is accepted.
Step 1. The eigenvalues are \(5\), with multiplicity \(2\), and \(4\), with multiplicity \(1\).
Step 2. For \(\lambda=5\): \(A-5I=\begin{bmatrix} -1 & 0 & -2\\ 2 & 0 & 4\\ 0 & 0 & 0\end{bmatrix}\). Row 2 is \(-2\) times row 1, so the only equation is \(x_1=-2x_3\), with \(x_2\) and \(x_3\) free: \(\mathbf v_1=\begin{bmatrix} 0\\ 1\\ 0\end{bmatrix}\), \(\mathbf v_2=\begin{bmatrix} -2\\ 0\\ 1\end{bmatrix}\). The dimension is \(2\), equal to the multiplicity.
For \(\lambda=4\): \(A-4I=\begin{bmatrix} 0 & 0 & -2\\ 2 & 1 & 4\\ 0 & 0 & 1\end{bmatrix}\) gives \(x_3=0\) and \(2x_1+x_2=0\): \(\mathbf v_3=\begin{bmatrix} -1\\ 2\\ 0\end{bmatrix}\).
Steps 3 and 4. The dimensions add up to \(3\), so \(A\) is diagonalizable (Theorem 7). One correct answer is
\[P=\begin{bmatrix} 0 & -2 & -1\\ 1 & 0 & 2\\ 0 & 1 & 0\end{bmatrix},\qquad D=\begin{bmatrix} 5 & 0 & 0\\ 0 & 5 & 0\\ 0 & 0 & 4\end{bmatrix}.\]Check. \(A\mathbf v_1=\begin{bmatrix} 0\\ 5\\ 0\end{bmatrix}=5\mathbf v_1\), \(A\mathbf v_2=\begin{bmatrix} -8-2\\ -4+4\\ 5\end{bmatrix}=\begin{bmatrix} -10\\ 0\\ 5\end{bmatrix}=5\mathbf v_2\), \(A\mathbf v_3=\begin{bmatrix} -4\\ -2+10\\ 0\end{bmatrix}=\begin{bmatrix} -4\\ 8\\ 0\end{bmatrix}=4\mathbf v_3\).
Self-check only.
\(A\) is an \(n\times n\) matrix. Decide whether each statement is true or false.
Homework
There is no homework for Week 13 because of the Thanksgiving break. Nothing is to be submitted on Canvas for this week.
The exercises in Day 1 and Day 2 are for self-check. Your entries in them are saved automatically in this browser.