Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Diagonalization






Reducing a Matrix to Its Eigenvalue Skeleton

A diagonalizable matrix can be factored as PDP⁻¹, where D is the diagonal matrix of eigenvalues and P is the matrix of eigenvectors. This factorization strips away the complexity of the original matrix, reducing powers, exponentials, and differential equations to operations on individual eigenvalues. Diagonalization is possible when and only when the eigenvectors form a basis — and for symmetric matrices, this is always the case.



What Diagonalization Means

An n×nn \times n matrix AA is diagonalizable if there exists an invertible matrix PP and a diagonal matrix DD such that

What Diagonalization Means
A=PDP−1A = PDP^{-1}

The columns of PP are eigenvectors of AA. The diagonal entries of DD are the corresponding eigenvalues, in the same order. The factorization says that in the basis of eigenvectors, the transformation acts by pure scaling along each axis — the most transparent possible description.

Equivalently, AA is diagonalizable if and only if Rn\mathbb{R}^n has a basis consisting entirely of eigenvectors of AA. The matrix PP converts between the standard basis and this eigenvector basis, and DD is the matrix of the transformation in the eigenvector basis.
Diagonalizing does not change the map, only the point of view: in the eigenvector basis it is pure stretching.

Diagonalization Notation

Notation

Diagonalization Notation

Three letters in a fixed arrangement, where the two outer factors are inverses of each other and the middle one holds everything the matrix really does — plus a silent pairing requirement between them, and a one-word name for the matrices that refuse. All catalogued among the linear algebra symbols.
λ\lambda, eigenvectors, the spectrum and the algebraic/geometric multiplicity pair come from eigenvalue notation; P−1P^{-1} from inverse notation; DD and diag⁡\operatorname{diag} from SVD notation; the decomposition letter-contract family from the same page; P−1APP^{-1}AP similarity from matrix representation notation.
A=PDP−1A = PDP^{-1}
A factors as P, times a diagonal D, times P inverse
A letter contract in the decomposition family: PP holds the eigenvectors as columns, DD the eigenvalues on its diagonal, and the outer factors are inverses so the product is a change of coordinates and back — the same matrix seen in a basis where it merely scales.
CasesThe arrangement is also written P−1AP=DP^{-1}AP = D, which reads as an instruction rather than a factorisation: conjugating AA diagonalises it. Both say one thing, and which appears depends on whether the author is building AA or simplifying it.
Do not confusePDP−1PDP^{-1} with P−1DPP^{-1}DP. The two are different matrices — swapping them inverts the change of basis — and since both are "PP and its inverse around a diagonal", the error survives a casual look at the shape.
column jj of PP ↔\leftrightarrow entry jj of DD
the j-th eigenvector must sit above the j-th eigenvalue
A requirement the notation states nowhere: Constructing the Diagonalization below says to place them "in matching order", and nothing in A=PDP−1A = PDP^{-1} records that the pairing has been respected. The letters look correct whether or not the columns line up.
CasesThe order itself is otherwise free — permuting the pairs consistently gives a different but equally valid PP and DD, which is why the factorisation is not unique and why "the" diagonalisation is a loose phrase.
Do not confuseTreating DD as sorted. There is no convention forcing eigenvalues into increasing order here — unlike the singular values of an SVD, which carry a built-in ordering — so a DD that looks unsorted is not thereby wrong.
defectivedefective
a matrix with too few independent eigenvectors to diagonalise
The one-word name for failure, and it is a statement about counts: a matrix is defective when some eigenvalue's geometric multiplicity falls short of its algebraic one, so the eigenvectors cannot fill a basis — When Diagonalization Fails below.
CasesThe word is unusually specific: it never means singular, ill-conditioned, or wrong. A defective matrix can be invertible and perfectly well behaved; it simply has no PP, and the Jordan form is what replaces DD when it does not exist.
Do not confuseHaving a repeated eigenvalue. Repetition is necessary for defectiveness but not sufficient — the identity matrix repeats an eigenvalue nn times and is already diagonal; it is the multiplicity gap, not the repetition, that defeats the construction.

Constructing the Diagonalization

The procedure has three steps.

Find all eigenvalues by solving the characteristic equation det⁡(A−λI)=0\det(A - \lambda I) = 0.

For each eigenvalue λi\lambda_i, find a basis for the eigenspace by solving (A−λiI)v=0(A - \lambda_i I)\mathbf{v} = \mathbf{0} via row reduction.

Assemble PP and DD. Place the eigenvectors as columns of PP and the corresponding eigenvalues on the diagonal of DD in matching order.

Worked Example


For A=(1243)A = \begin{pmatrix} 1 & 2 \\ 4 & 3 \end{pmatrix}, the characteristic polynomial is λ2−4λ−5=(λ−5)(λ+1)\lambda^2 - 4\lambda - 5 = (\lambda - 5)(\lambda + 1). Eigenvalues: λ1=5\lambda_1 = 5, λ2=−1\lambda_2 = -1.

For λ1=5\lambda_1 = 5: eigenvector v1=(1,2)T\mathbf{v}_1 = (1, 2)^T. For λ2=−1\lambda_2 = -1: eigenvector v2=(−1,1)T\mathbf{v}_2 = (-1, 1)^T.

