Skip to content

Chapter 65. Symmetric Matrices

A symmetric matrix is a square matrix equal to its transpose.

If AA is symmetric, then

AT=A. A^T=A.

Equivalently, the entries of AA satisfy

aij=aji a_{ij}=a_{ji}

for every pair of indices ii and jj. Thus the matrix is mirrored across its main diagonal.

Symmetric matrices are central because they behave like real self-adjoint operators. Their eigenvalues are real, eigenvectors from distinct eigenvalues are orthogonal, and they can be diagonalized by an orthogonal matrix. These properties make them one of the best-behaved classes of matrices in linear algebra.

65.1 Definition

Let AA be an n×nn\times n real matrix. The matrix AA is symmetric if

AT=A. A^T=A.

In entries, this means

aij=aji. a_{ij}=a_{ji}.

For example,

A=[214130405] A= \begin{bmatrix} 2 & -1 & 4 \\ -1 & 3 & 0 \\ 4 & 0 & 5 \end{bmatrix}

is symmetric, since each entry above the diagonal matches the corresponding entry below the diagonal.

The matrix

B=[214730465] B= \begin{bmatrix} 2 & -1 & 4 \\ 7 & 3 & 0 \\ 4 & 6 & 5 \end{bmatrix}

is not symmetric, because

b12=1 b_{12}=-1

but

b21=7. b_{21}=7.

Only square matrices can be symmetric, since the equation AT=AA^T=A requires AA and ATA^T to have the same size.

65.2 Structure of a Symmetric Matrix

A symmetric matrix has free entries on and above the diagonal. The entries below the diagonal are then determined.

For a 3×33\times 3 matrix,

A=[abcbdecef]. A= \begin{bmatrix} a & b & c \\ b & d & e \\ c & e & f \end{bmatrix}.

There are six independent entries, not nine.

In general, an n×nn\times n symmetric matrix has

n(n+1)2 \frac{n(n+1)}{2}

independent entries. These consist of nn diagonal entries and

n(n1)2 \frac{n(n-1)}{2}

entries above the diagonal.

65.3 Basic Examples

Every diagonal matrix is symmetric. If

D=[d1000d2000dn], D= \begin{bmatrix} d_1 & 0 & \cdots & 0 \\ 0 & d_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & d_n \end{bmatrix},

then

DT=D. D^T=D.

The identity matrix is symmetric:

IT=I. I^T=I.

The zero matrix is symmetric:

0T=0. 0^T=0.

If uRnu\in\mathbb{R}^n, then the outer product

uuT uu^T

is symmetric, because

(uuT)T=uuT. (uu^T)^T=uu^T.

For example, if

u=[123], u= \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix},

then

uuT=[123246369]. uu^T= \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 3 & 6 & 9 \end{bmatrix}.

65.4 Symmetric and Skew-Symmetric Parts

Every square matrix can be decomposed into a symmetric part and a skew-symmetric part.

Let AA be any square matrix. Define

S=12(A+AT) S=\frac{1}{2}(A+A^T)

and

K=12(AAT). K=\frac{1}{2}(A-A^T).

Then

ST=S S^T=S

and

KT=K. K^T=-K.

Also,

A=S+K. A=S+K.

Thus

A=12(A+AT)+12(AAT). A=\frac{1}{2}(A+A^T)+\frac{1}{2}(A-A^T).

The symmetric part controls quadratic expressions such as xTAxx^TAx. The skew-symmetric part contributes nothing to such expressions over the real numbers, because

xTKx=0 x^TKx=0

whenever

KT=K. K^T=-K.

65.5 Symmetric Matrices and Inner Products

A symmetric matrix satisfies a compatibility identity with the Euclidean inner product:

(Ax)y=x(Ay) (Ax)\cdot y=x\cdot(Ay)

for all vectors x,yRnx,y\in\mathbb{R}^n.

Proof:

(Ax)y=(Ax)Ty. (Ax)\cdot y = (Ax)^Ty.

Since

(Ax)T=xTAT, (Ax)^T=x^TA^T,

we have

(Ax)y=xTATy. (Ax)\cdot y=x^TA^Ty.

