Tutorials › Linear Algebra › Verifying a Proposed Diagonalization

Diagonalization · Tutorial 535 of 1000

Verifying a Proposed Diagonalization

Check each part of a proposed diagonalization and use an equivalent, shorter matrix equation to verify the factorization.

Intermediate 11 min read

What You'll Learn

  • Check whether a proposed eigenvector matrix is invertible.
  • Match each column of that matrix with the diagonal entry in the same position.
  • Verify a diagonalization using the equation \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\).
  • Multiply out \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) and compare it with \(\mathbf{A}\).
  • Diagnose incorrect ordering and singular eigenvector matrices.

What Must Be Checked

A proposed diagonalization is a claim that a matrix \(\mathbf{A}\) can be written as \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\), where \(\mathbf{D}\) is diagonal and \(\mathbf{P}\) is invertible. Checking only that some entries of \(\mathbf{D}\) look like eigenvalues is not enough: the columns of \(\mathbf{P}\) must be eigenvectors matched, position by position, to the entries of \(\mathbf{D}\). The inverse in the formula also requires that \(\mathbf{P}\) actually be invertible.

Throughout, matrices and vectors have real entries. Suppose \(\mathbf{P}\in\mathbb{R}^{n\times n}\) has columns \(\mathbf{p}_1,\dots,\mathbf{p}_n\), and write the diagonal matrix as \(\mathbf{D}=\operatorname{diag}(\lambda_1,\dots,\lambda_n)\). Thus the \(j\)-th diagonal entry of \(\mathbf{D}\) is \(\lambda_j\). A vector \(\mathbf{p}\ne\mathbf{0}\) is an eigenvector of \(\mathbf{A}\) for the eigenvalue \(\lambda\) when \(\mathbf{A}\mathbf{p}=\lambda\mathbf{p}\).

Definition: A proposed diagonalization of \(\mathbf{A}\) is a pair \((\mathbf{P},\mathbf{D})\) such that \(\mathbf{P}\) is an invertible square matrix, \(\mathbf{D}\) is diagonal, and \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\). The columns of \(\mathbf{P}\) and the diagonal entries of \(\mathbf{D}\) are ordered: column \(j\) must correspond to diagonal entry \(j\).

A Shorter Equation for Verification

Computing the full product \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) is one way to test a claim, but there is a shorter equivalent check. Multiplying the claimed factorization on the right by \(\mathbf{P}\) removes the inverse. This gives a matrix equation whose columns directly test the eigenvector matches.

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\), let \(\mathbf{P}=[\mathbf{p}_1\ \cdots\ \mathbf{p}_n]\in\mathbb{R}^{n\times n}\) be invertible, and let \(\mathbf{D}=\operatorname{diag}(\lambda_1,\dots,\lambda_n)\). The following statements are equivalent:
(1) \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\).
(2) \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\).
(3) \(\mathbf{A}\mathbf{p}_j=\lambda_j\mathbf{p}_j\) for every \(j=1,\dots,n\).

Proof. Assume (1). Right-multiplying both sides by \(\mathbf{P}\) gives \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\mathbf{P}=\mathbf{P}\mathbf{D}\), because \(\mathbf{P}^{-1}\mathbf{P}=\mathbf{I}_n\). Thus (1) implies (2). Conversely, assume (2). Right-multiplying by \(\mathbf{P}^{-1}\) gives \(\mathbf{A}\mathbf{P}\mathbf{P}^{-1}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\), so \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\). Hence (1) and (2) are equivalent. For the equivalence of (2) and (3), the \(j\)-th column of \(\mathbf{A}\mathbf{P}\) is \(\mathbf{A}\mathbf{p}_j\). Since \(\mathbf{D}\) is diagonal, the \(j\)-th column of \(\mathbf{P}\mathbf{D}\) is \(\lambda_j\mathbf{p}_j\). Two matrices are equal exactly when their corresponding columns are equal, so \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) exactly when \(\mathbf{A}\mathbf{p}_j=\lambda_j\mathbf{p}_j\) for every \(j\). \(\square\)

