Diagonalize Matrix Calculator

Quick answer

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.

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

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

  1. Choose the matrix size. The matching grid of fields appears.
  2. Enter the entries row by row (a₁ b₁ c₁ is the first row, a₂ b₂ c₂ the second, and so on).
  3. 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.

Formula

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

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.

Frequently asked questions

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

  1. Wolfram MathWorld: Matrix diagonalization
  2. MIT OpenCourseWare: 18.06 Linear Algebra (Gilbert Strang)
  3. Jim Hefferon: Linear Algebra (free textbook)

Cite this calculator

Speedy Calculator. (2026). Diagonalize Matrix Calculator. Speedy Calculator. https://speedycalculator.com/calculators/math/diagonalize-matrix/