If AA is symmetric, then AT=AA^T=A. Hence

(Ax)y=xTAy=x(Ay). (Ax)\cdot y=x^TAy=x\cdot(Ay).

This identity is the matrix form of self-adjointness. It is the reason symmetric matrices have real eigenvalues and orthogonal eigenspaces.

65.6 Real Eigenvalues

Every real symmetric matrix has real eigenvalues.

To see the idea, suppose

Av=λv Av=\lambda v

for a nonzero complex vector vv. Use the Hermitian inner product and write vv>0v^*v>0. Since AA is real symmetric, it is also Hermitian when viewed as a complex matrix.

Then

vAv=λvv. v^*Av=\lambda v^*v.

But vAvv^*Av is real for a Hermitian matrix. Since vvv^*v is real and positive, λ\lambda must be real.

Thus symmetric matrices do not produce nonreal eigenvalues. This sharply contrasts with general real matrices, such as rotation matrices.

For example,

R=[0110] R= \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}

has eigenvalues ii and i-i. The matrix RR is not symmetric.

65.7 Orthogonality of Eigenvectors

Eigenvectors of a symmetric matrix corresponding to distinct eigenvalues are orthogonal.

Let

Av=λv Av=\lambda v

and

Aw=μw, Aw=\mu w,

where

λμ. \lambda\neq\mu.

Using the identity from the previous section,

(Av)w=v(Aw). (Av)\cdot w=v\cdot(Aw).

Substitute the eigenvalue equations:

(λv)w=v(μw). (\lambda v)\cdot w=v\cdot(\mu w).

Therefore

λ(vw)=μ(vw). \lambda(v\cdot w)=\mu(v\cdot w).

So

(λμ)(vw)=0. (\lambda-\mu)(v\cdot w)=0.

Since

λμ, \lambda\neq\mu,

we get

vw=0. v\cdot w=0.

Thus vv and ww are orthogonal.

65.8 Orthogonal Diagonalization

A real symmetric matrix can be orthogonally diagonalized.

This means that if A=ATA=A^T, then there exists an orthogonal matrix QQ and a real diagonal matrix DD such that

A=QDQT. A=QDQ^T.

Here

QTQ=I. Q^TQ=I.

The columns of QQ are orthonormal eigenvectors of AA. The diagonal entries of DD are the corresponding eigenvalues.

This is the finite-dimensional spectral theorem for real symmetric matrices. It is stronger than ordinary diagonalization because the change-of-basis matrix is orthogonal.

65.9 Example of Orthogonal Diagonalization

Let

A=[2112]. A= \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}.

The characteristic polynomial is

det(AλI)=det[2λ112λ]. \det(A-\lambda I) = \det \begin{bmatrix} 2-\lambda & 1 \\ 1 & 2-\lambda \end{bmatrix}.

Thus

det(AλI)=(2λ)21. \det(A-\lambda I)=(2-\lambda)^2-1.

Expanding,

(2λ)21=λ24λ+3. (2-\lambda)^2-1 = \lambda^2-4\lambda+3.

Hence

λ24λ+3=0. \lambda^2-4\lambda+3=0.

The eigenvalues are

λ1=3,λ2=1. \lambda_1=3, \qquad \lambda_2=1.

For λ1=3\lambda_1=3, one eigenvector is

[11]. \begin{bmatrix} 1 \\ 1 \end{bmatrix}.

Normalize it:

q1=12[11]. q_1= \frac{1}{\sqrt{2}} \begin{bmatrix} 1 \\ 1 \end{bmatrix}.

For λ2=1\lambda_2=1, one eigenvector is

[11]. \begin{bmatrix} 1 \\ -1 \end{bmatrix}.

Normalize it:

q2=12[11]. q_2= \frac{1}{\sqrt{2}} \begin{bmatrix} 1 \\ -1 \end{bmatrix}.

Set

Q=12[1111] Q= \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}

and

D=[3001]. D= \begin{bmatrix} 3 & 0 \\ 0 & 1 \end{bmatrix}.

Then

A=QDQT. A=QDQ^T.

65.10 Quadratic Forms

A symmetric matrix naturally defines a quadratic form:

q(x)=xTAx. q(x)=x^TAx.