Constructing the Diagonalization
P=(1−121),D=(500−1)P = \begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}, \quad D = \begin{pmatrix} 5 & 0 \\ 0 & -1 \end{pmatrix}

Verification: AP=(5110−1)=PD=(1−121)(500−1)=(5110−1)AP = \begin{pmatrix} 5 & 1 \\ 10 & -1 \end{pmatrix} = PD = \begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}\begin{pmatrix} 5 & 0 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} 5 & 1 \\ 10 & -1 \end{pmatrix}.
P2×2111−2D2×25002
Eigenvectors into P, eigenvalues into D

The eigenvectors are being loaded in as the columns of P and their eigenvalues placed on the diagonal of D in the matching order. The order is a free choice, but it must be the same choice in both — column three of P has to belong to the third diagonal entry of D. Assemble it yourself on the diagonalization visualizer.

Mismatching the order is the most common error here, and it produces a factorisation that silently fails to reconstruct the original.

When Is a Matrix Diagonalizable?

The definitive necessary and sufficient condition:

Diagonalizability Condition
A diagonalizable  ⟺  mg(λ)=ma(λ) for every eigenvalue λA \text{ diagonalizable} \iff m_g(\lambda) = m_a(\lambda) \text{ for every eigenvalue } \lambda

A sufficient condition that is easier to check:

Distinct Eigenvalues Imply Diagonalizable
A has n distinct eigenvalues⇒A is diagonalizableA \text{ has } n \text{ distinct eigenvalues} \Rightarrow A \text{ is diagonalizable}

Eigenvectors for distinct eigenvalues are linearly independent, so nn distinct eigenvalues produce nn independent eigenvectors — exactly enough for a basis.

When eigenvalues repeat, diagonalizability depends on the eigenspaces. A repeated eigenvalue λ\lambda with algebraic multiplicity kk must have a kk-dimensional eigenspace. If the eigenspace falls short — dimension less than kk — there are not enough eigenvectors, and the matrix cannot be diagonalized.

Example of Failure
A=(2102)A = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix} has eigenvalue λ=2\lambda = 2 with ma=2m_a = 2, but A−2I=(0100)A - 2I = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} has null space of dimension 11. Only one independent eigenvector exists, so PP cannot be built. The matrix is defective.

Pitfall: Treating a repeated eigenvalue as failure
Calling A=(311131113)A = \begin{pmatrix} 3 & 1 & 1 \\ 1 & 3 & 1 \\ 1 & 1 & 3 \end{pmatrix} defective because its eigenvalues 5,2,25, 2, 2 repeat skips the eigenspace check. Here A−2IA - 2I has rank 11, so mg(2)=2=ma(2)m_g(2) = 2 = m_a(2) and AA is diagonalizable.

The test therefore runs one eigenvalue at a time. For each repeated eigenvalue λ\lambda, the dimension of its eigenspace is n−rank(A−λI)n - \text{rank}(A - \lambda I), and this number is compared with the multiplicity of λ\lambda as a root of the characteristic polynomial. An eigenvalue that occurs only once needs no check, since its eigenspace always has dimension exactly 11.

Matrix Powers

The primary computational payoff of diagonalization is the simplification of matrix powers:

Matrix Powers
Ak=PDkP−1=P diag(λ1k,λ2k,…,λnk) P−1A^k = PD^kP^{-1} = P\,\text{diag}(\lambda_1^k, \lambda_2^k, \dots, \lambda_n^k)\,P^{-1}

Raising a diagonal matrix to a power means raising each diagonal entry independently. The entire cost of AkA^k, for any kk, is one matrix inversion and two matrix multiplications — the same cost regardless of whether kk is 22 or 22 million.

Worked Example


Using the diagonalization from section 22: P−1=13(11−21)P^{-1} = \frac{1}{3}\begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix}.

Matrix Powers
A4=P(5400(−1)4)P−1=(1−121)(625001)13(11−21)A^4 = P\begin{pmatrix} 5^4 & 0 \\ 0 & (-1)^4 \end{pmatrix}P^{-1} = \begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}\begin{pmatrix} 625 & 0 \\ 0 & 1 \end{pmatrix}\frac{1}{3}\begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix}

Matrix Powers
=13(625−112501)(11−21)=13(62762412481251)=(209208416417)= \frac{1}{3}\begin{pmatrix} 625 & -1 \\ 1250 & 1 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix} = \frac{1}{3}\begin{pmatrix} 627 & 624 \\ 1248 & 1251 \end{pmatrix} = \begin{pmatrix} 209 & 208 \\ 416 & 417 \end{pmatrix}

Pitfall: Powering the entries of A
Raising each entry of A=(1243)A = \begin{pmatrix} 1 & 2 \\ 4 & 3 \end{pmatrix} to the fourth power gives (11625681)\begin{pmatrix} 1 & 16 \\ 256 & 81 \end{pmatrix}, which is not A4A^4. Only the diagonal factor DD is powered entry by entry, and PD4P−1=(209208416417)PD^4P^{-1} = \begin{pmatrix} 209 & 208 \\ 416 & 417 \end{pmatrix}.

Without diagonalization, computing A4A^4 requires three sequential matrix multiplications.