The invertibility hypothesis matters. It ensures that the expression \(\mathbf{P}^{-1}\) exists, and it also ensures that none of the columns of \(\mathbf{P}\) is zero. Indeed, if \(\mathbf{p}_j=\mathbf{0}\), then \(\mathbf{P}\mathbf{e}_j=\mathbf{0}\); multiplying by \(\mathbf{P}^{-1}\) would give \(\mathbf{e}_j=\mathbf{0}\), which is false. Therefore, when the column equations in (3) hold and \(\mathbf{P}\) is invertible, each column is a genuine eigenvector, not the zero vector.

Corollary: For fixed invertible \(\mathbf{P}\) and fixed diagonal \(\mathbf{D}\), there is at most one matrix \(\mathbf{A}\) with \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\).

Proof. If both \(\mathbf{A}\) and \(\mathbf{B}\) satisfy the stated factorization, then \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) and \(\mathbf{B}\mathbf{P}=\mathbf{P}\mathbf{D}\) by the theorem. Thus \(\mathbf{A}\mathbf{P}=\mathbf{B}\mathbf{P}\). Right-multiplying by \(\mathbf{P}^{-1}\) gives \(\mathbf{A}=\mathbf{B}\). \(\square\)

Worked Checks

Worked Example: Verify a 2×2 Diagonalization

Check the proposed factorization for \(\mathbf{A}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\), \(\mathbf{P}=\begin{bmatrix}1&1\\1&-1\end{bmatrix}\), and \(\mathbf{D}=\begin{bmatrix}3&0\\0&1\end{bmatrix}\).

First verify the proposed inverse. Let \(\mathbf{Q}=\frac12\begin{bmatrix}1&1\\1&-1\end{bmatrix}\). Multiplying in both orders gives

$$ \mathbf{P}\mathbf{Q} =\frac12\begin{bmatrix}2&0\\0&2\end{bmatrix} =\mathbf{I}_2, \qquad \mathbf{Q}\mathbf{P} =\frac12\begin{bmatrix}2&0\\0&2\end{bmatrix} =\mathbf{I}_2. $$

Therefore \(\mathbf{P}^{-1}=\mathbf{Q}\), and \(\mathbf{P}\) is invertible. Its first column is \(\mathbf{p}_1=(1,1)^{\top}\) and its second is \(\mathbf{p}_2=(1,-1)^{\top}\). Check each match:

$$ \mathbf{A}\mathbf{p}_1 =\begin{bmatrix}2&1\\1&2\end{bmatrix}\begin{bmatrix}1\\1\end{bmatrix} =\begin{bmatrix}3\\3\end{bmatrix} =3\mathbf{p}_1, \qquad \mathbf{A}\mathbf{p}_2 =\begin{bmatrix}2&1\\1&2\end{bmatrix}\begin{bmatrix}1\\-1\end{bmatrix} =\begin{bmatrix}1\\-1\end{bmatrix} =1\mathbf{p}_2. $$

The columns match the diagonal entries \(3,1\) in order. Equivalently, multiply the two sides of the shortcut equation:

$$ \mathbf{A}\mathbf{P} =\begin{bmatrix}3&1\\3&-1\end{bmatrix}, \qquad \mathbf{P}\mathbf{D} =\begin{bmatrix}3&1\\3&-1\end{bmatrix}. $$

They agree. To check the factorization by multiplying it out, first compute \(\mathbf{P}\mathbf{D}\), then multiply by the inverse:

$$ \mathbf{P}\mathbf{D} =\begin{bmatrix}3&1\\3&-1\end{bmatrix}, \qquad \mathbf{P}\mathbf{D}\mathbf{P}^{-1} =\frac12\begin{bmatrix}3&1\\3&-1\end{bmatrix} \begin{bmatrix}1&1\\1&-1\end{bmatrix} =\begin{bmatrix}2&1\\1&2\end{bmatrix} =\mathbf{A}. $$

Check: both the column equations and the full product give the stated matrix \(\mathbf{A}\), so the proposed diagonalization is valid.

Worked Example: Verify a 3×3 Diagonalization with a Repeated Entry

Check the claim for \(\mathbf{A}=\begin{bmatrix}2&0&0\\0&2&3\\0&0&5\end{bmatrix}\), \(\mathbf{P}=\begin{bmatrix}1&1&0\\0&1&1\\0&0&1\end{bmatrix}\), and \(\mathbf{D}=\begin{bmatrix}2&0&0\\0&2&0\\0&0&5\end{bmatrix}\). The repeated entry in \(\mathbf{D}\) does not change the checking procedure: each column still has its own position-specific match.