For example, if

A=[abbc], A= \begin{bmatrix} a & b \\ b & c \end{bmatrix},

then

xTAx=[xy][abbc][xy]. x^TAx = \begin{bmatrix} x & y \end{bmatrix} \begin{bmatrix} a & b \\ b & c \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}.

Computing gives

q(x,y)=ax2+2bxy+cy2. q(x,y)=ax^2+2bxy+cy^2.

The off-diagonal entries appear twice, once from each symmetric position.

Every real quadratic form can be represented by a symmetric matrix. If a non-symmetric matrix appears in xTAxx^TAx, only its symmetric part matters:

xTAx=xT(A+AT2)x. x^TAx=x^T\left(\frac{A+A^T}{2}\right)x.

65.11 Positive Definite Symmetric Matrices

A real symmetric matrix AA is positive definite if

xTAx>0 x^TAx>0

for every nonzero vector xx.

It is positive semidefinite if

xTAx0 x^TAx\geq 0

for every vector xx.

By the spectral theorem, if

A=QDQT, A=QDQ^T,

then with y=QTxy=Q^Tx,

xTAx=yTDy. x^TAx=y^TDy.

If

D=diag(λ1,,λn), D=\operatorname{diag}(\lambda_1,\ldots,\lambda_n),

then

yTDy=λ1y12++λnyn2. y^TDy=\lambda_1y_1^2+\cdots+\lambda_ny_n^2.

Therefore:

TypeEigenvalue condition
Positive definiteλi>0\lambda_i>0 for all ii
Positive semidefiniteλi0\lambda_i\geq 0 for all ii
Negative definiteλi<0\lambda_i<0 for all ii
Negative semidefiniteλi0\lambda_i\leq 0 for all ii
IndefiniteEigenvalues of both signs

This criterion is one of the main reasons symmetric matrices are important in optimization.

65.12 Symmetric Matrices in Least Squares

Symmetric matrices arise in least squares problems.

For a matrix AA, the normal equations are

ATAx=ATb. A^TAx=A^Tb.

The matrix

ATA A^TA

is always symmetric, because

(ATA)T=AT(AT)T=ATA. (A^TA)^T=A^T(A^T)^T=A^TA.

It is also positive semidefinite, since

xTATAx=(Ax)T(Ax)=Ax20. x^TA^TAx=(Ax)^T(Ax)=\|Ax\|^2\geq 0.

If the columns of AA are linearly independent, then ATAA^TA is positive definite.

Thus least squares problems naturally lead to symmetric positive definite matrices.

65.13 Symmetric Matrices in Optimization

Second derivatives of scalar functions are organized into Hessian matrices.

If

f:RnR f:\mathbb{R}^n\to\mathbb{R}

has continuous second partial derivatives, its Hessian is

Hf=[2fx122fx1x22fx2x12fx22]. H_f= \begin{bmatrix} \frac{\partial^2 f}{\partial x_1^2} & \frac{\partial^2 f}{\partial x_1\partial x_2} & \cdots \\ \frac{\partial^2 f}{\partial x_2\partial x_1} & \frac{\partial^2 f}{\partial x_2^2} & \cdots \\ \vdots & \vdots & \ddots \end{bmatrix}.

By equality of mixed partial derivatives under standard smoothness assumptions,

2fxixj=2fxjxi. \frac{\partial^2 f}{\partial x_i\partial x_j} = \frac{\partial^2 f}{\partial x_j\partial x_i}.

Thus the Hessian is symmetric.

The eigenvalues of the Hessian determine local curvature. Positive definite Hessians describe strict local minima. Negative definite Hessians describe strict local maxima. Indefinite Hessians describe saddle behavior.

65.14 Symmetric Matrices and Graphs

Undirected graphs often produce symmetric matrices.

If GG is an undirected graph, its adjacency matrix AA satisfies

aij=aji. a_{ij}=a_{ji}.

This is because an edge from vertex ii to vertex jj is also an edge from vertex jj to vertex ii.

Thus the adjacency matrix of an undirected graph is symmetric.

The graph Laplacian

L=DA L=D-A