Those multiplications are still the quickest check on the result. Squaring AA gives A2=(981617)A^2 = \begin{pmatrix} 9 & 8 \\ 16 & 17 \end{pmatrix}, and squaring A2A^2 lands on the same A4A^4 as the diagonal route. Each entry of these products combines a whole row with a whole column, so every entry of AA has a share in every entry of A4A^4.
DownloadPNG2×PDF
4powers
Eigen · matrix powers

Four powers, computed the long way

Each state is the previous one multiplied by AA again. Three multiplications to reach AA⁴, and every one of them depends on the one before it.

§ 2
1243
A
→⋅ A\cdot\, A
981617
A2A^{2}
→⋅ A\cdot\, A
41428483
A3A^{3}
→⋅ A\cdot\, A
209208416417
A4A^{4}
Determinant
−5, 25, −125, 625det(Aᵏ) = (det A)ᵏ
Trace
4, 26, 124, 626grows, and by a fixed recurrence
Largest entry
4, 17, 84, 417the growth the trace conceals
What the invariant columns show

The determinant runs (−5)k(-5)^k and the trace runs 5k+(−1)k5^k + (-1)^k — the eigenvalues of AA raised to the power, and nothing else. Neither reads the entries. That is why a closed form exists at all: the growth was never a property of the sixteen numbers on display, only of the two hiding behind them.

Four powers, computed the long way·/linear-algebra/eigen/diagonalizationLearn Math Class
The diagram is the route the formula replaces, and it is worth seeing once because the cost is invisible in the formula. Each state above costs a full matrix multiplication and each depends on the one before it, so reaching A20A^{20} means nineteen of them, while PD20P−1PD^{20}P^{-1} costs exactly what A4A^4 did — one inversion and two products, whatever the exponent.
The invariant columns are the sharper point. The determinant runs −5,25,−125,625-5, 25, -125, 625 and the trace runs 4,26,124,6264, 26, 124, 626 — these are (−5)k(-5)^k and 5k+(−1)k5^k + (-1)^k, computed from the eigenvalues alone. The entries of AkA^k grow unpredictably; the two numbers that describe the matrix do not. Diagonalization is what moves that regularity out of the invariants and into the matrix itself.
A³2×286397847=P2×2111−2·D³2×2125008·P⁻¹2×22/31/31/3−1/3
A power collapsing to a diagonal power

Every interior pair of P and its inverse has cancelled, leaving one P, the diagonal raised to the power, and one inverse. Raising a diagonal matrix to a power is entrywise, so an expensive repeated multiplication has become a handful of scalar powers. Push the exponent higher and watch the cost stay flat on the diagonalization visualizer.

This is the reason diagonalisation is worth the trouble: it turns repeated matrix multiplication into arithmetic on a diagonal.

Systems of Differential Equations

The linear system x′=Ax\mathbf{x}' = A\mathbf{x} has a clean solution when AA is diagonalizable. In the eigenvector basis, the system decouples into nn independent scalar equations yi′=λiyiy_i' = \lambda_i y_i, each with solution yi(t)=cieλity_i(t) = c_i e^{\lambda_i t}.

Converting back to the original basis, the general solution is

Systems of Differential Equations
x(t)=c1eλ1tv1+c2eλ2tv2+⋯+cneλntvn\mathbf{x}(t) = c_1 e^{\lambda_1 t}\mathbf{v}_1 + c_2 e^{\lambda_2 t}\mathbf{v}_2 + \cdots + c_n e^{\lambda_n t}\mathbf{v}_n

Each eigenvalue determines the behavior along its eigenvector direction. Positive eigenvalues produce exponential growth, negative eigenvalues produce decay, and zero eigenvalues produce constant components. Complex eigenvalues produce oscillatory terms involving sines and cosines modulated by exponential envelopes.

Pitfall: Reading the constants off the initial vector
With AA from section 22 and x(0)=(1,0)T\mathbf{x}(0) = (1, 0)^T, taking c1=1c_1 = 1, c2=0c_2 = 0 from the entries gives a solution that starts at (1,2)T(1, 2)^T. Solving c1(1,2)T+c2(−1,1)T=(1,0)Tc_1(1, 2)^T + c_2(-1, 1)^T = (1, 0)^T gives c1=13c_1 = \frac{1}{3}, c2=−23c_2 = -\frac{2}{3}.

The constants c1,…,cnc_1, \dots, c_n are determined by the initial condition x(0)\mathbf{x}(0): express x(0)\mathbf{x}(0) as a linear combination of the eigenvectors and read off the coefficients.

In matrix form, finding the constants is a single linear system. Collecting them in a vector c=(c1,…,cn)T\mathbf{c} = (c_1, \dots, c_n)^T, the solution at t=0t = 0 reads Pc=x(0)P\mathbf{c} = \mathbf{x}(0), so c=P−1x(0)\mathbf{c} = P^{-1}\mathbf{x}(0) holds the coordinates of the starting point in the eigenvector basis. This is the same change of basis that the factorization A=PDP−1A = PDP^{-1} performs, applied to one vector.
DownloadPNG2×PDF
One direction at a time
When AA is diagonalizable, x′=Ax\mathbf{x}' = A\mathbf{x} decouples into independent equations yi′=λiyiy_i' = \lambda_i y_i with solutions cieλitc_i e^{\lambda_i t}. Each eigenvalue decides the behavior along its own eigenvector.
Along eigenvector vi\mathbf{v}_i
cieλitvic_i e^{\lambda_i t}\mathbf{v}_i
split by the eigenvalue λi\lambda_i
↑
Case 1
λi>0\lambda_i > 0
Exponential growth
↓
Case 2
λi<0\lambda_i < 0
Decay
=
Case 3
λi=0\lambda_i = 0
Constant component
~
Case 4
λi\lambda_i complex
Oscillation
sines and cosines modulated by exponential envelopes; see complex eigenvalues
Takeaway
The constants c1,…,cnc_1, \dots, c_n come from the initial condition: write x(0)\mathbf{x}(0) as a combination of the eigenvectors and read off the coefficients.
x' = Ax: behavior along each eigenvector·/linear-algebra/eigen/diagonalizationLearn Math Class