Use \(\mathbf{Q}=\begin{bmatrix}1&-1&1\\0&1&-1\\0&0&1\end{bmatrix}\) as the proposed inverse. Direct multiplication gives

$$ \mathbf{P}\mathbf{Q} =\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix} =\mathbf{I}_3, \qquad \mathbf{Q}\mathbf{P} =\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix} =\mathbf{I}_3. $$

Thus \(\mathbf{P}^{-1}=\mathbf{Q}\). The columns are \(\mathbf{p}_1=(1,0,0)^{\top}\), \(\mathbf{p}_2=(1,1,0)^{\top}\), and \(\mathbf{p}_3=(0,1,1)^{\top}\). Their corresponding diagonal entries are \(2,2,5\). Compute:

$$ \mathbf{A}\mathbf{p}_1=\begin{bmatrix}2\\0\\0\end{bmatrix}=2\mathbf{p}_1, \qquad \mathbf{A}\mathbf{p}_2=\begin{bmatrix}2\\2\\0\end{bmatrix}=2\mathbf{p}_2, \qquad \mathbf{A}\mathbf{p}_3=\begin{bmatrix}0\\5\\5\end{bmatrix}=5\mathbf{p}_3. $$

Now check the matrix equation. Multiplying each matrix gives

$$ \mathbf{A}\mathbf{P} =\begin{bmatrix}2&2&0\\0&2&5\\0&0&5\end{bmatrix}, \qquad \mathbf{P}\mathbf{D} =\begin{bmatrix}2&2&0\\0&2&5\\0&0&5\end{bmatrix}. $$

For the full product,

$$ \mathbf{P}\mathbf{D}\mathbf{P}^{-1} =\begin{bmatrix}2&2&0\\0&2&5\\0&0&5\end{bmatrix} \begin{bmatrix}1&-1&1\\0&1&-1\\0&0&1\end{bmatrix} =\begin{bmatrix}2&0&0\\0&2&3\\0&0&5\end{bmatrix} =\mathbf{A}. $$

Check: the inverse products are identity matrices, each column has the required eigenvalue, and the full product returns \(\mathbf{A}\). All parts of the proposed factorization are verified.

Worked Example: An Ordering Error

Consider \(\mathbf{A}=\begin{bmatrix}2&0\\0&3\end{bmatrix}\), \(\mathbf{P}=\begin{bmatrix}1&0\\0&1\end{bmatrix}\), and the proposed \(\mathbf{D}=\begin{bmatrix}3&0\\0&2\end{bmatrix}\). The matrix \(\mathbf{P}\) is invertible, with \(\mathbf{P}^{-1}=\mathbf{I}_2\), but the order of the diagonal entries does not match the columns of \(\mathbf{P}\).

The first column is \(\mathbf{p}_1=(1,0)^{\top}\), and \(\mathbf{A}\mathbf{p}_1=(2,0)^{\top}\ne3\mathbf{p}_1\). The second column is \(\mathbf{p}_2=(0,1)^{\top}\), and \(\mathbf{A}\mathbf{p}_2=(0,3)^{\top}\ne2\mathbf{p}_2\). The shortcut check also fails:

$$ \mathbf{A}\mathbf{P} =\begin{bmatrix}2&0\\0&3\end{bmatrix}, \qquad \mathbf{P}\mathbf{D} =\begin{bmatrix}3&0\\0&2\end{bmatrix}. $$

Since \(\mathbf{P}^{-1}=\mathbf{I}_2\), the full product is \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}=\mathbf{D}\ne\mathbf{A}\). The proposed factorization is false. If we instead pair the first column with \(2\) and the second with \(3\), then \(\mathbf{D}=\operatorname{diag}(2,3)\) and the factorization holds.

When the Proposed Matrix Is Not Invertible

A list of eigenvectors that satisfies some of the expected equations is not, by itself, enough: the matrix of columns must be invertible. If \(\mathbf{P}\) is singular, then \(\mathbf{P}^{-1}\) does not exist, and the proposed expression \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) is not defined. This is a separate check from matching columns to diagonal entries.

Worked Example: A Singular Eigenvector Matrix