is also symmetric when the graph is undirected. Here DD is the degree matrix and AA is the adjacency matrix.

The eigenvalues and eigenvectors of these symmetric matrices encode connectivity, clustering, expansion, random walks, and vibration modes.

65.15 Symmetric Rank-One Matrices

A rank-one symmetric matrix often has the form

A=uuT. A=uu^T.

For any vector xx,

Ax=uuTx. Ax=uu^Tx.

Since

uTx u^Tx

is a scalar,

Ax=(uTx)u. Ax=(u^Tx)u.

Thus AA maps every vector onto the direction of uu.

The matrix uuTuu^T is positive semidefinite because

xTuuTx=(uTx)20. x^Tuu^Tx=(u^Tx)^2\geq 0.

If u0u\neq 0, then uuTuu^T has rank 11. Its nonzero eigenvalue is

u2, \|u\|^2,

with eigenvector uu.

65.16 Projection Matrices

An orthogonal projection matrix is symmetric and idempotent.

A matrix PP is idempotent if

P2=P. P^2=P.

If PP is also symmetric, then it represents orthogonal projection onto a subspace.

For example, projection onto the line spanned by a unit vector uu is

P=uuT. P=uu^T.

Then

PT=P P^T=P

and

P2=uuTuuT=u(uTu)uT=uuT=P. P^2=uu^Tuu^T=u(u^Tu)u^T=uu^T=P.

The eigenvalues of an orthogonal projection are only 00 and 11. Vectors in the projected subspace have eigenvalue 11. Vectors orthogonal to it have eigenvalue 00.

65.17 Symmetric Matrices and Singular Value Decomposition

For any real matrix BB, the matrices

BTB B^TB

and

BBT BB^T

are symmetric positive semidefinite.

Indeed,

(BTB)T=BTB (B^TB)^T=B^TB

and

(BBT)T=BBT. (BB^T)^T=BB^T.

The spectral theorem applies to both. The eigenvalues of BTBB^TB are nonnegative, and their square roots are the singular values of BB.

Thus the singular value decomposition is built from symmetric positive semidefinite matrices.

65.18 Numerical Importance

Symmetric matrices are easier and safer to handle numerically than general matrices.

Eigenvalue algorithms can exploit symmetry to reduce work and improve stability. Symmetric matrices have real eigenvalues, orthogonal eigenspaces, and orthogonal diagonalizations. These properties avoid many complications of general nonsymmetric eigenvalue problems.

In numerical linear algebra, symmetric positive definite systems are especially important. They can often be solved efficiently by Cholesky decomposition or conjugate gradient methods.

The Cholesky factorization writes a symmetric positive definite matrix as

A=LLT, A=LL^T,

where LL is lower triangular. This factorization is a standard tool for solving linear systems, optimization problems, and covariance computations.

65.19 Common Errors

The first common error is to confuse symmetric with diagonal. Every diagonal matrix is symmetric, but many symmetric matrices have nonzero off-diagonal entries.

The second common error is to assume that ATAA^TA has the same eigenvalues as AA. In general, it does not.

The third common error is to use ordinary diagonalization when orthogonal diagonalization is available. For symmetric matrices, the stronger form

A=QDQT A=QDQ^T

should be used.

The fourth common error is to forget that symmetry is field-dependent. Over complex vector spaces, the correct analogue of real symmetry is usually Hermitian symmetry:

A=A, A^*=A,

not merely

AT=A. A^T=A.

The fifth common error is to ignore ordering. If the first column of QQ is an eigenvector for λ1\lambda_1, then the first diagonal entry of DD must be λ1\lambda_1. The ordering of eigenvectors and eigenvalues must match.

65.20 Summary

A symmetric matrix satisfies

AT=A. A^T=A.

Its entries mirror across the main diagonal.

Real symmetric matrices have real eigenvalues, orthogonal eigenspaces for distinct eigenvalues, and orthogonal diagonalizations of the form

A=QDQT. A=QDQ^T.

They are the natural matrices for quadratic forms, least squares, optimization, graph theory, projections, and the singular value decomposition.

Symmetry is a strong structural condition. It turns many difficult matrix questions into problems about orthogonal coordinates and real eigenvalues.