Recurrence Relations

The discrete system xn+1=Axn\mathbf{x}_{n+1} = A\mathbf{x}_n has solution xn=Anx0\mathbf{x}_n = A^n\mathbf{x}_0. When AA is diagonalizable, this becomes

Recurrence Relations
xn=PDnP−1x0=c1λ1nv1+c2λ2nv2+⋯+cnλnnvn\mathbf{x}_n = PD^nP^{-1}\mathbf{x}_0 = c_1 \lambda_1^n \mathbf{v}_1 + c_2 \lambda_2^n \mathbf{v}_2 + \cdots + c_n \lambda_n^n \mathbf{v}_n

RULE
The dominant eigenvalue — the eigenvalue with the largest absolute value — determines the long-term growth rate.

As n→∞n \to \infty, the term ciλinvic_i \lambda_i^n \mathbf{v}_i with the largest ∣λi∣|\lambda_i| dominates all others.

Fact: Rounding gives every Fibonacci number
Since ∣ϕ^n∣≤1|\hat{\phi}^n| \leq 1 and 5>2\sqrt{5} > 2, the term ϕ^n/5\hat{\phi}^n/\sqrt{5} is always smaller than 12\frac{1}{2} in size. So FnF_n is simply ϕn/5\phi^n/\sqrt{5} rounded to the nearest whole number: ϕ10/5≈55.004\phi^{10}/\sqrt{5} \approx 55.004, and F10=55F_{10} = 55.

The Fibonacci sequence provides a classic application. The recurrence Fn+1=Fn+Fn−1F_{n+1} = F_n + F_{n-1} translates to (Fn+1Fn)=(1110)n(10)\begin{pmatrix} F_{n+1} \\ F_n \end{pmatrix} = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}^n \begin{pmatrix} 1 \\ 0 \end{pmatrix}. The matrix has eigenvalues ϕ=1+52\phi = \frac{1 + \sqrt{5}}{2} and ϕ^=1−52\hat{\phi} = \frac{1 - \sqrt{5}}{2}. Diagonalization gives the Binet formula: Fn=ϕn−ϕ^n5F_n = \frac{\phi^n - \hat{\phi}^n}{\sqrt{5}}, a closed-form expression for the nn-th Fibonacci number.

The second eigenvalue is ϕ^≈−0.618\hat{\phi} \approx -0.618, smaller than 11 in size, so ϕ^n\hat{\phi}^n shrinks toward zero with alternating sign while ϕn\phi^n grows. The dominant eigenvalue takes over within a few steps: already F11/F10=89/55≈1.618F_{11}/F_{10} = 89/55 \approx 1.618 agrees with ϕ\phi to three decimals.
A⁸2×20.8330.8330.1670.167=P2×2511−1·D⁸2×21000.001·P⁻¹2×21/61/61/6−5/6
A Markov matrix after eight steps

The recurrence xn+1 = Axn with a Markov matrix A. Written through the diagonalization, A8 = PD8P−1: the eigenvalue 1 stays 1 at every power while the other eigenvalue, smaller than 1 in size, dies away. After eight steps A8 is already close to its limit — every column near the steady state, the eigenvector for λ = 1. Change the power on the matrix diagonalization visualizer.

In a recurrence, the eigenvalues decide the long run: those below 1 in size fade, and what is left is the eigenvector of the largest.

The Spectral Theorem for Symmetric Matrices

Every real symmetric matrix is diagonalizable. This is guaranteed — no conditions need to be checked.

The result is stronger than ordinary diagonalizability. The diagonalizing matrix PP can be chosen orthogonal (P−1=PTP^{-1} = P^T):

Spectral Theorem
A=AT⇒A=QDQT,QTQ=I,D=diag(λ1,…,λn)∈Rn×nA = A^T \Rightarrow A = Q D Q^T, \quad Q^T Q = I, \quad D = \text{diag}(\lambda_1, \ldots, \lambda_n) \in \mathbb{R}^{n \times n}

where QQ is orthogonal with columns forming an orthonormal basis of eigenvectors, and DD is diagonal with real eigenvalues.

This can be rewritten as the spectral decomposition:

Spectral Decomposition
A=∑i=1nλi qiqiTA = \sum_{i=1}^{n} \lambda_i \, \mathbf{q}_i \mathbf{q}_i^T

Pitfall: Skipping the normalization
Putting the eigenvectors (1,1)(1, 1) and (1,−1)(1, -1) of A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} into QQ without dividing by 2\sqrt{2} makes QTQ=2IQ^TQ = 2I, so QDQT=(4224)=2AQDQ^T = \begin{pmatrix} 4 & 2 \\ 2 & 4 \end{pmatrix} = 2A. With unit columns, QDQT=AQDQ^T = A.

