Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Matrix Diagonalization: Conditions and Proofs

Hello! Welcome to the next lesson in our journey through linear algebra.

Introduction

In our last lesson, we mastered the procedure for finding eigenvectors by solving the homogeneous system . We also introduced the crucial concepts of algebraic and geometric multiplicity and saw a preview of what happens when a matrix has a "shortage" of linearly independent eigenvectors.

Today, we will build directly on that foundation to explore one of the most powerful concepts in linear algebra: diagonalization. The central goal of this lesson is to perform the diagonalization of a matrix and prove the conditions under which a matrix is diagonalizable. We will formally define what it means for a matrix to be similar to a diagonal matrix, derive the famous diagonalization equation , and, most importantly, establish the rigorous mathematical conditions that guarantee a matrix can be diagonalized.

This process is not just an abstract exercise; it forms the basis for many advanced techniques in AI and data science, including the Principal Component Analysis (PCA) we will study next.

1. The Diagonalization Equation

At its core, diagonalization is about changing our coordinate system. We want to find a basis, composed of the matrix's eigenvectors, in which the linear transformation represented by becomes simple—a mere scaling along the basis vectors.

A matrix is diagonalizable if it is similar to a diagonal matrix . This means there exists an invertible matrix such that:

Rearranging this gives the more common form, known as the eigendecomposition of :

Let's see how this equation naturally arises from the eigenvalue-eigenvector relations we already know.

Suppose our matrix has linearly independent eigenvectors, , with corresponding eigenvalues . We have separate equations:



We can consolidate these equations into a single, elegant matrix equation.

Diagonalizing a Matrix

Professor Gilbert Strang provides a masterful derivation of the matrix form of the eigenvalue equations, leading directly to the diagonalization formula. Pay close attention to how the individual vector equations are assembled into one matrix equation.

Watch the video from the beginning to 06:31. The first part (until 04:20) shows the construction of AV = VΛ. The second part (from 04:20 to 06:31) shows how this is rearranged into the two standard forms of the diagonalization equation.

As shown in the video, by creating a matrix whose columns are the eigenvectors and a diagonal matrix whose diagonal entries are the corresponding eigenvalues, we arrive at:

Since we assumed the eigenvectors were linearly independent, the matrix is invertible. This allows us to multiply by on the right to isolate , or on the left to isolate :

This image provides a clear visual summary of the components.

Matrix Diagonalization Overview
This diagram illustrates the relationship between a matrix A, its eigenvectors (forming the columns of the modal matrix P, here denoted as X), and its eigenvalues (forming the diagonal entries of the diagonal matrix D). It concisely shows the transformation D = P⁻¹AP.

The Power of Diagonalization

Why is this useful? One immediate application is in computing powers of a matrix. If we need to compute , the calculation can be tedious. However, with the diagonalized form, it becomes trivial.

Diagonalizing a Matrix

Professor Strang continues his lecture to explain this powerful application.

Watch the segment from 06:31 to 09:40. Notice how the V⁻¹V terms in the middle cancel out, leaving a simple expression involving the power of the diagonal matrix D.

As you saw, computing simplifies beautifully:

Since is diagonal, is just the diagonal matrix with each entry raised to the -th power. This is computationally far more efficient and is fundamental to analyzing systems that evolve over time (discrete dynamical systems).

2. The Condition for Diagonalizability: The Proof

We began our derivation by assuming we had linearly independent eigenvectors for our matrix . It turns out this is not just a convenient starting point; it is the fundamental condition for diagonalizability. This leads to a crucial theorem.

Theorem: An matrix is diagonalizable if and only if has linearly independent eigenvectors.

A set of linearly independent eigenvectors in forms a basis for . Such a basis is called an eigenbasis. So, we can restate the theorem as: A matrix is diagonalizable if and only if it has an eigenbasis.

This is an "if and only if" statement, so the proof requires two parts:

  1. If is diagonalizable, then it has linearly independent eigenvectors.
  2. If has linearly independent eigenvectors, then it is diagonalizable.

Diagonalizing Matrices and Diagonalizability | Linear Algebra

The following video provides a clear and rigorous proof of this central theorem. The proof is constructive, meaning it doesn't just prove the statement but also shows you exactly how to build the matrices P and D.

Watch the segment from 01:04 to 08:53. Follow both directions of the proof carefully. This is the theoretical core of today's lesson.

To solidify your understanding of this proof, let's briefly review the logic here, which is also laid out in the Harvard lecture notes.

Unit 16: Diagonalization

These notes from Harvard's Math 22B course provide a concise, formal proof of the same theorem. Reading a proof in text after seeing it in a video can help reinforce the logical steps.

Read the proof under the first theorem in section 16.3. Compare its notation (using S for the eigenvector matrix) and structure to the one presented in the video.

This theorem provides the definitive answer to our question. A matrix is diagonalizable precisely when we can find a basis for the entire space consisting of that matrix's eigenvectors. The "shortage" of eigenvectors we discussed in the last lesson is exactly what makes a matrix non-diagonalizable.

3. How to Determine if a Matrix is Diagonalizable

The theorem is clear, but how do we check for linearly independent eigenvectors in practice? There are two key conditions we can use.

A. A Sufficient Condition: Distinct Eigenvalues

A straightforward shortcut exists if all eigenvalues are unique.

Theorem: If an matrix has distinct eigenvalues, then it is diagonalizable.

