Diagonalize Matrix Calculator
Test cases replayed : 5 of 5 match · Methodology · No outside source listed
Enter a 2×2 matrix to get its eigenvalues (the diagonal of D) and eigenvectors (the columns of P), so that A = PDP⁻¹.
Result
Eigenvalue λ₁ (D row 1)
Trace a + d
- Determinant ad − bc
- Eigenvalue λ₂ (D row 2)
- Eigenvector v₁ (P column 1): x
- Eigenvector v₁ (P column 1): y
- Eigenvector v₂ (P column 2): x
- Eigenvector v₂ (P column 2): y
- Diagonalizable over the real numbers?
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Row 1, column 1: enter a number.
- Row 1, column 2: enter a number.
- Row 2, column 1: enter a number.
- Row 2, column 2: enter a number.
- Read the result: Eigenvalue λ₁ (D row 1); the panel also shows Trace a + d, Determinant ad − bc, Eigenvalue λ₂ (D row 2), Eigenvector v₁ (P column 1): x, Eigenvector v₁ (P column 1): y, Eigenvector v₂ (P column 2): x, Eigenvector v₂ (P column 2): y and Diagonalizable over the real numbers?.
How this calculator works
The eigenvalues solve the characteristic equation λ² − (a + d)λ + (ad − bc) = 0: λ = (tr ± √(tr² − 4 det)) ÷ 2.
For each λ, an eigenvector solves (A − λI)v = 0; when b ≠ 0, v = (b, λ − a) works. Putting the eigenvectors as the columns of P and the eigenvalues on the diagonal of D gives A = PDP⁻¹.
A 2×2 matrix is diagonalizable over the reals when its two eigenvalues are real and distinct, or when it is already diagonal. A repeated eigenvalue on a non-diagonal matrix (such as [[1, 1], [0, 1]]) gives only one eigenvector direction, so P is not invertible.
The formula
| Symbol | Meaning |
|---|---|
| Row 1, column 1 | |
| Row 1, column 2 | |
| Row 2, column 1 | |
| Row 2, column 2 | |
| Trace a + d | |
| Determinant ad − bc | |
| Eigenvalue λ₁ (D row 1) |
Worked example
| Row 1, column 1 | 4 |
|---|---|
| Row 1, column 2 | 1 |
| Row 2, column 1 | 2 |
| Row 2, column 2 | 3 |
| Trace a + d | 7 |
|---|---|
| Determinant ad − bc | 10 |
| Eigenvalue λ₂ (D row 2) | 2 |
| Eigenvector v₁ (P column 1): x | 1 |
| Eigenvector v₁ (P column 1): y | 1 |
| Eigenvector v₂ (P column 2): x | 1 |
| Eigenvector v₂ (P column 2): y | -2 |
| Diagonalizable over the real numbers? | Yes: two distinct real eigenvalues |
Eigenvalue λ₁ (D row 1) 5
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What does it mean to diagonalize a matrix?
To write it as A = PDP⁻¹ with D diagonal. Powers then become easy: Aⁿ = PDⁿP⁻¹.
Is every matrix diagonalizable?
No. [[1, 1], [0, 1]] has the repeated eigenvalue 1 but only one eigenvector direction, so it cannot be diagonalized.
Are eigenvectors unique?
Only up to a nonzero multiple: any multiple of an eigenvector is also an eigenvector for the same eigenvalue.