Let \(\mathbf{A}=\begin{bmatrix}2&0\\0&3\end{bmatrix}\), \(\mathbf{P}=\begin{bmatrix}1&1\\0&0\end{bmatrix}\), and \(\mathbf{D}=\begin{bmatrix}2&0\\0&3\end{bmatrix}\). The columns of \(\mathbf{P}\) are both \((1,0)^{\top}\), so they are dependent. In particular, \(\mathbf{P}\begin{bmatrix}1\\-1\end{bmatrix}=\begin{bmatrix}0\\0\end{bmatrix}\), although \(\begin{bmatrix}1\\-1\end{bmatrix}\ne\mathbf{0}\). If an inverse \(\mathbf{P}^{-1}\) existed, multiplying this equation on the left by \(\mathbf{P}^{-1}\) would imply \(\begin{bmatrix}1\\-1\end{bmatrix}=\mathbf{0}\), a contradiction. Thus \(\mathbf{P}\) is not invertible.

Also, the second column cannot match the second diagonal entry: \(\mathbf{A}\begin{bmatrix}1\\0\end{bmatrix}=\begin{bmatrix}2\\0\end{bmatrix}\ne\begin{bmatrix}3\\0\end{bmatrix}\). The proposal fails both the invertibility check and the column-match check. No product \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) can be formed with these matrices.

A Reliable Verification Routine

For a proposed factorization, keep the checks in a fixed order. The order prevents an appealing eigenvalue list from distracting from a missing inverse or a mismatched column. When \(\mathbf{P}^{-1}\) is supplied, multiply back to check it; when it is not supplied, compute or otherwise establish the inverse before using the factorization.

1
Check the dimensions and diagonal form.
Confirm that \(\mathbf{A}\) and \(\mathbf{P}\) are \(n\times n\), that \(\mathbf{D}\) is \(n\times n\), and that all off-diagonal entries of \(\mathbf{D}\) are zero.
2
Establish that \(\mathbf{P}\) is invertible.
If a candidate inverse is given, verify its products with \(\mathbf{P}\). If no inverse exists, the proposed factorization cannot be valid.
3
Check the ordered eigenvector matches.
For every column \(\mathbf{p}_j\), calculate \(\mathbf{A}\mathbf{p}_j\) and compare it with \(\lambda_j\mathbf{p}_j\), where \(\lambda_j\) is the \(j\)-th diagonal entry of \(\mathbf{D}\).
4
Compare the matrices.
Check \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\). If this holds and \(\mathbf{P}\) is invertible, the theorem proves the claimed factorization. As a final direct check, multiply \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) and compare it with \(\mathbf{A}\).

Common Pitfall: Matching Eigenvalues Without Matching Positions

A common incorrect argument is: “The entries \(2\) and \(3\) are eigenvalues of \(\mathbf{A}\), so \(\mathbf{D}=\begin{bmatrix}3&0\\0&2\end{bmatrix}\) must work.” The ordering example shows the error concretely. For \(\mathbf{P}=\mathbf{I}_2\), the first column is \((1,0)^{\top}\), and its image is \((2,0)^{\top}\), not \(3(1,0)^{\top}=(3,0)^{\top}\). The second column maps to \((0,3)^{\top}\), not \(2(0,1)^{\top}=(0,2)^{\top}\). The correction is to pair each column with its own eigenvalue, or to reorder the columns and diagonal entries together.

Another useful safeguard is to distinguish a successful shortcut check from an incomplete one. The equation \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) alone does not license writing \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) unless \(\mathbf{P}\) is invertible. Conversely, when invertibility has been verified, the shortcut is not merely suggestive: the theorem proves it is equivalent to the full factorization.

Check Your Understanding

For each proposed diagonalization, identify which checks are needed before accepting the factorization.

  1. State the equation that is equivalent to \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) when \(\mathbf{P}\) is invertible.
  2. If the third column of \(\mathbf{P}\) is \(\mathbf{p}_3\) and the third diagonal entry of \(\mathbf{D}\) is \(\lambda_3\), what equation must be checked?
  3. Why does \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) not by itself establish a diagonalization if \(\mathbf{P}\) is singular?
  4. For \(\mathbf{A}=\begin{bmatrix}4&0\\0&1\end{bmatrix}\), \(\mathbf{P}=\begin{bmatrix}0&1\\1&0\end{bmatrix}\), and \(\mathbf{D}=\begin{bmatrix}1&0\\0&4\end{bmatrix}\), check the ordered column equations.
  5. Explain how multiplying \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) back and comparing with \(\mathbf{A}\) verifies the proposed factorization.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon