Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Eigenvalues, eigenvectors, and diagonalization

~12 min

An eigenvector of A is a nonzero vector \mathbf v with A\mathbf v = \lambda \mathbf v for some scalar \lambda, its eigenvalue — a direction A only stretches, never turns. When \mathbb R^n has a full basis of A's eigenvectors, A is diagonalizable: A = PDP^{-1} with D diagonal and P's columns the eigenvectors. Linear Algebra I proved this works perfectly for symmetric matrices — real eigenvalues, guaranteed, with an orthogonal eigenvector basis. This section's job is to make the boundary of that guarantee sharp, because chapters 06 and 07 spend their entire length on the two ways it can fail: real eigenvalues aren't guaranteed once symmetry is dropped, and even when they exist, a full eigenvector basis isn't guaranteed either.

An eigenvector is a direction a matrix treats like a straight highway. Travel along it, and the matrix only changes your speed, never your heading. Most directions aren't highways at all. The matrix bends them onto a new heading entirely. A symmetric matrix is unusually generous: it always offers a full, mutually perpendicular set of highways. Break that symmetry, and a matrix can hand you a heading that doesn't exist on the real map at all. It can also hand you fewer highways than directions exist, so some directions get no straight road home.

Diagonalization is the process of writing A = PDP^{-1} with D diagonal — finding a basis in which the operator's action is nothing more than independent stretching along each basis direction, with no mixing between them at all. Every diagonalizable matrix is similar to a diagonal one; not every matrix is diagonalizable, and symmetry is what Linear Algebra I used to sidestep the question entirely. Two genuinely separate failures live downstream of dropping that assumption: a real matrix can have eigenvalues that are complex numbers rather than real ones (a rotation is the cleanest example — it turns every real direction, so no real eigenvector exists at all), and even a matrix with a full set of real or complex eigenvalues can still fail to have enough independent eigenvectors to form a basis, if an eigenvalue's geometric multiplicity falls short of its algebraic multiplicity.

Theorem

The Diagonalization Theorem

Recalled from Linear Algebra — Vectors, Matrices, and the Geometry of Data · Diagonalization — first taught there.

🔖

An n \times n matrix A is diagonalizable — that is, A = PDP^{-1} for some invertible P and diagonal D — if and only if A has n linearly independent eigenvectors. When this holds, the columns of P are those eigenvectors and the matching diagonal entries of D are their eigenvalues.

(\Leftarrow) n independent eigenvectors give A = PDP^{-1}. Suppose v_1, \dots, v_n are linearly independent eigenvectors of A, with Av_i = \lambda_i v_i. Let P be the matrix with these vectors as its columns, and let D = \operatorname{diag}(\lambda_1, \dots, \lambda_n). Multiplying A into P column by column, AP = A\begin{bmatrix} v_1 & \cdots & v_n \end{bmatrix} = \begin{bmatrix} Av_1 & \cdots & Av_n \end{bmatrix} = \begin{bmatrix} \lambda_1 v_1 & \cdots & \lambda_n v_n \end{bmatrix}. Multiplying P by D on the right scales each column of P by the matching diagonal entry of D, producing the very same matrix: PD = \begin{bmatrix} v_1 & \cdots & v_n \end{bmatrix} \operatorname{diag}(\lambda_1,\dots,\lambda_n) = \begin{bmatrix} \lambda_1 v_1 & \cdots & \lambda_n v_n \end{bmatrix}. So AP = PD. Because P's columns are n linearly independent vectors in \mathbb{R}^n, P is invertible, and right-multiplying both sides by P^{-1} gives A = PDP^{-1}.

(\Rightarrow) A = PDP^{-1} gives n independent eigenvectors. Suppose A = PDP^{-1} with P invertible and D = \operatorname{diag}(\lambda_1, \dots, \lambda_n). Then AP = PD, and reading that equation column by column exactly as above shows Av_i = \lambda_i v_i, where v_i is the i-th column of P. Each v_i is nonzero — a zero column would make P singular — so v_1,\dots,v_n are eigenvectors of A. Since P is invertible, its columns are linearly independent, which produces the needed n independent eigenvectors.

Sanity check: take A = \begin{bmatrix} 4 & 1 \\ 0 & 3 \end{bmatrix}, upper triangular, so its eigenvalues sit on the diagonal: \lambda_1 = 4, \lambda_2 = 3. Solving (A - 4I)v = 0 gives eigenvector v_1 = (1,0), and (A-3I)v = 0 gives v_2 = (1,-1). These two are not scalar multiples of each other, so they're independent, and the theorem guarantees A = PDP^{-1} with P = \begin{bmatrix} 1 & 1 \\ 0 & -1 \end{bmatrix} and D = \begin{bmatrix} 4 & 0 \\ 0 & 3 \end{bmatrix} — which a direct multiplication PDP^{-1} confirms reproduces A.

Theorem

Symmetric Matrices Are Orthogonally Diagonalizable

Recalled from Linear Algebra — Vectors, Matrices, and the Geometry of Data · Symmetric matrices and orthogonal diagonalization — first taught there.

🔖

Let A be an n \times n real matrix. Then A is symmetric — A = A^{\mathsf T} — if and only if there is an orthogonal matrix Q and a diagonal matrix D with A = QDQ^{\mathsf T}. The columns of Q form an orthonormal basis of \mathbb{R}^n made of eigenvectors of A, and the diagonal entries of D are the matching eigenvalues.

(\Leftarrow) Orthogonal diagonalizability forces symmetry. Suppose A = QDQ^{\mathsf T} with Q orthogonal and D diagonal. Diagonal matrices equal their own transpose, and transposing a product reverses the order of its factors, so A^{\mathsf T} = (QDQ^{\mathsf T})^{\mathsf T} = (Q^{\mathsf T})^{\mathsf T}D^{\mathsf T}Q^{\mathsf T} = QDQ^{\mathsf T} = A. So A is symmetric. The rest of the proof handles the harder direction.

Symmetric matrices have only real eigenvalues. Let \lambda be an eigenvalue of A, allowing for the moment that it might be complex, with eigenvector v (possibly with complex entries), so Av = \lambda v. Let \bar v denote the entrywise complex conjugate of v, and consider the scalar \bar v^{\mathsf T} A v. Computing it one way, \bar v^{\mathsf T} A v = \bar v^{\mathsf T}(\lambda v) = \lambda (\bar v^{\mathsf T} v) = \lambda \lVert v \rVert^2, since \bar v^{\mathsf T} v = \sum_i \overline{v_i} v_i = \sum_i |v_i|^2 = \lVert v \rVert^2 is real and positive (v \neq 0, being an eigenvector). Computing the same scalar the other way, using A^{\mathsf T} = A and that \bar v^{\mathsf T} A v is a 1\times 1 matrix and so equal to its own transpose, \bar v^{\mathsf T} A v = \left(\bar v^{\mathsf T} A v\right)^{\mathsf T} = v^{\mathsf T} A^{\mathsf T} \bar v = v^{\mathsf T} A \bar v. Taking the complex conjugate of Av = \lambda v gives A\bar v = \bar\lambda \bar v (since A has real entries, conjugation passes through it untouched), so v^{\mathsf T} A \bar v = v^{\mathsf T}(\bar\lambda \bar v) = \bar\lambda (v^{\mathsf T}\bar v) = \bar\lambda \lVert v\rVert^2, using v^{\mathsf T}\bar v = \overline{\bar v^{\mathsf T} v} = \lVert v\rVert^2 again. The two computations of \bar v^{\mathsf T} A v must agree: \lambda \lVert v \rVert^2 = \bar\lambda \lVert v \rVert^2. Since \lVert v \rVert^2 \neq 0, this forces \lambda = \bar\lambda, i.e. \lambda is real. So every eigenvalue of A is real, and consequently every eigenvalue has a real eigenvector (a real matrix minus a real multiple of I_n has a real null space).

Eigenvectors for distinct eigenvalues are orthogonal. Let Av_1 = \lambda_1 v_1 and Av_2 = \lambda_2 v_2 with \lambda_1 \neq \lambda_2. Using symmetry, \lambda_1 (v_1 \cdot v_2) = (Av_1) \cdot v_2 = v_1^{\mathsf T}A^{\mathsf T} v_2 = v_1^{\mathsf T}Av_2 = v_1 \cdot (Av_2) = \lambda_2(v_1 \cdot v_2). So (\lambda_1 - \lambda_2)(v_1 \cdot v_2) = 0, and since \lambda_1 \neq \lambda_2, this forces v_1 \cdot v_2 = 0.

Building Q by induction on n. The base case n=1 is trivial: any 1\times 1 matrix is already diagonal, and Q = [1] is orthogonal. For the inductive step, assume every symmetric (n-1)\times(n-1) matrix is orthogonally diagonalizable, and let A be a symmetric n \times n matrix. By the real-eigenvalue fact above, A has a real eigenvalue \lambda_1 with a real, nonzero eigenvector; rescale it to a unit vector q_1, so Aq_1 = \lambda_1 q_1 and \lVert q_1 \rVert = 1. Extend \{q_1\} to an orthonormal basis \{q_1, q_2, \dots, q_n\} of \mathbb{R}^n (extend to any basis and apply Gram–Schmidt, which leaves q_1 fixed since it is already a unit vector orthogonal to nothing else yet chosen), and let P be the orthogonal matrix with these vectors as columns.

The subspace W = \operatorname{span}(q_2,\dots,q_n) = q_1^\perp is invariant under A: for w \in W, (Aw)\cdot q_1 = w \cdot (Aq_1) = w \cdot (\lambda_1 q_1) = \lambda_1(w\cdot q_1) = 0, using symmetry in the first step exactly as above, so Aw is again orthogonal to q_1, i.e. Aw \in W. Consequently P^{\mathsf T}AP has the block form P^{\mathsf T}AP = \begin{bmatrix} \lambda_1 & 0 \\ 0 & A_1 \end{bmatrix} for some symmetric (n-1)\times(n-1) matrix A_1: the first column of P^{\mathsf T}AP is P^{\mathsf T}(Aq_1) = P^{\mathsf T}(\lambda_1 q_1) = \lambda_1 e_1 (since P^{\mathsf T}q_1 = e_1, q_1 being the first column of the orthogonal matrix P), giving the zero block below \lambda_1; and P^{\mathsf T}AP is symmetric because A is, which forces the zero block to the right of \lambda_1 as well. By the inductive hypothesis, A_1 = Q_1D_1Q_1^{\mathsf T} for some orthogonal (n-1)\times(n-1) matrix Q_1 and diagonal D_1. Setting Q = P\begin{bmatrix} 1 & 0 \\ 0 & Q_1 \end{bmatrix}, \qquad D = \begin{bmatrix} \lambda_1 & 0 \\ 0 & D_1 \end{bmatrix}, the block-diagonal factor is orthogonal (its columns are orthonormal, being e_1 together with the orthonormal columns of Q_1), so Q is a product of orthogonal matrices and hence orthogonal itself. Unwinding the block product, Q^{\mathsf T}AQ = \begin{bmatrix} 1 & 0 \\ 0 & Q_1^{\mathsf T} \end{bmatrix}P^{\mathsf T}AP\begin{bmatrix} 1 & 0 \\ 0 & Q_1 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & Q_1^{\mathsf T} \end{bmatrix}\begin{bmatrix} \lambda_1 & 0 \\ 0 & A_1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & Q_1 \end{bmatrix} = \begin{bmatrix} \lambda_1 & 0 \\ 0 & Q_1^{\mathsf T}A_1Q_1 \end{bmatrix} = D, so A = QDQ^{\mathsf T} with Q orthogonal and D diagonal, completing the induction.

