Advanced

Diagonalize a 2×2 Matrix Calculator

Enter the four entries of a 2×2 real matrix to find its eigenvalues (λ₁, λ₂), eigenvectors, the transition matrix P, and the diagonal matrix D such that A = PDP⁻¹ — with a full step-by-step solution and a linear-transform visualization.
Row 1, column 1
Row 1, column 2
Row 2, column 1
Row 2, column 2
Eigenvalue λ₁
5

Larger eigenvalue of A

λ₁
5
λ₂
2
trace(A) = λ₁+λ₂
7
det(A) = λ₁·λ₂
10
Matrix P (columns = eigenvectors)
[[1, 1], [1, -2]]
D = diag(λ₁, λ₂)
[[5, 0], [0, 2]]
P⁻¹
[[0.667, 0.333], [0.333, -0.333]]
Step-by-step diagonalization
1

Characteristic polynomial det(A − λI) = 0

λ² − 7λ + 10 = 0
2

Discriminant

Δ = (7)² − 4·(10) = 9
3

λ₁

(7 + √9) / 2 = 5
4

λ₂

(7 − √9) / 2 = 2
5

Eigenvector for λ₁ (A − λ₁I)v = 0

v₁ = [1, 1]ᵀ
6

Eigenvector for λ₂ (A − λ₂I)v = 0

v₂ = [1, -2]ᵀ
=

A = P D P⁻¹

D = diag(5, 2)
Linear transformation by A — the shaded parallelogram shows the image of the unit square
Step by step
  1. 1

    Trace = a + d

    4 + 3 = 7
  2. 2

    Determinant = ad − bc

    4 × 3 − 1 × 2 = 10
  3. 3

    Discriminant Δ = T² − 4D

    7² − 4 × 10 = 9
    Δ > 0 means two distinct real eigenvalues.
  4. 4

    Eigenvalue λ₁ = (T + √Δ) ÷ 2

    (7 + √9) ÷ 2 = 5
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

For a 2×2 real matrix, solve the characteristic polynomial λ² − trace·λ + det = 0 for eigenvalues λ₁, λ₂. Form P from the eigenvectors and compute P⁻¹ to write A = PDP⁻¹ with D = diag(λ₁, λ₂). Diagonalization fails when eigenvalues are complex (Δ < 0) or a repeated eigenvalue has only one eigenvector.

Formula
det(A − λI) = 0 → λ² − trace(A)·λ + det(A) = 0 • A = PDP⁻¹, D = diag(λ₁, λ₂)
How this is calculated

A square matrix A is diagonalizable if it can be written as A = PDP⁻¹, where D is a diagonal matrix whose entries are the eigenvalues and P is the matrix of corresponding eigenvectors. This decomposition is useful because powers and exponentials of A reduce to simple scalar operations on D.

For a 2×2 matrix, the eigenvalues are the roots of the characteristic polynomial det(A − λI) = λ² − trace(A)·λ + det(A) = 0. The discriminant Δ = trace² − 4·det determines the nature of the roots: if Δ > 0 there are two distinct real eigenvalues and A is always diagonalizable; if Δ = 0 there is one repeated eigenvalue and A is diagonalizable only if it equals a scalar multiple of the identity matrix; if Δ < 0 the eigenvalues are complex conjugates and A is not diagonalizable over the real numbers.

For each real eigenvalue λᵢ, the corresponding eigenvector is any nonzero solution to (A − λᵢI)v = 0. The eigenvectors form the columns of P. P⁻¹ is computed by the standard 2×2 inverse formula: P⁻¹ = (1/det(P)) × [[p₂₂, −p₁₂], [−p₂₁, p₁₁]]. This calculator normalises the eigenvectors by a simple free-variable assignment (not by unit length) to keep the arithmetic exact.

Frequently asked questions

A 2×2 matrix is not diagonalizable over ℝ when (1) the discriminant of the characteristic polynomial is negative — eigenvalues are complex; or (2) the discriminant is zero (repeated eigenvalue) but the matrix is not a scalar multiple of the identity — it has only one linearly independent eigenvector (a Jordan block). In both cases this calculator explains the reason.

Any nonzero scalar multiple of an eigenvector is also an eigenvector for the same eigenvalue. This calculator picks a convenient representative (setting a free variable to 1) to keep the entries simple. You can scale the columns of P by any nonzero constant; as long as P is invertible the decomposition A = PDP⁻¹ remains valid.

Diagonalization simplifies repeated matrix operations: Aⁿ = PDⁿP⁻¹, and since D is diagonal, Dⁿ just raises each diagonal entry to the n-th power. It also enables fast computation of matrix exponentials (eᴬ = P·eᴰ·P⁻¹) and gives insight into the long-run behaviour of linear dynamical systems.

Also known as

matrix diagonalization calculator
eigenvalue eigenvector 2x2 matrix
pdp inverse decomposition
characteristic polynomial solver
matrix diagonal form
eigendecomposition calculator
diagonalize 2x2 matrix step by step

APA

TG we-Calculate Editorial Team. (2026). Diagonalize a 2×2 Matrix Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/diagonalize-matrix-calculator

Chicago

TG we-Calculate Editorial Team. "Diagonalize a 2×2 Matrix Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/diagonalize-matrix-calculator.

IEEE

TG we-Calculate Editorial Team, "Diagonalize a 2×2 Matrix Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/diagonalize-matrix-calculator

BibTeX

@misc{wecalculate_diagonalize_matrix_calculator, title = {Diagonalize a 2×2 Matrix Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/diagonalize-matrix-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?