From a Diagonalization to an Eigenbasis
Diagonalization connects two descriptions of a linear transformation. One description gives its action through a matrix \(\mathbf{A}\); another uses a basis in which that action is represented by a diagonal matrix. The key is that the vectors in this basis are eigenvectors: each is scaled by the transformation, rather than sent in a new direction. The correspondence works in both directions, but it depends on keeping the eigenvectors and diagonal entries in the same order.
Throughout this tutorial, let \(\mathbf{A}\in\mathbb{R}^{n\times n}\). A nonzero vector \(\mathbf{v}\in\mathbb{R}^n\) is an eigenvector of \(\mathbf{A}\) with eigenvalue \(\lambda\in\mathbb{R}\) if \(\mathbf{A}\mathbf{v}=\lambda\mathbf{v}\). An eigenbasis for \(\mathbf{A}\) is an ordered basis of \(\mathbb{R}^n\) whose vectors are all eigenvectors of \(\mathbf{A}\). We say that \(\mathbf{A}\) is diagonalizable over \(\mathbb{R}\) if there is an invertible matrix \(\mathbf{P}\in\mathbb{R}^{n\times n}\) and a diagonal matrix \(\mathbf{D}\in\mathbb{R}^{n\times n}\) such that \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\).
In the expression \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\), the columns of \(\mathbf{P}\) are the vectors of a basis, and \(\mathbf{D}\) describes how the transformation scales their coordinates. A square matrix is invertible exactly when its columns form a basis of \(\mathbb{R}^n\); the following argument recalls why this fact applies here.
Proof. Write the columns of \(\mathbf{P}\) as \(\mathbf{p}_1,\dots,\mathbf{p}_n\). If they form a basis, every \(\mathbf{y}\in\mathbb{R}^n\) has a unique expression \(\mathbf{y}=c_1\mathbf{p}_1+\cdots+c_n\mathbf{p}_n=\mathbf{P}\mathbf{c}\), where \(\mathbf{c}=(c_1,\dots,c_n)^\top\). Assign to each \(\mathbf{y}\) its unique coefficient vector \(\mathbf{c}\). This assignment is linear, since the coefficients of a sum or scalar multiple are the corresponding sum or scalar multiple of the unique coefficient vectors. Its matrix \(\mathbf{Q}\) satisfies \(\mathbf{Q}\mathbf{P}=\mathbf{I}_n\) and \(\mathbf{P}\mathbf{Q}=\mathbf{I}_n\), so \(\mathbf{Q}=\mathbf{P}^{-1}\). Conversely, if \(\mathbf{P}\) is invertible, each \(\mathbf{y}\) equals \(\mathbf{P}(\mathbf{P}^{-1}\mathbf{y})\), so it is a linear combination of the columns. If \(\mathbf{P}\mathbf{c}=\mathbf{0}\), multiplying by \(\mathbf{P}^{-1}\) gives \(\mathbf{c}=\mathbf{0}\), so the columns are linearly independent. They therefore form a basis. \(\square\)
The Column Equation That Connects the Two Ideas
Let \(\mathbf{P}=\begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_n\end{bmatrix}\) and let \(\mathbf{D}=\operatorname{diag}(\lambda_1,\dots,\lambda_n)\), meaning that the \(\lambda_i\) are the diagonal entries and all off-diagonal entries are zero. Multiplying \(\mathbf{P}\) by \(\mathbf{D}\) scales its \(i\)-th column by \(\lambda_i\). Thus, the matrix equation \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) says, column by column, that \(\mathbf{A}\mathbf{v}_i=\lambda_i\mathbf{v}_i\).
Proof. The \(i\)-th column of \(\mathbf{A}\mathbf{P}\) is \(\mathbf{A}\mathbf{v}_i\), by the definition of matrix multiplication. The \(i\)-th column of \(\mathbf{P}\mathbf{D}\) is \(\lambda_i\mathbf{v}_i\), because \(\mathbf{D}\) is diagonal. Two matrices are equal if and only if their corresponding columns are equal. Therefore, the matrix equation holds exactly when the stated column equations all hold. \(\square\)
This proposition does not require \(\mathbf{P}\) to be invertible. Invertibility matters when we want the columns to form a basis, rather than just to be eigenvectors. When \(\mathbf{P}\) is invertible, \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) can be multiplied on the right by \(\mathbf{P}^{-1}\) to give \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\). This is the algebraic link behind the equivalence.
The Equivalence
Proof. First suppose \(\mathbf{A}\) is diagonalizable, so \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) for an invertible \(\mathbf{P}\) and a diagonal \(\mathbf{D}=\operatorname{diag}(\lambda_1,\dots,\lambda_n)\). Write the columns of \(\mathbf{P}\) as \(\mathbf{v}_1,\dots,\mathbf{v}_n\). Right-multiplying the diagonalization equation by \(\mathbf{P}\) gives \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\). By the proposition, \(\mathbf{A}\mathbf{v}_i=\lambda_i\mathbf{v}_i\) for every \(i\). None of these columns is zero, because an invertible matrix has linearly independent columns. The lemma says those columns form a basis. Hence they are an eigenbasis. Conversely, suppose \(\mathbf{v}_1,\dots,\mathbf{v}_n\) is a basis of eigenvectors, and let \(\lambda_i\) satisfy \(\mathbf{A}\mathbf{v}_i=\lambda_i\mathbf{v}_i\) for each \(i\). Set \(\mathbf{P}=\begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_n\end{bmatrix}\) and \(\mathbf{D}=\operatorname{diag}(\lambda_1,\dots,\lambda_n)\). The lemma makes \(\mathbf{P}\) invertible, and the proposition gives \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\). Multiplying on the right by \(\mathbf{P}^{-1}\) yields \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\), so \(\mathbf{A}\) is diagonalizable. Both directions are proved. \(\square\)
The theorem also tells us what the entries of a diagonalizing matrix mean: its columns are an eigenbasis, and the diagonal entries record the corresponding eigenvalues in that same order. If we reorder the basis vectors, we must reorder the diagonal entries to keep the column equations true.
Reading a Diagonalization in Both Directions
Worked Example: A Basis for a Scalar Matrix
Let \(\mathbf{A}=4\mathbf{I}_2\). Use the vectors \(\mathbf{v}_1=(1,1)^\top\) and \(\mathbf{v}_2=(1,-1)^\top\) to show that \(\mathbf{A}\) has an eigenbasis and a diagonalization. This example has a repeated eigenvalue, so it also shows that distinct eigenvalues are not required for this equivalence.
First check the eigenvector equations. Since \(\mathbf{A}=\begin{bmatrix}4&0\\0&4\end{bmatrix}\), direct multiplication gives \(\mathbf{A}\mathbf{v}_1=(4,4)^\top=4\mathbf{v}_1\) and \(\mathbf{A}\mathbf{v}_2=(4,-4)^\top=4\mathbf{v}_2\). To check that the vectors form a basis, put them into the columns of \(\mathbf{P}\) and verify an inverse:
Indeed, multiplying \(\mathbf{P}\) by the displayed candidate inverse gives \(\mathbf{I}_2\): the product has diagonal entries \((1+1)/2=1\) and off-diagonal entries \((1-1)/2=0\). Thus the columns form a basis. Both eigenvalues are \(4\), so \(\mathbf{D}=\begin{bmatrix}4&0\\0&4\end{bmatrix}\). Since \(\mathbf{D}=4\mathbf{I}_2\), multiplication gives \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}=4\mathbf{P}\mathbf{P}^{-1}=4\mathbf{I}_2=\mathbf{A}\). This verifies the diagonalization.
Worked Example: Constructing a Diagonalization from Eigenvectors
Consider \(\mathbf{A}=\begin{bmatrix}3&1\\0&2\end{bmatrix}\). Verify an eigenbasis and use it to write \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\).
Take \(\mathbf{v}_1=(1,0)^\top\) and \(\mathbf{v}_2=(-1,1)^\top\). Their images are \(\mathbf{A}\mathbf{v}_1=(3,0)^\top=3\mathbf{v}_1\) and \(\mathbf{A}\mathbf{v}_2=(-2,2)^\top=2\mathbf{v}_2\). Put these eigenvectors, in this order, into \(\mathbf{P}\), and put their eigenvalues in the matching order on the diagonal of \(\mathbf{D}\):
The proposed inverse checks by multiplication: \(\mathbf{P}\mathbf{P}^{-1}=\begin{bmatrix}1&1-1\\0&1\end{bmatrix}=\mathbf{I}_2\). Now multiply in stages:
The columns of \(\mathbf{P}\) are an eigenbasis, and the product check confirms the claimed diagonalization.
Worked Example: A Matrix Without an Eigenbasis
Show that \(\mathbf{A}=\begin{bmatrix}2&1\\0&2\end{bmatrix}\) is not diagonalizable over \(\mathbb{R}\) by checking its possible eigenvectors.
For an eigenvector \(\mathbf{v}=(x,y)^\top\ne\mathbf{0}\) with eigenvalue \(\lambda\), the equation \(\mathbf{A}\mathbf{v}=\lambda\mathbf{v}\) gives \(2x+y=\lambda x\) and \(2y=\lambda y\). If \(y\ne0\), the second equation forces \(\lambda=2\), and the first then gives \(y=0\), a contradiction. Therefore \(y=0\). Since \(\mathbf{v}\ne\mathbf{0}\), this means \(x\ne0\), and the first equation now forces \(\lambda=2\). Thus every eigenvector is a nonzero multiple of \((1,0)^\top\).
A basis of \(\mathbb{R}^2\) requires two linearly independent vectors, but any two eigenvectors here are multiples of one another. There is no eigenbasis, so the theorem proves that \(\mathbf{A}\) is not diagonalizable over \(\mathbb{R}\). As a direct check of the eigenvector equation, \(\mathbf{A}(1,0)^\top=(2,0)^\top=2(1,0)^\top\); the obstruction is not a lack of eigenvectors, but the lack of enough independent ones to form a basis.
Common Pitfall: Matching the Wrong Eigenvalue to a Column
A diagonal matrix \(\mathbf{D}\) must list eigenvalues in the order of the columns of \(\mathbf{P}\). For a concrete check, let \(\mathbf{A}=\begin{bmatrix}2&0\\0&3\end{bmatrix}\), and choose the eigenvectors in the reversed order \(\mathbf{v}_1=(0,1)^\top\), \(\mathbf{v}_2=(1,0)^\top\). A tempting but wrong choice is \(\mathbf{D}=\begin{bmatrix}2&0\\0&3\end{bmatrix}\), copied in the order of the diagonal entries of \(\mathbf{A}\) rather than matched to the columns. With \(\mathbf{P}=\begin{bmatrix}0&1\\1&0\end{bmatrix}\), we have \(\mathbf{P}^{-1}=\mathbf{P}\), and the wrong choice gives \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}=\begin{bmatrix}3&0\\0&2\end{bmatrix}\ne\mathbf{A}\). The correction is to pair \(\mathbf{v}_1\) with its eigenvalue \(3\) and \(\mathbf{v}_2\) with its eigenvalue \(2\). Then \(\mathbf{D}=\begin{bmatrix}3&0\\0&2\end{bmatrix}\), and \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}=\begin{bmatrix}2&0\\0&3\end{bmatrix}=\mathbf{A}\). Equivalently, check each column equation before forming the product.
Why the Equivalence Is Useful
The two directions of the theorem serve different purposes. If a diagonalization is already known, the columns of \(\mathbf{P}\) provide a basis of eigenvectors without a separate basis search. If an eigenbasis has been found, placing it into \(\mathbf{P}\) and recording the matching eigenvalues in \(\mathbf{D}\) constructs a diagonalization. In either case, the column equation \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) is the most direct check.
The examples also show why the word “basis” is essential. Having one or several eigenvectors is not enough: the vectors must span the whole space and be linearly independent. The scalar matrix has a repeated eigenvalue but still has an eigenbasis, while the last matrix has eigenvectors but not enough independent ones. The theorem makes no claim that eigenvalues must be distinct; it asks whether the eigenvectors can be assembled into a basis.
Check Your Understanding
Use the column equation and the equivalence proved above to organize your reasoning.
- If \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\), what do the \(i\)-th column of \(\mathbf{P}\) and the \(i\)-th diagonal entry of \(\mathbf{D}\) represent?
- Suppose the columns of an invertible \(\mathbf{P}\) satisfy \(\mathbf{A}\mathbf{v}_i=\lambda_i\mathbf{v}_i\). Which diagonal matrix \(\mathbf{D}\) makes \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\)?
- For \(\mathbf{A}=\begin{bmatrix}1&0\\0&1\end{bmatrix}\), give two linearly independent eigenvectors and their eigenvalues.
- Why does finding a nonzero eigenvector not by itself prove that a \(3\times3\) matrix is diagonalizable?
- For \(\mathbf{A}=\begin{bmatrix}5&0\\0&7\end{bmatrix}\), choose the columns of \(\mathbf{P}\) in the order \((0,1)^\top,(1,0)^\top\). What order must the eigenvalues have in \(\mathbf{D}\)?