Each term λiqiqiT\lambda_i \mathbf{q}_i\mathbf{q}_i^T is the eigenvalue times the projection matrix onto the line spanned by qi\mathbf{q}_i, which is the whole eigenspace only when λi\lambda_i is a simple eigenvalue. The matrix AA is decomposed into a sum of rank-one projections, weighted by eigenvalues.

The spectral theorem is the most powerful diagonalization result in real linear algebra. It guarantees real eigenvalues, orthogonal eigenvectors, and a decomposition that simultaneously diagonalizes and orthogonalizes.
Eigen · two diagonalizations

Ordinary and spectral, compared

Both write AA as a diagonal matrix conjugated by an eigenvector matrix. Symmetry upgrades every line of the comparison — the eigenvectors, the eigenvalues, the guarantee, and the cost of inverting.

2kinds
TypeConditiondiagonalizing matrixeigenvector columnsentries of Dwhen it exists
Any diagonalizable matrix
Ordinary§ 2A=PDP−1A = PDP^{-1}PP invertible — nothing morelinearly independentreal or complexiff mg(λ)=ma(λ)m_g(\lambda) = m_a(\lambda) for every λ\lambda
Real symmetric matrices
Spectral§ 7A=QDQTA = QDQ^{\mathsf{T}}QQ orthogonal — Q−1=QTQ^{-1} = Q^{\mathsf{T}}orthonormalall realalways, for every real symmetric AA
Every improvement traces to one hypothesis. Symmetry forces real eigenvalues, forces eigenvectors for distinct eigenvalues to be orthogonal, and forces enough of them to exist — so the spectral theorem is not a special case so much as the case where nothing can go wrong.
Ordinary and spectral, compared·/linear-algebra/eigen/diagonalizationLearn Math Class
Read across and every row improves in the same direction, which is unusual — most comparisons trade one advantage for another. Here symmetry costs nothing: the eigenvalues become real, the eigenvectors orthonormal, the inverse a transpose, and the existence question disappears entirely. That is why the symmetric case is worth recognising before any computation begins, and why so many algorithms go out of their way to produce symmetric matrices.

Matrix Exponential

For a diagonalizable matrix, the matrix exponential eAte^{At} — central to solving x′=Ax\mathbf{x}' = A\mathbf{x} — has an explicit form:

Matrix Exponential
eAt=P eDt P−1=P diag(eλ1t,…,eλnt) P−1e^{At} = P\, e^{Dt}\, P^{-1} = P \,\text{diag}(e^{\lambda_1 t}, \ldots, e^{\lambda_n t})\, P^{-1}

The exponential of a diagonal matrix is the diagonal matrix of exponentials. The full matrix exponential is computed from nn scalar exponentials, one per eigenvalue.

The solution to x′=Ax\mathbf{x}' = A\mathbf{x} with initial condition x(0)=x0\mathbf{x}(0) = \mathbf{x}_0 is then x(t)=eAtx0\mathbf{x}(t) = e^{At}\mathbf{x}_0. This is the matrix-level analogue of the scalar solution x(t)=eatx0x(t) = e^{at}x_0 to x′=axx' = ax.

When AA has complex eigenvalues a±bia \pm bi, the exponentials e(a±bi)t=eat(cos⁡bt±isin⁡bt)e^{(a \pm bi)t} = e^{at}(\cos bt \pm i \sin bt) combine in conjugate pairs to produce real oscillatory terms eatcos⁡bte^{at}\cos bt and eatsin⁡bte^{at}\sin bt in the final solution.
Problem Diagonalized form Closed-form solution
Matrix power Ak P · diag(λ1k, …, λnk) · P−1 one inversion + two multiplications, independent of k
System x′ = Ax decouples into n scalar equations yi′ = λi yi x(t) = c1 eλ1t v1 + ⋯ + cn eλnt vn
Recurrence xn+1 = A xn xn = P Dn P−1 x0 xn = c1 λ1n v1 + ⋯ + cn λnn vn; dominant |λ| drives long-term growth
Matrix exponential eAt P · diag(eλ1t, …, eλnt) · P−1 x(t) = eAt x0 for x′ = Ax with x(0) = x0

When Diagonalization Fails

When a matrix is not diagonalizable — when some eigenvalue has geometric multiplicity strictly less than its algebraic multiplicity — the best achievable form under similarity is the Jordan normal form.

The Jordan form is block diagonal, with each block a Jordan block:

When Diagonalization Fails
Jk(λ)=(λ10⋯00λ1⋯0⋮⋱⋱⋮0λ10λ)J_k(\lambda) = \begin{pmatrix} \lambda & 1 & 0 & \cdots & 0 \\ 0 & \lambda & 1 & \cdots & 0 \\ \vdots & & \ddots & \ddots & \vdots \\ 0 & & & \lambda & 1 \\ 0 & & & & \lambda \end{pmatrix}

Fact: A millionth makes the shear diagonalizable
Change the corner entry of (1101)\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} to 1.0000011.000001 and the two eigenvalues become distinct, so the matrix diagonalizes. Its eigenvectors (1,0)(1, 0) and (1,0.000001)(1, 0.000001) are then almost parallel: the missing eigenvector returns as a near copy of the first.

