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.
Larger eigenvalue of A
Characteristic polynomial det(A − λI) = 0
Discriminant
λ₁
λ₂
Eigenvector for λ₁ (A − λ₁I)v = 0
Eigenvector for λ₂ (A − λ₂I)v = 0
A = P D P⁻¹
- 1
Trace = a + d
4 + 3 = 7 - 2
Determinant = ad − bc
4 × 3 − 1 × 2 = 10 - 3
Discriminant Δ = T² − 4D
7² − 4 × 10 = 9Δ > 0 means two distinct real eigenvalues. - 4
Eigenvalue λ₁ = (T + √Δ) ÷ 2
(7 + √9) ÷ 2 = 5
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
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
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
TG we-Calculate Editorial Team. "Diagonalize a 2×2 Matrix Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/diagonalize-matrix-calculator.
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
@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?