Sanity check: take the symmetric matrix A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}. Its characteristic equation is (2-\lambda)^2 - 1 = 0, so \lambda_1 = 3 and \lambda_2 = 1 — both real, as guaranteed. Solving (A-3I)v=0 gives v_1 = (1,1), and (A-I)v=0 gives v_2 = (1,-1); these two are orthogonal (v_1 \cdot v_2 = 1 - 1 = 0), exactly as the theorem predicts for eigenvectors of distinct eigenvalues. Normalizing gives q_1 = \frac{1}{\sqrt2}(1,1) and q_2 = \frac{1}{\sqrt2}(1,-1), and setting Q = \begin{bmatrix} 1/\sqrt2 & 1/\sqrt2 \\ 1/\sqrt2 & -1/\sqrt2 \end{bmatrix}, D = \begin{bmatrix} 3 & 0 \\ 0 & 1 \end{bmatrix}, a direct multiplication confirms QDQ^{\mathsf T} = A.

Hunt for a symmetric matrix's two perpendicular highways

Drag v around the unit circle — Av snaps onto v's own ray at exactly two, PERPENDICULAR, spots.

Loading interactive…

Assemble A = PDP⁻¹ from its own eigenpairs

Reveal each eigenpair — watch P, D, and the checked product P·D·P⁻¹ build up until it matches A entrywise.

Loading interactive…

Worked example

A rotation matrix has no real eigenvector

  1. 1

    Set up the characteristic equation for the 90° rotation matrix A = \begin{pmatrix}0&-1\\1&0\end{pmatrix}. \det(A-\lambda I) = \det\begin{pmatrix}-\lambda & -1\\1&-\lambda\end{pmatrix} = \lambda^2+1

    expand the 2x2 determinant exactly as in a standard Linear Algebra I course

  2. 2

    Solve \lambda^2+1=0 over the reals: \lambda^2=-1 has no real solution, since no real number squares to a negative number.

  3. 3
    \boxed{A \text{ has no real eigenvalue} — \text{every nonzero real vector is rotated off its own line}}

    Geometrically inevitable: a 90° rotation turns every direction, so no real highway can survive it. Chapter 06 allows \lambda \in \mathbb C and finds \lambda = \pm i instead.

Loading interactive…

Where this shows up: two chapters fixing two different failures

Chapter 06 fixes the first failure directly: over \mathbb C, every square matrix has at least one eigenvalue, and self-adjoint (the complex generalization of symmetric) operators still get the full real-eigenvalue, orthogonal-eigenvector guarantee back. Chapter 07 fixes the second: when even \mathbb C doesn't supply enough independent eigenvectors, the Jordan form is the precise, provably-best substitute for diagonalization.

Where this goes next

Stability of dynamical systems