A k×kk \times k Jordan block has the eigenvalue λ\lambda on the diagonal and ones on the superdiagonal. A diagonalizable eigenvalue contributes 1×11 \times 1 Jordan blocks. A defective eigenvalue contributes blocks larger than 1×11 \times 1.

The smallest defective matrix is the single block J2(1)=(1101)J_2(1) = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, the horizontal shear. It slides each point sideways by its height, so the horizontal axis is the only line that keeps its direction, and the repeated eigenvalue 11 has just one eigenvector, (1,0)(1, 0).

THEOREM
The Jordan form is unique up to the ordering of blocks and is the canonical representative of the similarity class.

Powers and exponentials of Jordan blocks can still be computed explicitly, but the formulas involve polynomial correction terms (tkeλtt^k e^{\lambda t} instead of just eλte^{\lambda t}) reflecting the defective structure. The full Jordan theory belongs to advanced linear algebra.
A2×21101→λ for each column1eigenvectors2×110
Too few independent eigenvectors to fill P

There are not enough independent eigenvectors to make up the columns of P, so P cannot be inverted and the factorisation never forms. Diagonalisation fails for this reason alone — never because the eigenvalues were awkward, only because the directions ran out. See which matrices hit this wall on the diagonalization visualizer.

The Jordan form exists precisely to give these matrices a canonical shape when a diagonal one is out of reach.

Diagonalizability at a Glance

Several quick tests determine or suggest diagonalizability.

A matrix with nn distinct eigenvalues is always diagonalizable — distinctness forces independence of eigenvectors.

A real symmetric matrix is always diagonalizable, and orthogonally so. This is the spectral theorem.

A matrix satisfying mg(λ)=ma(λ)m_g(\lambda) = m_a(\lambda) for every eigenvalue is diagonalizable. This is the definitive necessary and sufficient condition.

A matrix with any eigenvalue where mg<mam_g < m_a is not diagonalizable. The shortfall means there are not enough eigenvectors to form a basis.

Matrices that are already diagonal are trivially diagonalizable (P=IP = I). The identity matrix, all scalar matrices cIcI, and all diagonal matrices fall here.

The zero matrix is diagonalizable (it is already diagonal with all eigenvalues zero). A nilpotent matrix is diagonalizable if and only if it is the zero matrix — any other nilpotent matrix is defective.
The rows below are not six independent facts. One of them — the multiplicity comparison — decides the question completely, and the group above it collects the cases where the answer can be seen without doing that work. Reading the middle group as the definition and the others as shortcuts is what keeps the sufficient conditions from being mistaken for necessary ones.
Eigen · diagonalization

Which matrices diagonalize

One condition decides it and everything else is a shortcut to checking that condition. The multiplicity test is necessary and sufficient; the rows above it are sufficient only, and the rows below are what failure looks like.

6cases
Sufficient — settles it without computing eigenvectors3
1
sufficient, not necessary
nn distinct λi\lambda_i
Eigenvectors for distinct eigenvalues are automatically independent, so nn of them form a basis. The converse fails and the failure is common — the identity matrix has one eigenvalue repeated nn times and diagonalizes trivially.
2
always, and orthogonally
A=AT⇒A=QDQTA = A^{\mathsf{T}} \Rightarrow A = QDQ^{\mathsf{T}}
The spectral theorem. Symmetry guarantees not only diagonalizability but an orthonormal eigenvector basis, so P−1P^{-1} is PTP^{\mathsf{T}} and nothing needs inverting. No computation required to know it applies.
3
AA diagonal, including II and cIcI
P=IP = I
Degenerate but worth stating, because it is the counterexample to distinctness being necessary. A scalar matrix cIcI has one eigenvalue of multiplicity nn and every vector is an eigenvector.
The definitive test1
4
necessary and sufficient
mg(λi)=ma(λi)m_g(\lambda_i) = m_a(\lambda_i) for every ii
Geometric multiplicity is dim⁡Null⁡(A−λI)\dim\operatorname{Null}(A - \lambda I), algebraic is the root multiplicity in the characteristic polynomial. Geometric never exceeds algebraic, so the test is whether any eigenvalue falls short — and one shortfall is enough to fail.
Fails — too few eigenvectors2
5
some eigenvalue is short
mg(λ)<ma(λ)m_g(\lambda) < m_a(\lambda)
Not enough independent eigenvectors to form a basis, so no PP exists. The Jordan form is the substitute — as close to diagonal as the matrix permits, with ones on the superdiagonal recording exactly how many eigenvectors are missing.
6
never diagonalizable
Ak=OA^k = O, A≠OA \neq O
Every eigenvalue is zero, so a diagonalization would force D=OD = O and hence A=PDP−1=OA = PDP^{-1} = O. The zero matrix is the only diagonalizable nilpotent — which makes shears and other nilpotent-plus-identity matrices the standard examples of defectiveness.
Everything reduces to counting eigenvectors. A matrix diagonalizes exactly when it has nn independent ones, and the multiplicity comparison is that count performed eigenvalue by eigenvalue. The shortcuts are worth knowing because they settle the common cases without computing a single eigenvector.
Which matrices diagonalize·/linear-algebra/eigen/diagonalizationLearn Math Class
That distinction is where the usual error lives. Distinct eigenvalues guarantee diagonalizability, and it is tempting to read the guarantee backwards — but the identity matrix has a single eigenvalue repeated nn times and diagonalizes trivially, since every vector is an eigenvector. Repetition is not the problem; a repeated eigenvalue whose eigenspace is smaller than its multiplicity is.
When the test fails there is nothing to compute a way around, because the eigenvectors genuinely are not there. The Jordan form is what replaces diagonalization in that case: block diagonal rather than diagonal, with ones on the superdiagonal counting precisely how many eigenvectors each eigenvalue is missing. A nonzero nilpotent matrix is the extreme case — every eigenvalue is zero, so diagonalizing it would force the matrix itself to be zero.

