Real 2×2 matrix diagonalization: enter matrix entries for A, then calculate P, D, and P-1 such that A = P D P-1 (when possible).
What this diagonalization matrix calculator does
This tool computes whether a real 2×2 matrix can be diagonalized over the real numbers. If diagonalization is possible, it returns:
- Eigenvalues of the matrix
- Eigenvectors used as columns of P
- The diagonal matrix D
- The inverse matrix P-1
- A numeric reconstruction check using P D P-1
Quick refresher: diagonalization
A matrix A is diagonalizable if there exists an invertible matrix P and a diagonal matrix D such that:
The columns of P are linearly independent eigenvectors of A, and the diagonal entries of D are the matching eigenvalues.
Why this matters
Diagonalization makes powers and exponentials of matrices much easier:
- An = P Dn P-1
- eAt = P eDt P-1
This shows up in differential equations, dynamical systems, Markov-type models, and repeated linear transformations.
How to use this calculator
- Enter values in the 2×2 grid for matrix A.
- Click Diagonalize Matrix.
- Read the status message:
- Diagonalizable over ℝ
- Not diagonalizable over ℝ
- Complex eigenvalues case
- Review P, D, and P-1 when provided.
When a 2×2 matrix is not diagonalizable
For real 2×2 matrices, a few important cases prevent real diagonalization:
- Complex eigenvalues (negative discriminant): no real eigenbasis.
- Repeated eigenvalue with one eigenvector: the matrix is defective.
For repeated eigenvalues in 2×2, diagonalization occurs only when the matrix is already a scalar multiple of the identity.
Example to try
Use this matrix (already loaded by default):
You should see two distinct real eigenvalues, independent eigenvectors, and a successful decomposition.
Practical notes
- This calculator works numerically with rounding for display.
- Very close eigenvalues can create small floating-point artifacts.
- Current implementation targets real 2×2 matrices.