A system \mathbf x_{k+1} = A\mathbf x_k (or its continuous cousin \mathbf x'=A\mathbf x, chapter 08) is stable exactly when every eigenvalue of A has magnitude (or real part) below the threshold that causes growth — and the moment A isn't symmetric, "every eigenvalue" has to include the complex ones. An electrical circuit that oscillates, a population model with cyclic behavior, and a control system tuned to avoid resonance are all reading off complex eigenvalues this exact distinction makes visible.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

Let A = \begin{bmatrix} 5 & 0 \\ 0 & -2 \end{bmatrix} and \mathbf v = \begin{bmatrix} 1 \\ 0 \end{bmatrix}. Since A\mathbf v = \lambda\mathbf v, what is \lambda?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

A\mathbf v = \begin{bmatrix} 5(1) + 0(0) \\ 0(1) + (-2)(0) \end{bmatrix} = \begin{bmatrix} 5 \\ 0 \end{bmatrix} = 5\begin{bmatrix} 1 \\ 0 \end{bmatrix}, so \lambda = 5.

Correct answer

Also accepted:

Why

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

If \mathbf v is an eigenvector of A with eigenvalue \lambda, which other vector is guaranteed to also be an eigenvector of A with the same \lambda?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Adding a vector off \mathbf v's line generally knocks the sum off that line entirely — the guarantee only holds for scalar multiples of \mathbf v, not arbitrary sums.

Rotating changes the direction, and there's no reason a rotated vector still satisfies A(\text{rotated }\mathbf v) = \lambda(\text{rotated }\mathbf v) for the same A.

Length alone says nothing about direction — a same-length vector pointing a different way is not on \mathbf v's line and has no guaranteed relationship to \lambda.

Why

For any nonzero scalar c, A(c\mathbf v) = c(A\mathbf v) = c(\lambda\mathbf v) = \lambda(c\mathbf v) — every nonzero scalar multiple of an eigenvector is itself an eigenvector, carrying the exact same eigenvalue.

Think about what A does to any scalar multiple c\mathbf v of an eigenvector, using A(c\mathbf v) = c(A\mathbf v).

Quick review

Practice from earlier coursework, pulled in for this topic.

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

For A = \begin{bmatrix}5 & 4\\ 1 & 2\end{bmatrix}, which vector is a genuine eigenvector for the eigenvalue \lambda = 6, suitable as a column of P?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

(1,4) swaps the components of the real eigenvector — check directly: A(1,4)^T = (5+16,\ 1+8) = (21,\ 9), which is not a scalar multiple of (1,4).

(1,-1) is an eigenvector of this matrix, but for the other eigenvalue, \lambda = 1, not \lambda = 6.

(4,-1) isn't an eigenvector at all here: A(4,-1)^T = (20-4,\ 4-2) = (16,\ 2), which is not a scalar multiple of (4,-1).

Why

Solving (A - 6I)v = 0 gives [[-1,4],[1,-4]]v = 0, so v₁ = 4v₂ — v = (4,1) is the eigenvector. Check: A(4,1)ᵀ = (20+4, 4+2) = (24,6) = 6(4,1)ᵀ.

Solve (A - 6I)\mathbf v = \mathbf 0 and check which of the choices actually satisfies it.

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

A 3\times3 matrix has eigenvalues 2, 2, 7. Solving (A - 2I)v = 0 turns up only ONE independent eigenvector for \lambda = 2 (not two). Is A diagonalizable?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

The number of distinct eigenvalues isn't the deciding count — it's the total number of independent eigenvectors, and here that total is only 2, not 3.

The repeated eigenvalue does matter here: λ=2 needed to contribute 2 independent eigenvectors (matching how often it repeats) but produced only 1, leaving the total short of 3.

Repeated eigenvalues don't automatically block diagonalization — if λ=2's eigenspace had turned out 2-dimensional, this same matrix would diagonalize fine. It's specifically falling short of enough independent eigenvectors that blocks it.

Why

A 3×3 matrix needs 3 independent eigenvectors total. Here λ=2 contributes only 1 (short of the 2 its repetition would need to fully supply) and λ=7 contributes 1 more, for a total of 2 — not enough to build an invertible 3×3 matrix P, so A is not diagonalizable.

Compare the number of independent eigenvectors found for \lambda=2 (one) to its algebraic multiplicity (two) — diagonalization needs them to match for every eigenvalue.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

The symmetric matrix A = \begin{bmatrix} 6 & 2 \\ 2 & 3 \end{bmatrix} has eigenvalues 7 and 2. What is \operatorname{tr}(A)?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

The trace of any matrix equals the sum of its eigenvalues (Section 6), and 6+3=9=7+2 — this holds whether or not A is symmetric, but symmetry is what guaranteed those eigenvalues would be real numbers in the first place.

Correct answer

Also accepted:

Why

From Linear Algebra — Vectors, Matrices, and the Geometry of Data

What does it mean for a square matrix Q to be an orthogonal matrix, as used in orthogonal diagonalization?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

The axes aren't involved — orthogonality here is about the matrix's own columns being perpendicular to each other, not to any fixed axis.

A zero determinant means Q is singular and has no inverse at all — an orthogonal matrix is the opposite: always invertible, with Q^{-1}=Q^{\mathsf T}.

Eigenvalues are numbers, not directions — 'orthogonal' describes the relationship between Q's columns (its eigenvectors), not its eigenvalues.

Why

Q is orthogonal when its columns form an orthonormal set — mutually perpendicular and each of length 1 — which is exactly the algebraic condition Q^{\mathsf T}Q = I, so Q^{-1}=Q^{\mathsf T}.

Feeling good about this section?

Take the section quiz

Every answer gets a full explanation at the end.

Graph settings

Calculator

Sign in to save highlights

Insert an equation

  • No matches.