Common Pitfalls

Five mistakes account for many wrong answers when a matrix is diagonalized and the factorization is put to use. Four are marked with a box where they happen in the sections above, and the first, the order of the columns, is flagged in the construction section. Here each is worked through in full, with the wrong and the right working side by side.

Mismatching the order of P and D

The eigenvectors are placed in PP in one order and the eigenvalues in DD in another, so column jj of PP no longer belongs to the jj-th diagonal entry of DD. The product PDP−1PDP^{-1} is still defined, but it is a different matrix.

Wrong working: for A=(1243)A = \begin{pmatrix} 1 & 2 \\ 4 & 3 \end{pmatrix} from section 22, keep P=(1−121)P = \begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}, whose first column belongs to λ=5\lambda = 5, but write the eigenvalues in the other order:
P(−1005)P−1=(3−2−41)≠AP\begin{pmatrix} -1 & 0 \\ 0 & 5 \end{pmatrix}P^{-1} = \begin{pmatrix} 3 & -2 \\ -4 & 1 \end{pmatrix} \neq A


Right working: the first diagonal entry is the eigenvalue of the first column.
P(500−1)P−1=(1243)=AP\begin{pmatrix} 5 & 0 \\ 0 & -1 \end{pmatrix}P^{-1} = \begin{pmatrix} 1 & 2 \\ 4 & 3 \end{pmatrix} = A


Why it happens: the order of the eigenvalues is a free choice, so it feels as if any order will do. The freedom is real, but the same order has to be used in PP and in DD, and nothing in the letters PDP−1PDP^{-1} shows whether it was.

How to check: compare APAP with PDPD column by column. Here AP=(5110−1)AP = \begin{pmatrix} 5 & 1 \\ 10 & -1 \end{pmatrix}, while the mismatched PD=(−1−5−25)PD = \begin{pmatrix} -1 & -5 \\ -2 & 5 \end{pmatrix}. The trace and the determinant do not catch this slip: the wrong product still has trace 44 and determinant −5-5, the same as AA.

Treating a repeated eigenvalue as failure

The characteristic polynomial has a repeated root, so the distinct-eigenvalue test does not apply, and the matrix is declared not diagonalizable without the eigenspace being computed.

Wrong working: A=(311131113)A = \begin{pmatrix} 3 & 1 & 1 \\ 1 & 3 & 1 \\ 1 & 1 & 3 \end{pmatrix} has eigenvalues 5,2,25, 2, 2. Since 22 is a double root, AA has only two distinct eigenvalues for a 3×33 \times 3 matrix, and the conclusion drawn is that AA is defective.

Right working: A−2IA - 2I is the matrix with every entry 11, of rank 11, so the eigenspace of λ=2\lambda = 2 has dimension 3−1=23 - 1 = 2, spanned by (1,−1,0)T(1, -1, 0)^T and (1,0,−1)T(1, 0, -1)^T. With (1,1,1)T(1, 1, 1)^T for λ=5\lambda = 5,
P=(1111−1010−1),D=(500020002)P = \begin{pmatrix} 1 & 1 & 1 \\ 1 & -1 & 0 \\ 1 & 0 & -1 \end{pmatrix}, \quad D = \begin{pmatrix} 5 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \end{pmatrix}

and AP=PD=(5225−2050−2)AP = PD = \begin{pmatrix} 5 & 2 & 2 \\ 5 & -2 & 0 \\ 5 & 0 & -2 \end{pmatrix}, with det⁡(P)=3≠0\det(P) = 3 \neq 0. The matrix is diagonalizable.

Why it happens: the sufficient condition, distinct eigenvalues, is read as if it were also necessary, and the standard example of failure, (2102)\begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix}, happens to have a repeated eigenvalue.

How to check: for every repeated eigenvalue, compute n−rank(A−λI)n - \text{rank}(A - \lambda I) and compare it with the multiplicity. A real symmetric matrix, like this AA, never needs the check: by the spectral theorem it is always diagonalizable.

Powering the entries of A

Once DkD^k has been found by raising each diagonal entry to the kk-th power, the same shortcut is applied to AA itself, and every entry of AA is raised to the kk-th power.

Wrong working:
A4=(14244434)=(11625681)A^4 = \begin{pmatrix} 1^4 & 2^4 \\ 4^4 & 3^4 \end{pmatrix} = \begin{pmatrix} 1 & 16 \\ 256 & 81 \end{pmatrix}


Right working: power only the diagonal factor.
A4=P(625001)P−1=(209208416417)A^4 = P\begin{pmatrix} 625 & 0 \\ 0 & 1 \end{pmatrix}P^{-1} = \begin{pmatrix} 209 & 208 \\ 416 & 417 \end{pmatrix}


