Spectral Theorem Demonstration
Run the Spectral Theorem Demo Fullscreen
Edit the MicroSim with the p5.js editor
About This MicroSim
The Spectral Theorem is one of the most beautiful results in linear algebra. It states that every symmetric matrix can be orthogonally diagonalized: A = QΛQᵀ, where Q is orthogonal and Λ is diagonal.
Key Features:
- Symmetric matrix input: Automatically enforces a₁₂ = a₂₁
- Orthogonal decomposition: See Q, Λ, and Qᵀ matrices
- Geometric visualization: Orthogonal eigenvectors shown at right angles
- Orthogonality verification: Confirms q₁ · q₂ = 0 and QᵀQ = I
The Spectral Theorem
For any real symmetric matrix A (where A = Aᵀ):
A = QΛQᵀ
Where: - Q is an orthogonal matrix (Qᵀ = Q⁻¹) - Columns of Q are orthonormal eigenvectors - Λ is a diagonal matrix of eigenvalues - All eigenvalues are real (not complex)
Why Symmetric Matrices Are Special
| Property | General Matrix | Symmetric Matrix |
|---|---|---|
| Eigenvalues | May be complex | Always real |
| Eigenvectors | Not orthogonal | Orthogonal for distinct λ |
| Diagonalizable | Not guaranteed | Always |
| P⁻¹ computation | Matrix inversion | Just Pᵀ (transpose) |
How to Use
- Click matrix cells to edit values (symmetry is maintained)
- Use "Random Symmetric" for new examples
- Observe the decomposition A = QΛQᵀ
- Check orthogonality: q₁ · q₂ should equal 0
Embedding
1 | |
Lesson Plan
Learning Objectives
Students will be able to:
- State the spectral theorem for real symmetric matrices
- Verify that eigenvectors of symmetric matrices are orthogonal
- Explain why Q⁻¹ = Qᵀ for orthogonal matrices
- Apply the spectral theorem to decompose symmetric matrices
Suggested Activities
- Verify decomposition: Multiply QΛQᵀ and confirm it equals A
- Check orthogonality: Compute q₁ · q₂ for several examples
- Non-symmetric: What happens if you try a non-symmetric matrix?
- Repeated eigenvalues: Test A = [[2, 0], [0, 2]]
Assessment Questions
- Why must eigenvalues of symmetric matrices be real?
- If A is symmetric with eigenvalues 3 and 7, what are the eigenvalues of A²?
- What is the computational advantage of QᵀQ = I?