A symmetric matrix is a square matrix that is unchanged by transposition. If its entries are , symmetry means for every pair of indices: entries reflected across the main diagonal are equal. Although the definition applies over many number systems, real symmetric matrices have especially strong properties and are central to linear algebra.
The defining structural result is the spectral theorem: every real symmetric matrix can be diagonalized using an orthonormal basis, and all its eigenvalues are real. This connects symmetry with perpendicular directions, quadratic expressions, and the classification of positive and negative curvature. Symmetric matrices consequently occur in covariance analysis, optimization, geometry, mechanics, graph theory, and numerical computation. Their favorable spectral structure supports both exact mathematical reasoning and algorithms designed to preserve symmetry.
Definition and algebraic structure
An matrix is symmetric when
For example,
is symmetric, whereas a matrix with unequal entries in positions and is not. The diagonal entries are unrestricted. A symmetric matrix need not be invertible, positive definite, or entrywise nonnegative. Conversely, an invertible matrix or a matrix with positive entries need not be symmetric. Symmetry is a relation between corresponding entries, not a condition on their individual sizes or signs.
The real symmetric matrices form a vector space, commonly written . Its dimension is
because the diagonal entries and the entries above the diagonal determine the entire matrix. A standard basis consists of the matrices and for , where has a single nonzero entry, equal to , in position . Thus a symmetric matrix has approximately half as many independent entries as a general square matrix of the same size.
Sums and scalar multiples of symmetric matrices remain symmetric. Products generally do not: for symmetric and ,
so is symmetric exactly when . Every nonnegative integer power of a symmetric matrix is symmetric, as is its inverse when that inverse exists. Every real square matrix also has the unique decomposition
into a symmetric part and a skew-symmetric part. Under the Frobenius inner product, these two matrix subspaces are orthogonal. In particular, is the closest symmetric matrix to in Frobenius norm.
Over the complex numbers, transpose symmetry must be distinguished from conjugate symmetry. A Hermitian matrix satisfies , where is the conjugate transpose. For real matrices, these conditions coincide; for complex matrices, they do not. A complex symmetric matrix can have nonreal eigenvalues and can even fail to be diagonalizable. For example,
is symmetric and nonzero, but . Its only eigenvalue is zero, so it cannot be diagonalizable. Consequently, most spectral statements about symmetric matrices implicitly assume real entries; their complex counterparts generally concern Hermitian matrices.
Orthogonal diagonalization and the spectral theorem
For every real symmetric matrix , there is an orthogonal matrix and a real diagonal matrix such that
The columns of form an orthonormal basis of eigenvectors, while the diagonal entries of are their corresponding eigenvalues. This is stronger than ordinary diagonalization: no shearing or nonuniform rescaling of coordinates is needed. The change of coordinates preserves lengths and angles.
The reality of the eigenvalues follows from self-adjointness. If for a nonzero complex vector , then
Since a real symmetric matrix also satisfies , the scalar equals its own complex conjugate and is therefore real. Eigenvectors belonging to different eigenvalues are orthogonal: if and , then
When , this forces . A repeated eigenvalue causes no obstruction, because an orthonormal basis can be chosen within its eigenspace.
One proof of the full theorem begins by maximizing on the unit sphere. The maximum exists by compactness, and a constrained stationary-point calculation produces an eigenvector. Its orthogonal complement is invariant under , because whenever is perpendicular to the eigenvector . Applying the argument inductively to this lower-dimensional invariant subspace produces an orthonormal eigenbasis. This proof also exposes the close connection between the spectral theorem and optimization.
For example,
has eigenvalues and , with normalized eigenvectors
The transformation stretches these perpendicular directions by factors of and . More generally,
Each is an orthogonal projection onto an eigenvector direction. Grouping terms with equal eigenvalues yields a basis-independent decomposition into projections onto eigenspaces. Commuting real symmetric matrices can be simultaneously orthogonally diagonalized, because each preserves the eigenspaces of the others.
Quadratic forms, bilinear forms, and coordinate changes
A real symmetric matrix naturally represents a quadratic form,
In coordinates,
The factor in the mixed terms is important: the polynomial , for example, is represented by
Every real homogeneous polynomial of degree two has a unique symmetric matrix representation. A nonsymmetric matrix can define the same quadratic expression, but only its symmetric part contributes, since for every skew-symmetric matrix .
The associated symmetric bilinear form is
It is linear separately in and , and satisfies . Over the real numbers, the quadratic form determines the bilinear form through polarization:
This correspondence explains why symmetric matrices arise whenever pairwise interactions contribute symmetrically to a scalar quantity. If is positive definite, is an inner product; without positivity, it remains a symmetric bilinear form but need not define lengths.
Two distinct matrix transformations appear in this setting. A change of basis for a linear operator produces similarity,
A change of coordinates in a quadratic form instead gives
called congruence. Congruence preserves symmetry for every invertible , whereas arbitrary similarity need not. Orthogonal changes of basis are special because , so similarity and congruence coincide. This distinction also explains why a self-adjoint operator has a symmetric matrix in an orthonormal basis but may not have one in an arbitrary basis.
Sylvester’s law of inertia states that real symmetric matrices related by invertible congruence have the same numbers of positive, negative, and zero eigenvalues. These counts constitute the inertia, often written . By an invertible coordinate change, a quadratic form can be reduced to
with the remaining variables absent. Unlike orthogonal diagonalization, this transformation may rescale coordinates and therefore does not preserve individual eigenvalues. The inertia classifies the sign structure of the form: positive directions, negative directions, and directions in which the form vanishes identically after diagonalization. This classification underlies the principal-axis analysis of conic sections and higher-dimensional quadrics.
Positive definiteness and matrix order
A real symmetric matrix is positive definite if
for every nonzero real vector , and positive semidefinite if for every . Negative definite and negative semidefinite matrices satisfy the reversed inequalities. A matrix is indefinite if its quadratic form takes both positive and negative values. By orthogonal diagonalization, positive definiteness is equivalent to all eigenvalues being strictly positive; positive semidefiniteness is equivalent to all eigenvalues being nonnegative. Thus symmetry alone implies neither definiteness nor invertibility.
Several exact tests characterize these properties. Sylvester’s criterion states that a real symmetric matrix is positive definite exactly when all its leading principal minors are positive:
For positive semidefiniteness, the corresponding condition is that all principal minors are nonnegative, not merely the leading ones. For instance, the diagonal matrix has nonnegative leading principal minors, both zero, but is not positive semidefinite. These distinctions matter when exact algebraic tests are used in symbolic calculations or theoretical arguments.
Positive definite matrices admit a Cholesky decomposition
where is lower triangular with positive diagonal entries. Conversely, any such product with nonsingular is positive definite. Positive semidefinite matrices have factorizations , where may be rectangular. Accordingly, they are exactly the Gram matrices of finite collections of real vectors. Their entries can be interpreted as pairwise inner products, and their rank equals the dimension of the span of a realizing vector collection.
Symmetric matrices also carry the Loewner partial order: means that is positive semidefinite. This is not entrywise comparison. It asserts instead that in every direction. The positive semidefinite matrices form a closed convex cone, whose interior consists of the positive definite matrices. The latter are invertible and define ellipsoids through . Their eigenvectors give the principal axes, with corresponding semiaxis lengths . The intersection of this cone with affine constraints is the basic feasible region of semidefinite optimization. Matrix order also behaves predictably under congruence: if , then , even when is rectangular.
Variational principles and sensitivity of eigenvalues
For a nonzero vector , the Rayleigh quotient of a real symmetric matrix is
Writing in an orthonormal eigenbasis gives
It is therefore a weighted average of the eigenvalues. In particular,
with equality at the relevant extreme eigenspaces. These bounds turn an algebraic eigenvalue problem into the optimization of a quadratic expression over the unit sphere.
The Courant–Fischer variational principle extends this characterization to every eigenvalue. With eigenvalues ordered increasingly,
one version states
The minimization ranges over -dimensional linear subspaces. One consequence is eigenvalue monotonicity: if , then for every . Another is Cauchy interlacing. If is a principal submatrix obtained by deleting one row and the corresponding column of , and its eigenvalues are , then
Symmetric eigenvalue problems also have strong perturbation bounds. For a symmetric perturbation , Weyl’s bound gives
where is the operator norm induced by Euclidean length. Thus a small perturbation in matrix norm cannot cause a larger absolute change in any ordered eigenvalue. This stability contrasts with the potentially much greater eigenvalue sensitivity of nonnormal matrices. It does not, however, imply small relative error for eigenvalues close to zero.
Eigenvectors require additional care. When an eigenvalue is separated from the rest of the spectrum by a substantial gap, its eigenspace changes little under a small perturbation. Davis–Kahan bounds quantify this behavior using ratios involving perturbation size and spectral separation. If eigenvalues are equal or nearly equal, individual eigenvectors may change dramatically even when the matrix changes only slightly; the combined invariant subspace is then the more meaningful object. For a simple eigenvalue of a differentiable symmetric matrix family , with normalized eigenvector ,
This formula connects eigenvalue sensitivity directly to the perturbation’s quadratic action in the eigenvector direction.
Matrix functions, norms, and approximation
The spectral decomposition defines functions of a real symmetric matrix. If a scalar function is defined at every eigenvalue, then
For a polynomial, this agrees with direct substitution using matrix powers. More generally, it provides a finite-dimensional functional calculus that is independent of the chosen orthonormal bases within repeated eigenspaces. The resulting matrix is again symmetric. On an eigenvector of , the matrix acts by multiplication by .
Several important constructions follow immediately. The matrix exponential is
and is positive definite for every real symmetric . A positive semidefinite matrix has a unique positive semidefinite square root,
For a positive definite matrix, the inverse square root and real symmetric logarithm are likewise defined spectrally. Positivity is essential to these particular real-valued formulas: a symmetric matrix with negative eigenvalues has no positive semidefinite square root.
Basic matrix invariants acquire simple spectral descriptions:
The trace measures the sum of the signed eigenvalues, while the determinant records their product. The rank is the number of nonzero eigenvalues. The operator and Frobenius norms are
The singular values of a real symmetric matrix are the absolute values of its eigenvalues, with ordering adjusted as necessary. For a nonsingular symmetric matrix, its spectral condition number is consequently
These facts support low-rank approximation. Order the eigenpairs so that
and retain the first :
The Eckart–Young–Mirsky theorem implies that this is a best rank-at-most- approximation in both spectral and Frobenius norm. The errors are and , respectively. A related projection replaces each negative eigenvalue by zero. The resulting matrix
is the nearest positive semidefinite matrix to in Frobenius norm. Additional constraints, such as prescribed diagonal entries, turn this simple clipping operation into a different and generally more involved approximation problem.
Numerical algorithms and preservation of symmetry
Symmetry substantially changes the design of algorithms in numerical linear algebra. A dense symmetric matrix can be stored using only its upper or lower triangle, requiring numbers rather than . Arithmetic routines can work directly with this triangular storage and avoid treating the reflected entries as independent data. In floating-point arithmetic, a theoretically symmetric matrix may become slightly asymmetric through rounding or inconsistent assembly. Replacing it by restores exact symmetry, but this operation does not by itself restore positive definiteness.
For dense eigenvalue computations, a standard strategy first reduces to symmetric tridiagonal form:
Householder transformations perform the reduction while preserving symmetry and orthogonal similarity. The reduction takes order arithmetic operations, after which the tridiagonal eigenproblem is handled by methods such as the QR algorithm, divide-and-conquer, or bisection-based procedures. Orthogonal transformations are central to numerical stability because they preserve Euclidean norms and avoid amplification caused solely by ill-conditioned coordinate changes. Jacobi’s rotation method, published in 1846, instead repeatedly annihilates off-diagonal entries through plane rotations.
For a large sparse matrix, computing every eigenvector is often unnecessary and prohibitively expensive. Lanczos iteration constructs orthonormal bases for Krylov subspaces generated by
and produces a small symmetric tridiagonal projected problem. Its eigenvalues, called Ritz values, approximate selected eigenvalues of the original matrix, often especially well near the spectral extremes. In exact arithmetic the underlying recurrence is short; in floating-point arithmetic, loss of orthogonality can generate repeated or misleading approximations, so practical implementations use reorthogonalization, restarting, or related safeguards.
Linear systems also benefit from symmetry. Positive definite systems can be solved by Cholesky factorization, requiring approximately operations for a dense matrix, compared with about for general LU factorization. Symmetric indefinite systems commonly use a pivoted factorization
where may contain both and diagonal blocks. Pivoting is needed to control numerical instability; the block diagonal structure permits indefinite behavior. For large sparse positive definite systems, the conjugate gradient method, introduced by Magnus Hestenes and Eduard Stiefel in 1952, uses matrix–vector products rather than a dense factorization. Its convergence depends strongly on the spectral distribution and on preconditioning. Methods for symmetric indefinite problems require different assumptions; symmetry alone does not justify the positive definite version of conjugate gradients.
Covariance, statistical analysis, and optimization
In statistics, the covariance matrix of a real random vector with finite second moments is
It is symmetric because the covariance of and is unchanged when their order is reversed. It is also positive semidefinite, since
Thus covariance matrices are constrained mathematical objects, not arbitrary tables of pairwise numbers. A collection of proposed variances and covariances may fail to define a valid covariance matrix if the resulting matrix has a negative eigenvalue.
In principal component analysis, normalized eigenvectors of the covariance matrix identify orthogonal directions of variation. The eigenvalue associated with a direction equals the variance of the projection onto it. The leading eigenvector therefore solves the problem of maximizing projected variance among unit directions, and successive components solve corresponding problems under orthogonality constraints. For a centered data matrix with observations in rows, the sample covariance is , where is the number of observations. Its rank is at most , so it is necessarily singular when there are more variables than centered-data degrees of freedom.
In optimization, symmetry appears in second derivatives. If a scalar function has continuous second partial derivatives, its Hessian satisfies
Near a point , the second-order expansion contains
At a stationary point, positive definiteness of the Hessian implies a strict local minimum, while indefiniteness implies a saddle point. Positive semidefiniteness alone is inconclusive: the one-variable functions and both have zero second derivative at zero but opposite local behavior.
Quadratic objectives display these relationships globally. For symmetric ,
has gradient and Hessian . If is positive definite, the unique minimizer solves . If is positive semidefinite and singular, a minimizer exists exactly when lies in the range of , and it is then nonunique along the null space. In least squares, the normal matrix is always symmetric positive semidefinite, becoming positive definite when the columns of are linearly independent. Adding with , as in ridge regression, shifts every eigenvalue upward by . Directly forming normal equations can nevertheless square the spectral condition number, so numerical formulations based on QR or singular value decomposition often have better stability.
Geometry, graphs, and physical systems
In geometry, a positive definite symmetric matrix specifies an inner product in coordinates:
On a smooth manifold, a metric tensor is represented in each coordinate chart by a smoothly varying positive definite symmetric matrix. Under a change of coordinates, the representing matrix transforms by congruence, not by ordinary similarity. Its individual entries and ordinary matrix eigenvalues depend on the coordinate system, whereas the geometric inner product does not. Symmetric forms of indefinite signature also occur in geometry, but they do not define positive lengths in the same sense.
In graph theory, an undirected graph has a symmetric adjacency matrix because an edge between two vertices is independent of their ordering. For nonnegative symmetric edge weights , the graph Laplacian is , where . Its defining quadratic identity is
This proves positive semidefiniteness directly. The constant vector belongs to its null space, and the multiplicity of the zero eigenvalue equals the number of connected components when connectivity is defined by positive-weight edges. Small positive eigenvalues describe directions in which values can vary across the graph at relatively low quadratic cost, a principle used in spectral clustering and graph partitioning.
Mechanical vibration provides a closely related generalized eigenvalue problem:
Here is a symmetric stiffness matrix and a symmetric positive definite mass matrix. Although need not be symmetric in ordinary coordinates, the substitution converts the problem to
whose matrix is symmetric. Distinct vibration modes can therefore be chosen orthogonal in the mass inner product . If the stiffness matrix is positive semidefinite, all squared natural frequencies are nonnegative; zero modes correspond to unconstrained motions or other null directions.
Symmetry also arises from variational discretizations of differential equations. In the finite element method, a symmetric bilinear expression such as
produces a matrix with entries , which satisfy . Appropriate boundary conditions can make this matrix positive definite, while other conditions leave a null space, as with constant functions in a pure Neumann problem. These matrices are finite-dimensional representations of self-adjoint operators. Nonsymmetric terms, such as advection or certain coupled interactions, can destroy matrix symmetry even when other parts of the model remain symmetric; the algebraic structure reflects the particular differential operator, variational formulation, and discretization.