Why it happens: for a diagonal matrix the entrywise power and the matrix power are the same thing, and the examples used to introduce powers are often diagonal. For any other matrix, the off-diagonal entries mix in every product.

How to check: the trace of AkA^k is 5k+(−1)k5^k + (-1)^k and the determinant is (−5)k(-5)^k. For k=4k = 4 these are 626626 and 625625. The entrywise answer has trace 8282 and determinant 81−4096=−401581 - 4096 = -4015.

Reading the constants off the initial vector

In the solution of x′=Ax\mathbf{x}' = A\mathbf{x}, the constants c1,…,cnc_1, \dots, c_n are taken to be the entries of x(0)\mathbf{x}(0), instead of the coefficients of x(0)\mathbf{x}(0) in the eigenvector basis.

Wrong working: with AA from section 22 and x(0)=(1,0)T\mathbf{x}(0) = (1, 0)^T, take c1=1c_1 = 1 and c2=0c_2 = 0:
x(t)=e5t(12),x(0)=(12)≠(10)\mathbf{x}(t) = e^{5t}\begin{pmatrix} 1 \\ 2 \end{pmatrix}, \qquad \mathbf{x}(0) = \begin{pmatrix} 1 \\ 2 \end{pmatrix} \neq \begin{pmatrix} 1 \\ 0 \end{pmatrix}


Right working: solve c1(1,2)T+c2(−1,1)T=(1,0)Tc_1(1, 2)^T + c_2(-1, 1)^T = (1, 0)^T, that is c1−c2=1c_1 - c_2 = 1 and 2c1+c2=02c_1 + c_2 = 0. Adding the equations gives 3c1=13c_1 = 1, so c1=13c_1 = \frac{1}{3} and c2=−23c_2 = -\frac{2}{3}:
x(t)=13e5t(12)−23e−t(−11)\mathbf{x}(t) = \frac{1}{3}e^{5t}\begin{pmatrix} 1 \\ 2 \end{pmatrix} - \frac{2}{3}e^{-t}\begin{pmatrix} -1 \\ 1 \end{pmatrix}


Why it happens: in the standard basis the coordinates of a vector are its entries, so reading them off is a habit. In the eigenvector basis the coordinates have to be computed, as c=P−1x(0)\mathbf{c} = P^{-1}\mathbf{x}(0).

How to check: put t=0t = 0 into the solution. The right one gives 13(1,2)T−23(−1,1)T=(1,0)T\frac{1}{3}(1, 2)^T - \frac{2}{3}(-1, 1)^T = (1, 0)^T; the wrong one gives (1,2)T(1, 2)^T.

Skipping the normalization

For a symmetric matrix, the eigenvectors are placed in QQ as they come out of row reduction, and QTQ^T is then used as the inverse. The transpose is the inverse only when the columns are unit vectors.

Wrong working: A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} has eigenvalues 33 and 11 with eigenvectors (1,1)T(1, 1)^T and (1,−1)T(1, -1)^T. With these as columns,
Q=(111−1),QDQT=(111−1)(3001)(111−1)=(4224)=2AQ = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, \quad QDQ^T = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} 3 & 0 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} = \begin{pmatrix} 4 & 2 \\ 2 & 4 \end{pmatrix} = 2A


Right working: divide each eigenvector by its length 2\sqrt{2}. Then q1q1T=12(1111)\mathbf{q}_1\mathbf{q}_1^T = \frac{1}{2}\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}, q2q2T=12(1−1−11)\mathbf{q}_2\mathbf{q}_2^T = \frac{1}{2}\begin{pmatrix} 1 & -1 \\ -1 & 1 \end{pmatrix}, and
3 q1q1T+1 q2q2T=(2112)=A3\,\mathbf{q}_1\mathbf{q}_1^T + 1\,\mathbf{q}_2\mathbf{q}_2^T = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} = A


Why it happens: with P−1P^{-1}, the length of each eigenvector does not matter, because scaling a column of PP is undone by P−1P^{-1}. Using QTQ^T in place of the inverse removes that protection.

How to check: compute QTQQ^TQ before using QTQ^T. It must be II; here the unnormalized QQ gives 2I2I, which is why the result came out as 2A2A.

Diagonalization FAQ

Is PDP−1PDP^{-1} the same as P−1DPP^{-1}DP?

+
No, they are different matrices, and swapping them inverts the change of basis. The error is easy to miss because both read as "PP and its inverse wrapped around a diagonal", so the shape looks right at a glance. Keep the roles straight: A=PDP−1A = PDP^{-1} builds AA, while P−1AP=DP^{-1}AP = D simplifies it.Read more →

Do the eigenvalues in DD have to be in order?

+
No convention forces any ordering. Permuting the eigenvalues along the diagonal is fine so long as the columns of PP are permuted to match, which is why the factorisation is not unique and "the" diagonalisation is a loose phrase. Singular values in an SVD do carry a built-in ordering, but eigenvalues here do not.Read more →

Does a repeated eigenvalue make a matrix defective?

+
Not by itself. Repetition is necessary but nowhere near sufficient: the identity matrix repeats an eigenvalue nn times and is already diagonal. What defeats the construction is a gap between algebraic and geometric multiplicity, meaning too few independent eigenvectors. Note that defective never means singular or ill-conditioned; such a matrix can be perfectly invertible.Read more →