Matrix Diagonalization Calculator
Diagonalize a square matrix by computing eigenvalues, eigenvectors, and the decomposition A = PDP⁻¹. Supports 2×2 to 5×5 matrices with step-by-step solutions, characteristic polynomial, multiplicity analysis, and interactive visualization.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About Matrix Diagonalization Calculator
The Matrix Diagonalization Calculator decomposes any square matrix into the form A = PDP⁻¹, where D is a diagonal matrix of eigenvalues and P is the matrix of eigenvectors. Enter a 2×2 to 5×5 matrix and get the complete factorization with step-by-step solutions, characteristic polynomial, algebraic and geometric multiplicity analysis, and interactive animation of the decomposition.
What Is Matrix Diagonalization?
Matrix diagonalization is the process of finding matrices P and D such that:
$$A = PDP^{-1}$$
where D is a diagonal matrix whose entries are the eigenvalues of A, and P is an invertible matrix whose columns are the corresponding eigenvectors. Equivalently, \(D = P^{-1}AP\), which means D is similar to A.
How to Diagonalize a Matrix
Step 1. Select the matrix size (2×2 to 5×5) and enter values into the grid. You can also click a quick example to load a preset matrix for testing.
Step 2. Click Diagonalize Matrix. The calculator computes the characteristic polynomial det(A − λI) and finds its roots (eigenvalues).
Step 3. For each eigenvalue, the tool solves (A − λI)x = 0 to find eigenvectors, and checks algebraic vs. geometric multiplicity to determine if the matrix is diagonalizable.
Step 4. If diagonalizable, the calculator constructs P (eigenvectors as columns), D (eigenvalues on diagonal), and P⁻¹, then verifies PDP⁻¹ = A.
Step 5. Explore the animated decomposition to visualize how A factors into P × D × P⁻¹, and step through the full solution using the navigation controls.
When Is a Matrix Diagonalizable?
| Condition | Diagonalizable? | Example |
|---|---|---|
| n distinct real eigenvalues | Always yes | \(\begin{pmatrix}2&1\\0&3\end{pmatrix}\) → λ = 2, 3 |
| Symmetric matrix (A = Aᵀ) | Always yes (real λ) | Spectral theorem guarantees orthogonal diagonalization |
| Repeated λ with AM = GM | Yes | \(\begin{pmatrix}5&0\\0&5\end{pmatrix}\) → λ = 5 (AM=2, GM=2) |
| Repeated λ with AM > GM | No | \(\begin{pmatrix}1&1\\0&1\end{pmatrix}\) → λ = 1 (AM=2, GM=1) |
| Complex eigenvalues | Over ℂ: check AM = GM | \(\begin{pmatrix}0&-1\\1&0\end{pmatrix}\) → λ = ±i |
Algebraic vs. Geometric Multiplicity
For each eigenvalue λ:
• Algebraic multiplicity (AM): the number of times λ appears as a root of the characteristic polynomial det(A − λI) = 0.
• Geometric multiplicity (GM): the dimension of the eigenspace ker(A − λI), i.e., the number of linearly independent eigenvectors.
A matrix is diagonalizable if and only if GM = AM for every eigenvalue. The condition 1 ≤ GM ≤ AM always holds.
Why Diagonalization Matters
Diagonalization vs. Other Decompositions
| Decomposition | Form | Requirement |
|---|---|---|
| Eigendecomposition (this tool) | A = PDP⁻¹ | n independent eigenvectors |
| Spectral (symmetric) | A = QΛQᵀ | A = Aᵀ (Q orthogonal) |
| Jordan Normal Form | A = PJP⁻¹ | Any square matrix |
| SVD | A = UΣVᵀ | Any matrix (even non-square) |
| LU Decomposition | A = LU | Square, with conditions |
Frequently Asked Questions
What does it mean to diagonalize a matrix?
Diagonalizing a matrix A means finding an invertible matrix P and a diagonal matrix D such that A = PDP⁻¹. The diagonal entries of D are the eigenvalues, and the columns of P are the corresponding eigenvectors.
When is a matrix diagonalizable?
A matrix is diagonalizable if and only if, for every eigenvalue, the geometric multiplicity equals the algebraic multiplicity. Equivalently, there must be n linearly independent eigenvectors for an n×n matrix. All symmetric real matrices and all matrices with n distinct eigenvalues are diagonalizable.
What is the difference between algebraic and geometric multiplicity?
The algebraic multiplicity is how many times an eigenvalue appears as a root of the characteristic polynomial. The geometric multiplicity is the dimension of the eigenspace, i.e., the number of linearly independent eigenvectors for that eigenvalue. A matrix is diagonalizable precisely when these two quantities are equal for every eigenvalue.
Can a matrix with complex eigenvalues be diagonalized?
Yes, a matrix with complex eigenvalues can still be diagonalized over the complex numbers, as long as the geometric multiplicity equals the algebraic multiplicity for each eigenvalue. The resulting P and D matrices will contain complex entries.
What are the applications of matrix diagonalization?
Matrix diagonalization is used to compute matrix powers efficiently (A^k = PD^kP⁻¹), solve systems of differential equations, analyze Markov chains and steady-state behavior, perform principal component analysis in statistics, and understand linear transformations in physics and engineering.
Reference this content, page, or tool as:
"Matrix Diagonalization Calculator" at https://MiniWebtool.com// from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: 2026-04-12
You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.