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

A=PDP1A = 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.

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; P1P^{-1} from inverse notation; DD and diag\operatorname{diag} from SVD notation; the decomposition letter-contract family from the same page; P1APP^{-1}AP similarity from matrix representation notation.
A=PDP1A = 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 P1AP=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 confusePDP1PDP^{-1} with P1DPP^{-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=PDP1A = 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.
defective
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 λ24λ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.

P=(1121),D=(5001)P = \begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}, \quad D = \begin{pmatrix} 5 & 0 \\ 0 & -1 \end{pmatrix}


Verification: AP=(51101)=PD=(1121)(5001)=(51101)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 eigenvaluesA 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 A2I=(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.

Matrix Powers

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

Ak=PDkP1=Pdiag(λ1k,λ2k,,λnk)P1A^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: P1=13(1121)P^{-1} = \frac{1}{3}\begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix}.

A4=P(5400(1)4)P1=(1121)(625001)13(1121)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}


=13(625112501)(1121)=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}


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

Four powers, computed the long way

Each state is the previous one multiplied by AA again. Three multiplications to reach A4A^4, 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 PD20P1PD^{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.
2×286397847=P2×2111−2·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

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.

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.

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

xn=PDnP1x0=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


The dominant eigenvalue — the eigenvalue with the largest absolute value — determines the long-term growth rate. As nn \to \infty, the term ciλinvic_i \lambda_i^n \mathbf{v}_i with the largest λi|\lambda_i| dominates all others.

The Fibonacci sequence provides a classic application. The recurrence Fn+1=Fn+Fn1F_{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 ϕ^=152\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 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 (P1=PTP^{-1} = P^T):

Spectral Theorem
A=ATA=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λiqiqiTA = \sum_{i=1}^{n} \lambda_i \, \mathbf{q}_i \mathbf{q}_i^T

Each term λiqiqiT\lambda_i \mathbf{q}_i\mathbf{q}_i^T is the eigenvalue times the projection matrix onto the eigenspace. 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=PDP1A = 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 — Q1=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=PeDtP1=Pdiag(eλ1t,,eλnt)P1e^{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(cosbt±isinbt)e^{(a \pm bi)t} = e^{at}(\cos bt \pm i \sin bt) combine in conjugate pairs to produce real oscillatory terms eatcosbte^{at}\cos bt and eatsinbte^{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:

Jk(λ)=(λ1000λ100λ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}


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 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=ATA=QDQTA = A^{\mathsf{T}} \Rightarrow A = QDQ^{\mathsf{T}}
The spectral theorem. Symmetry guarantees not only diagonalizability but an orthonormal eigenvector basis, so P1P^{-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 dimNull(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, AOA \neq O
Every eigenvalue is zero, so a diagonalization would force D=OD = O and hence A=PDP1=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.

Diagonalization FAQ

Is PDP1PDP^{-1} the same as P1DPP^{-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=PDP1A = PDP^{-1} builds AA, while P1AP=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 →