Diagonalize Matrix Calculator
Diagonalize matrices effortlessly: enter a square matrix to compute eigenvalues, eigenvectors, and P D P⁻¹ form, with clear steps instantly.
Equation Preview
Helping Notes
- Goal: find eigenvalues/eigenvectors of A, build P from eigenvectors and D = diag(eigenvalues); then A = P D P⁻¹. :contentReference[oaicite:2]{index=2}
- Diagonalizable ⇔ number of linearly independent eigenvectors equals matrix size (full set of n eigenvectors).
- Real matrices may have complex eigenpairs; formatting handles complex numbers automatically. :contentReference[oaicite:3]{index=3}
- Examples: symmetric matrices are always diagonalizable (orthogonally), while Jordan blocks like [[1,1],[0,1]] are not.
Results
Diagonalizability & Summary
Eigenvalues & Eigenvectors
P, D and Check (P⁻¹ A P ≈ D)
Error
What is Diagonalize Matrix Calculator?
A Diagonalize Matrix Calculator automates the process of determining whether a square matrix can be written as a similar diagonal matrix and, if so, constructs the change-of-basis matrix and the diagonal form. Diagonalization expresses a matrix \(A\) as \(A=PDP^{-1}\), where \(D\) contains eigenvalues and the columns of \(P\) are corresponding eigenvectors. This representation simplifies matrix powers, exponentials, and systems of differential equations. The key building blocks are the characteristic polynomial, eigenvalues, eigenvectors, and the comparison between algebraic and geometric multiplicities.
About the Diagonalize Matrix Calculator
The tool accepts any \(n\times n\) numeric matrix. It computes eigenvalues, tests diagonalizability, and if possible returns \(P\) and \(D\). It documents each step—forming \(\det(A-\lambda I)\), solving null spaces for eigenvectors, counting geometric multiplicities, and assembling \(P\). If the matrix is not diagonalizable (defective), it explains why and may suggest alternatives (e.g., Jordan form or Schur form). You can choose real or complex mode; for real inputs with complex conjugate pairs, the calculator reports complex \(P\) and \(D\) or indicates that real diagonalization is impossible.
How to Use this Diagonalize Matrix Calculator
- Enter your square matrix (2×2, 3×3, …) using rows separated by semicolons.
- Choose computation mode (real or complex) and precision if available.
- Run the solver to compute eigenvalues, eigenvectors, and the diagonalization test.
- If diagonalizable, read off \(P\) (eigenvectors as columns) and \(D\) (eigenvalues on the diagonal).
- Use \(A^k = P D^k P^{-1}\) or \(e^{tA} = P e^{tD} P^{-1}\) for powers and exponentials.
Examples
Example 1: Diagonalizable 2×2
Let \(A=\begin{bmatrix}4&1\\0&2\end{bmatrix}\). Eigenvalues are \(4,2\); compute eigenvectors and build \(P\), \(D\).
Example 2: Not diagonalizable
Jordan block \(J=\begin{bmatrix}3&1\\0&3\end{bmatrix}\) has one eigenvalue \(3\) with a single eigenvector; geometric multiplicity is 1 < algebraic multiplicity 2.
Example 3: Diagonalizable 3×3 with repeated eigenvalue
\(A=\operatorname{diag}(2,2,5)\) is diagonalizable since the eigenspace for \(\lambda=2\) has dimension 2 (equals its algebraic multiplicity).
FAQs
When is a matrix diagonalizable?
When the sum of eigenspace dimensions equals the matrix size; distinct eigenvalues guarantee this condition.
Do repeated eigenvalues prevent diagonalization?
Not necessarily. It fails only if the geometric multiplicity is smaller than the algebraic multiplicity for some eigenvalue.
Can every real matrix be diagonalized over the reals?
No. Some require complex eigenvalues; diagonalization may be possible over the complex field instead.
What is the benefit of diagonalization?
It simplifies computations of powers and exponentials and decouples linear systems via change of basis.
What if my matrix is not diagonalizable?
Consider Jordan normal form, Schur decomposition, or numerical methods based on eigenvalue decompositions.
Does symmetry guarantee diagonalization?
Yes for real symmetric matrices: they are orthogonally diagonalizable with an orthonormal eigenbasis.