# Diagonalize Matrix Calculator

URL: https://speedycalculator.com/calculators/math/diagonalize-matrix/
Last updated: 2026-11-08

> The diagonalize matrix calculator writes a 2 × 2 or 3 × 3 matrix as A = S·D·S⁻¹, with the eigenvalues on the diagonal of D and the eigenvectors as the columns of S, or explains why it cannot be diagonalized.

## Inputs

- Matrix size
- a₁
- b₁
- c₁
- a₂
- b₂
- c₂
- a₃
- b₃
- c₃

## Results

- Result
- S (eigenvectors as columns)
- D (eigenvalues)
- S⁻¹
- Eigenvalues

## Formula

```
A = S·D·S⁻¹,  D = diag(λ₁, …, λₙ),  S = [v₁ … vₙ]
```

## Explanation

Diagonalization makes matrix powers, exponentials and systems of differential equations easy: Aⁿ = S·Dⁿ·S⁻¹. It is used for Markov chains, vibrations and principal component analysis.

### How to use the Diagonalize Matrix Calculator

- Choose the **matrix size**. The matching grid of fields appears.
- Enter the entries **row by row** (a₁ b₁ c₁ is the first row, a₂ b₂ c₂ the second, and so on).
- Read the result; integer matrices give exact fractions.

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

The eigenvalues come from the characteristic polynomial and the eigenvectors from the null space of A − λI. A matrix is diagonalizable over the reals when it has n independent real eigenvectors.

## Worked example

Inputs: Matrix size: 2 × 2; a₁: 4; b₁: 1; a₂: 2; b₂: 3.

Results: **Result = A = S·D·S⁻¹**; S (eigenvectors as columns) = ⎡ −1/2 1 ⎤
⎣ 1 1 ⎦; D (eigenvalues) = ⎡ 2 0 ⎤
⎣ 0 5 ⎦; S⁻¹ = ⎡ −2/3 2/3 ⎤
⎣ 2/3 1/3 ⎦; Eigenvalues = 2, 5.

## Key terms

- **Eigenvector**: A non-zero vector v with Av = λv.

## FAQ

**When is a matrix diagonalizable?**
When it has a full set of linearly independent eigenvectors.

**Are symmetric matrices always diagonalizable?**
Yes, by an orthogonal matrix.

**Why diagonalize?**
Powers become trivial: Aⁿ = S Dⁿ S⁻¹.

**What about complex eigenvalues?**
The matrix may be diagonalizable over the complex numbers but not over the reals.


## Sources

- [Wolfram MathWorld: Matrix diagonalization](https://mathworld.wolfram.com/MatrixDiagonalization.html)
- [MIT OpenCourseWare: 18.06 Linear Algebra (Gilbert Strang)](https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/)
- [Jim Hefferon: Linear Algebra (free textbook)](https://hefferon.net/linearalgebra/)
