Matrix Diagonalization & Similarity Transform
Compute the diagonalization1
of a square matrix \(A\), finding matrices \(P\), \(D\), \(P^{-1}\) such that
\(P^{-1}AP = D\)2.
Matrix entries can be real, complex, fractions, or expressions like \(\pi\), \(e\), \(\sqrt{2}\), etc.
If \(A\) is diagonalizable, we find matrices \(P\) (whose columns are eigenvectors), \(D\) (diagonal matrix of eigenvalues), and \(P^{-1}\) such that:
\( A = P D P^{-1} \quad \text{or equivalently} \quad D = P^{-1} A P \)
Similarity Transformation:
Matrices \(A\) and \(D\) are similar3, meaning they represent the same linear transformation in different bases.
When is \(A\) diagonalizable?
- If \(A\) has \(n\) linearly independent eigenvectors (always true if eigenvalues are distinct)
- If \(A\) is symmetric (or Hermitian), it's always orthogonally diagonalizable
- Algebraic multiplicity = geometric multiplicity for all eigenvalues4
Applications:
- Computing matrix powers: \(A^k = PD^kP^{-1}\)
- Solving systems of differential equations
- Principal component analysis (PCA)
Enter the matrix size n and click Generate Matrix to create an n×n input grid.
1 — Set Up
Loads a pre-filled 4×4 matrix — ready to diagonalize.
2 — Compute
Finds eigenvalues and eigenvectors, then diagonalizes the matrix as A = PDP⁻¹.
Resets all dimensions, matrix entries, and results.