Proof Sketch: The proof for this relies on another theorem stating that eigenvectors corresponding to distinct eigenvalues are always linearly independent. Since we have distinct eigenvalues, we are guaranteed to find corresponding linearly independent eigenvectors, which satisfies the main condition for diagonalizability.

Unit 16: Diagonalization

The Harvard notes provide a formal proof of this sub-theorem: that distinct eigenvalues imply linearly independent eigenvectors.

Read the theorem and its proof in section 16.4. The proof is elegant but dense; it works by assuming linear dependence and showing it leads to a contradiction. Don't worry if every step isn't immediately obvious, but grasp the overall strategy.

Important: This condition is sufficient, but not necessary. A matrix with repeated eigenvalues can still be diagonalizable. The identity matrix , for example, is already diagonal, but all its eigenvalues are 1.

B. The Necessary and Sufficient Condition: Multiplicities

This brings us to the most complete and powerful criterion, which connects back to the concepts from our previous lesson.

Theorem (Diagonalization Variant): An matrix is diagonalizable if and only if for every eigenvalue :

Recall:

  • Algebraic Multiplicity (AM): The number of times appears as a root in the characteristic polynomial.
  • Geometric Multiplicity (GM): The dimension of the eigenspace for , which is the number of linearly independent eigenvectors for that .

We know that for any eigenvalue, . A matrix is diagonalizable if and only if the geometric multiplicity "reaches" the algebraic multiplicity for all eigenvalues. If for any eigenvalue the GM is strictly less than the AM, the matrix is not diagonalizable because there is a "shortage" of eigenvectors.

Diagonalization

This resource from Georgia Tech's interactive linear algebra textbook provides a very clear statement and justification of this multiplicity-based criterion.

Read the subsection 'Algebraic and Geometric Multiplicity'. Focus on the definitions, the theorem stating GM ≤ AM, and the 'Diagonalization Theorem, Variant', which formalizes the condition we've just discussed.

Test your understanding!

Let's say a 5x5 matrix has the characteristic polynomial .

  1. What are the eigenvalues and their algebraic multiplicities?
  2. To check if is diagonalizable, what must you find, and what specific conditions must be met?
Show answer
  1. The eigenvalues are and .

    • The algebraic multiplicity of is 2.
    • The algebraic multiplicity of is 3.
  2. To check for diagonalizability, you must find the geometric multiplicity for each eigenvalue.

    • Find the dimension of the null space of . This is the geometric multiplicity of . For to be diagonalizable, this dimension must be 2.
    • Find the dimension of the null space of . This is the geometric multiplicity of . For to be diagonalizable, this dimension must be 3.

    If both of these conditions are met, the matrix is diagonalizable. If even one of them fails (e.g., if the GM of is only 1), the matrix is not diagonalizable.

4. The Diagonalization Procedure: An Example

Let's synthesize everything into a concrete procedure and walk through an example.

Steps to Diagonalize an Matrix :

  1. Find the eigenvalues of by solving the characteristic equation . Note their algebraic multiplicities.
  2. Find a basis for each eigenspace. For each distinct eigenvalue , find a basis for the null space of . The dimension of this basis is the geometric multiplicity of .
  3. Check for diagonalizability. Does the geometric multiplicity equal the algebraic multiplicity for every eigenvalue? Equivalently, do you have a total of linearly independent eigenvectors from all the eigenspaces combined?
    • If no, the matrix is not diagonalizable.
    • If yes, proceed to the next step.
  4. Construct and .
    • Create the matrix whose columns are the linearly independent eigenvectors you found.
    • Create the diagonal matrix whose diagonal entries are the eigenvalues corresponding to the eigenvectors in , in the same order.
  5. You now have the diagonalization . You can verify your work by checking if .

Diagonalizing Matrices and Diagonalizability | Linear Algebra

Let's watch a complete example of diagonalizing a 3x3 matrix, including the check for non-diagonalizability in a different case.

Watch the video from 11:12 to 18:15. The first part (11:12 - 15:37) is a full worked example of diagonalizing a 3x3 matrix with three distinct eigenvalues. The second part (15:37 - 18:15) shows an example of a 3x3 matrix that is not diagonalizable and explains why by comparing geometric and algebraic multiplicities.

Conclusion

Today, we have delved into the theory and practice of matrix diagonalization. We established that this powerful technique is fundamentally linked to the eigenvector structure of a matrix.

Key Takeaways:

  • A matrix is diagonalizable if it can be written as , where is an invertible matrix of eigenvectors and is a diagonal matrix of corresponding eigenvalues.
  • The necessary and sufficient condition for an matrix to be diagonalizable is that it must possess linearly independent eigenvectors.
  • This condition is equivalent to requiring that for every eigenvalue, its geometric multiplicity (the dimension of its eigenspace) must be equal to its algebraic multiplicity (its multiplicity as a root of the characteristic polynomial).
  • If a matrix has distinct eigenvalues, it is guaranteed to be diagonalizable.

Preview of the Next Lesson:
The eigendecomposition is the first major matrix factorization we have studied in depth. It is exceptionally useful when is a square matrix that represents a mapping from a vector space to itself. In our next lesson, we will apply this concept to a specific, highly important matrix in data science: the covariance matrix. By performing an eigendecomposition on the covariance matrix of a dataset, we will derive the formulation of Principal Component Analysis (PCA), a cornerstone of dimensionality reduction.

Can't find a good explanation? Sign up and we'll make it for you

Sign up