The real spectral theorem for symmetric matrices, why eigenvectors for distinct eigenvalues are orthogonal, and how to build an orthonormal eigenbasis and an orthogonal diagonalization, also for repeated eigenvalues.
The symmetric matrix with 2 on the diagonal and 1 off the diagonal stretches every vector on the line y=x by a factor of 3 and leaves every vector on the perpendicular line y=−x where it is. So the matrix can be described by switching to coordinates along those two perpendicular lines, stretching each coordinate, and switching back, with no slanted grid anywhere. A general matrix need not allow this, because its eigenvectors can be slanted or too few to form a basis. This lesson states the theorem that guarantees a basis of perpendicular eigenvectors for every real symmetric matrix, proves the part about distinct eigenvalues, and builds the factorization A=QDQ⊤ by hand. Tuples such as (1,1) stand for column vectors.
Key terms
Symmetric matrix
Definition A real n×n matrix A is symmetric if A⊤=A, that is, aij=aji for all i and j. Only a square matrix can be symmetric, and the diagonal entries can be any real numbers. The property used again and again is that a symmetric matrix can move from one side of a dot product to the other. For all x and y in Rn,
(Ax)⋅y=x⊤A⊤y=x⊤Ay=x⋅(Ay).
For every real m×n matrix C, the n×n matrix C⊤C is symmetric, since (C⊤C)⊤=C⊤C.
In plain words Reflect the matrix across its main diagonal and nothing changes. Symmetry is a condition on pairs of entries. It says nothing about signs, so a symmetric matrix can have negative or zero entries.
Example The matrices
S=[2112],4−10−10505−3
are symmetric. The matrix
B=[1012]
is not, because b12=1 while b21=0. For S, moving the matrix across the dot product gives the same number, since (Se1)⋅e2=(2,1)⋅(0,1)=1 and e1⋅(Se2)=(1,0)⋅(1,2)=1.
Real spectral theorem
Definition Let A be a real symmetric n×n matrix. Then every root of the characteristic polynomial χA(t)=det(tI−A) is real, and Rn has an orthonormal basis made of eigenvectors of A. Equivalently, there are a real orthogonal matrix Q, meaning Q⊤Q=I, and a real diagonal matrix D with
A=QDQ⊤.
The columns of Q are the orthonormal eigenvectors, and the diagonal entries of D are their eigenvalues in the same order. The hypotheses are real entries, a square symmetric matrix and finite dimension. The first claim, that the eigenvalues are real, has a short proof. Suppose Av=λv with λ complex and v a nonzero vector in Cn. Multiplying on the left by v∗=v⊤ gives
v∗Av=λv∗v.
Because A is real and symmetric, A∗=A, so the number v∗Av equals its own conjugate (v∗Av)∗=v∗A∗v and is real. Also v∗v=∣v1∣2+⋯+∣vn∣2>0, and dividing shows that λ is real. The second claim, that there are always enough orthonormal eigenvectors for a basis, needs a longer argument by induction on n, which this lesson does not give. Neither the examples below nor the orthogonality result for distinct eigenvalues proves it. Linear Algebra II proves it in The Spectral Theorem for Normal Operators.
In plain words A real symmetric matrix always has a full set of perpendicular axes, and along each axis it simply multiplies vectors by a real factor. The factors can be positive, negative or zero.
Example For the matrix S above,
χS(t)=(t−2)2−1=(t−3)(t−1),
so the eigenvalues 3 and 1 are real. Since S(1,1)=(3,3) and S(1,−1)=(1,−1), the vectors (1,1) and (1,−1) are eigenvectors, and they are perpendicular. The hypothesis matters. The quarter turn with columns (0,1) and (−1,0) is not symmetric, and its characteristic polynomial t2+1 has no real roots at all. The symmetric matrix diag(4,−1) is already orthogonally diagonalized with Q=I, and one of its axes is reversed rather than stretched, so symmetry does not make eigenvalues positive.
Orthogonality of eigenvectors for distinct eigenvalues
Definition Let A be a real symmetric n×n matrix, and let u and v in Rn be eigenvectors with Au=λu and Av=μv, where λ=μ. Then u⋅v=0. The proof uses symmetry in the middle step,
λ(u⋅v)=(Au)⋅v=u⋅(Av)=μ(u⋅v).
So (λ−μ)(u⋅v)=0, and since λ−μ=0, the dot product is 0. As a result, every vector of the eigenspace Eλ=Null(A−λI) is orthogonal to every vector of Eμ. If λ=μ, the factor λ−μ is 0 and the computation gives no information about u⋅v. Indeed two eigenvectors for one eigenvalue need not be orthogonal, as the repeated eigenvalue example below shows.
In plain words Symmetry lets the matrix act on either vector in the dot product. Acting on one side multiplies the dot product by λ and acting on the other multiplies it by μ, and multiplying a number by two different factors gives the same result only when that number is zero.
Example The symmetric matrix
A=110121011
has χA(t)=t(t−1)(t−3), with eigenvectors (1,−1,1), (1,0,−1) and (1,2,1) for the eigenvalues 0, 1 and 3. For instance A(1,2,1)=(3,6,3). The three pairwise dot products are 1+0−1, 1−2+1 and 1+0−1, all equal to 0, as the theorem predicts. Without symmetry this fails. The matrix B above has eigenvectors (1,0) and (1,1) for the distinct eigenvalues 1 and 2, and their dot product is 1.
Orthonormal eigenbasis
Definition Let A be a real n×n matrix. An orthonormal eigenbasis of A is a basis B=(q1,…,qn) of Rn in which every vector is a unit eigenvector, Aqi=λiqi with ∥qi∥=1, and different vectors are orthogonal, qi⋅qj=0 for i=j. The matrix Q=[q1⋯qn] then satisfies Q⊤Q=I, so it is orthogonal and Q−1=Q⊤. The coordinates of a vector in this basis are dot products,
[x]B=Q⊤x=q1⋅x⋮qn⋅x,
so no linear system has to be solved. The coordinate change keeps lengths, since ∥Qz∥2=z⊤Q⊤Qz=∥z∥2. To get unit vectors from perpendicular eigenvectors, divide each by its length. A nonzero multiple of an eigenvector is still an eigenvector for the same eigenvalue.
In plain words An orthonormal eigenbasis is a set of perpendicular unit axes along which the matrix only stretches. Coordinates along such axes are read off with dot products, and lengths and angles are the same in the new coordinates as in the old ones.
Example For S, the eigenvectors (1,1) and (1,−1) both have length 2, and dividing gives
q1q2=21[11],=21[1−1],
with eigenvalues 3 and 1. For x=(3,1) the coordinates are q1⋅x=4/2=22 and q2⋅x=2/2=2, and indeed 22q1+2q2=(2,2)+(1,−1)=(3,1). Applying S multiplies these coordinates by 3 and 1, so
Sx=3⋅22q1+2q2=[75],
which matches the direct product (2⋅3+1,3+2⋅1)=(7,5).
Orthogonal diagonalization
Definition A real n×n matrix A is orthogonally diagonalizable if
A=QDQ⊤
for a real orthogonal matrix Q and a real diagonal matrix D, or equivalently Q⊤AQ=D. The columns of Q then form an orthonormal eigenbasis, and the diagonal entries of D are the matching eigenvalues in the same order. With columns q1,…,qn and diagonal entries λ1,…,λn, the product expands into the spectral decomposition
A=λ1q1q1⊤+⋯+λnqnqn⊤.
A real matrix is orthogonally diagonalizable exactly when it is symmetric. The spectral theorem gives one direction. For the other, (QDQ⊤)⊤=QD⊤Q⊤=QDQ⊤, so every matrix of this form is symmetric. To orthogonally diagonalize a symmetric matrix, find its eigenvalues, find an orthonormal basis of each eigenspace, and place the basis vectors in Q and their eigenvalues in D in the same order.
In plain words The factor Q⊤ reads off coordinates along perpendicular unit axes, D stretches each coordinate by its eigenvalue, and Q turns the result back into standard coordinates. Each term λiqiqi⊤ projects onto one axis and scales by that axis’s eigenvalue.
Example For S, with q1 and q2 as above,
Q=21[111−1],D=[3001].
The columns are orthonormal, so Q⊤Q=I. To check S=QDQ⊤, compute the two terms of the spectral decomposition,
3q1q1⊤q2q2⊤=23[1111],=21[1−1−11].
Their sum has diagonal entries 23+21=2 and off-diagonal entries 23−21=1, which is S. Other choices work too, such as −q2 in place of q2, or the two columns swapped together with the two eigenvalues. The matrix B above is diagonalizable, since its eigenvalues 1 and 2 are distinct, but it is not symmetric, so no choice of eigenvectors diagonalizes it orthogonally.
Orthonormal basis of a repeated eigenspace
Definition Let λ be an eigenvalue of a real symmetric matrix A whose eigenspace Eλ=Null(A−λI) has dimension m≥2. Every nonzero vector of Eλ is an eigenvector for λ, and every linear combination of vectors in Eλ stays in Eλ. So Gram-Schmidt applied to any basis of Eλ produces an orthonormal basis of Eλ made of eigenvectors. This step is needed in general, because two basis vectors of one eigenspace need not be orthogonal. For a symmetric matrix, m equals the algebraic multiplicity of λ, a consequence of the spectral theorem. Putting together orthonormal bases of all the eigenspaces gives an orthonormal eigenbasis of Rn. The combined list is orthonormal because different eigenspaces are already orthogonal to each other, and it has n vectors because, by the spectral theorem, the dimensions of the eigenspaces add up to n. The result is not unique, since any orthonormal basis of each eigenspace works.
In plain words Inside a repeated eigenspace every direction is an eigenvector direction, so you are free to pick perpendicular ones. The eigenvectors that row reduction gives you are usually not perpendicular, and Gram-Schmidt fixes that without leaving the eigenspace.
Example The symmetric matrix
A=211121112
has χA(t)=(t−1)2(t−4). The eigenspace E4 is spanned by (1,1,1). Every entry of A−I equals 1, so E1 is the plane x+y+z=0, with basis b1=(1,−1,0) and b2=(1,0,−1). Both are eigenvectors for 1, but b1⋅b2=1. Gram-Schmidt keeps b1 and replaces b2 by
b2−b1⋅b1b2⋅b1b1=1/21/2−1,
whose entries still add to 0, so it is still an eigenvector for 1. Normalizing b1, twice this vector and (1,1,1) gives the orthonormal eigenbasis
q1q2q3=211−10,=6111−2,=31111,
and A=QDQ⊤ with Q=[q1q2q3] and D=diag(1,1,4). As a check, q1⋅q3 and q2⋅q3 are 0 by the theorem on distinct eigenvalues, and q1⋅q2 is 0 by construction. In the extreme case 2I, every nonzero vector is an eigenvector, so (1,0) and (1,1) are eigenvectors that are not orthogonal, and every orthonormal basis of R2 is an orthonormal eigenbasis.
Check yourself
Orthogonally diagonalize the matrix A with rows (6,2) and (2,3).
Show the answer
The matrix is symmetric, so an orthogonal diagonalization exists. Its characteristic polynomial is
χA(t)=(t−6)(t−3)−4=t2−9t+14=(t−7)(t−2).
For λ=7, the system (A−7I)x=0 reduces to −x+2y=0, giving the eigenvector (2,1). For λ=2, it reduces to 4x+2y=0, giving (1,−2). Their dot product is 2−2=0, and both have length 5, so
Q=51[211−2],D=[7002].
Check with the spectral decomposition. The sum 57(2,1)(2,1)⊤+52(1,−2)(1,−2)⊤ has diagonal entries 528+2=6 and 57+8=3 and off-diagonal entries 514−4=2, which is A.
The matrix C with rows (1,2) and (3,2) has eigenvectors (2,3) for the eigenvalue 4 and (1,−1) for the eigenvalue −1. A student normalizes them, puts them in Q and writes C=QDQ⊤ with D=diag(4,−1). What is wrong, and what is a correct diagonalization?
Show the answer
The matrix is not symmetric, since c12=2 and c21=3. The eigenvectors are not orthogonal, because (2,3)⋅(1,−1)=−1, so the normalized columns have dot product −1/26 and Q⊤Q=I. That means Q⊤ is not Q−1. Even more directly, QDQ⊤ is symmetric for every Q and every diagonal D, so it cannot equal C. No other choice of eigenvectors helps either, since the two eigenvector lines meet at a fixed angle that is not a right angle. A correct diagonalization uses the inverse,
PP−1C=[231−1],=51[131−2],=P[400−1]P−1.
The symmetric matrix M below has the eigenvalue 3, repeated, and the eigenvalue 0. Find an orthonormal eigenbasis and an orthogonal diagonalization of
M=21112−11−12.Show the answer
Every row of M−3I is a multiple of (−1,1,1), so E3 is the plane −x+y+z=0, with basis (1,1,0) and (1,0,1). These have dot product 1, so apply Gram-Schmidt. Keep (1,1,0) and replace the second vector by
101−21110=1/2−1/21,
or (1,−1,2) after scaling. For the eigenvalue 0, the vector (1,−1,−1) satisfies M(1,−1,−1)=0, and it is orthogonal to the plane E3, as the theorem on distinct eigenvalues requires. The orthonormal eigenbasis is
and M=QDQ⊤ with Q=[q1q2q3] and D=diag(3,3,0). As a check, Mq2=3q2, since M(1,−1,2)=(3,−3,6). Any other orthonormal basis of the plane E3 would do as well.
May we count page visits to understand which courses and learning features are useful? Cloudflare collects visit and performance statistics, without your account details or answers. Your choice does not affect access. Details