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.

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}.

When Is a Matrix Diagonalizable?

The definitive condition is: AA is diagonalizable if and only if for every eigenvalue, the geometric multiplicity equals the algebraic multiplicity (mg(λ)=ma(λ)m_g(\lambda) = m_a(\lambda)).

A sufficient condition that is easier to check: if AA has nn distinct eigenvalues, it is automatically 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.

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), giving

A=QDQTA = QDQ^T


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:

A=λ1q1q1T+λ2q2q2T++λnqnqnTA = \lambda_1 \mathbf{q}_1\mathbf{q}_1^T + \lambda_2 \mathbf{q}_2\mathbf{q}_2^T + \cdots + \lambda_n \mathbf{q}_n\mathbf{q}_n^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.

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:

eAt=PeDtP1=Pdiag(eλ1t,eλ2t,,eλnt)P1e^{At} = Pe^{Dt}P^{-1} = P\,\text{diag}(e^{\lambda_1 t}, e^{\lambda_2 t}, \dots, 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.

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.

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.