# Diagonalization

Mathematics I · Linear Algebra · https://tryals.app/learn/mathematics-i/diagonalization

## Diagonalization Basics

Eigenvectors give a matrix its **natural axes**. **Diagonalization** exploits this: if a matrix has enough independent eigenvectors to form a basis, the transformation is simply scaling along each axis via a **diagonal matrix**.

A square matrix $A$ is **diagonalizable** if it can be written as:

$$A = P D P^{-1}$$

| Component | Meaning ||
| --- | --- |
| $D$ | **Diagonal** matrix containing eigenvalues on its diagonal |
| $P$ | Matrix with corresponding **eigenvectors** as columns |
| $P^{-1}$ | Inverse of matrix $P$, reversing the coordinate change |

An $n \times n$ matrix is diagonalizable if and only if it has $n$ linearly independent eigenvectors. A sufficient condition is having $n$ **distinct eigenvalues**, as their eigenvectors are automatically independent.

## Powers and Pitfalls

The true payoff of diagonalization is computational. Raising a matrix to a power becomes trivial using the formula:

$$A^k = P D^k P^{-1}$$

Here, $D^k$ just raises each diagonal entry to the power $k$. This avoids enormous multiplication work when computing $A^{100}$, enabling fast solutions to linear recurrences and differential equations.

| Property | Status |
| --- | --- |
| Distinct Eigenvalues | Always diagonalizable (Sufficient) |
| Repeated Eigenvalues | May or may not be diagonalizable (Must check) |
| **Defective Matrix** | Matrix with repeated eigenvalue lacking enough independent eigenvectors. **Cannot be diagonalized.** |

> **Common pitfall:** Assuming every square matrix is diagonalizable. You must always check the actual number of independent eigenvectors.

## Practice questions

4 of this lesson's 10 practice questions, with answers. The full set is in the app.

### 1. Order the steps of diagonalizing an n by n matrix A.

**Answer:**

1. Find the eigenvalues from the characteristic equation
2. Find a basis of the eigenspace for each eigenvalue
3. Check that the eigenvectors collected together number n and are independent
4. Put those eigenvectors as the columns of P and the matching eigenvalues on the diagonal of D
5. Write A = P D P inverse

**Why:** The check at step 3 is the one people skip: if the eigenvectors number fewer than n, no P exists and the process must stop. When they do number n, the j-th column of P must be an eigenvector for the j-th diagonal entry of D, misaligning them silently produces a wrong factorisation.

Page: https://tryals.app/practice/mathematics-i/diagonalization/order-the-steps-of-diagonalizing-an-n-by-n-matrix-a

### 2. Select every TRUE statement about diagonalization.

A. Every square matrix is diagonalizable
B. Having n distinct eigenvalues guarantees diagonalizability
C. In A = P D P inverse the columns of P are eigenvectors of A
D. The diagonal entries of D are the eigenvalues of A
E. A repeated eigenvalue always prevents diagonalization

**Answer:** B. Having n distinct eigenvalues guarantees diagonalizability; C. In A = P D P inverse the columns of P are eigenvectors of A; D. The diagonal entries of D are the eigenvalues of A

**Why:** Distinct eigenvalues force independence and hence diagonalizability, and P and D are built exactly from eigenvectors and eigenvalues. But some matrices are defective, so not every matrix is diagonalizable, and the identity shows repetition alone is harmless.

Page: https://tryals.app/practice/mathematics-i/diagonalization/select-every-true-statement-about-diagonalization

### 3. Not every matrix is diagonalizable. What is actually missing when one is not?

A. Enough independent eigenvectors to form a basis
B. Symmetry, which is required for the change of basis to exist
C. A non-zero determinant, without which diagonalisation is impossible
D. Real eigenvalues, since complex ones cannot be placed on a diagonal

**Answer:** A. Enough independent eigenvectors to form a basis

**Why:** Diagonalising is choosing a basis of eigenvectors, so the failure is not having enough of them, a shear has a repeated eigenvalue and a single direction, leaving the basis one vector short. Jordan normal form is what you settle for: as close to diagonal as such a matrix can be pushed.

Page: https://tryals.app/practice/mathematics-i/diagonalization/not-every-matrix-is-diagonalizable-what-is-actually-missing-when-one

### 4. Computing A^100 directly means ninety-nine matrix multiplications. Through A = PDP⁻¹ it takes one hundred scalar powers and two multiplications. Why does the change of basis make the work collapse?

A. Because D is smaller than A, so multiplying it is faster.
B. Because diagonal matrices commute with everything, which allows the powers to be rearranged.
C. Because P⁻¹ is the inverse of P, so PP⁻¹ = I removes ninety-eight of the multiplications by cancelling A with itself.
D. Because in an eigenvector basis the matrix only scales each axis.

**Answer:** D. Because in an eigenvector basis the matrix only scales each axis.

**Why:** A² = PDP⁻¹PDP⁻¹ = PD²P⁻¹, each interior P⁻¹P becomes the identity and disappears, and D^100 is nearly free, since a diagonal matrix has no interaction between entries. Underneath, the matrix stretches each eigen-axis by its own factor and P is only a translation into that coordinate system. The same idea decouples systems of differential equations.

Page: https://tryals.app/practice/mathematics-i/diagonalization/computing-a-100-directly-means-ninety-nine-matrix-multiplications
