{
  "id": "symmetric-matrix",
  "title": "Symmetric Matrix",
  "lang": "en",
  "source_lang": "en",
  "summary": "A symmetric matrix equals its transpose; over the real numbers, it has real eigenvalues and an orthonormal basis of eigenvectors.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "Real symmetric matrix"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/symmetric-matrix/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/symmetric-matrix/",
      "json": "https://aiwiki.page/zh/symmetric-matrix.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A symmetric matrix is a square matrix that is unchanged by transposition. If its entries are \\(a_{ij}\\), symmetry means \\(a_{ij}=a_{ji}\\) 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.\n\nThe 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."
    },
    {
      "heading": "Definition and algebraic structure",
      "text": "An \\(n\\times n\\) matrix \\(A\\) is symmetric when\n\n\\[A^{T}=A.\\]\n\nFor example,\n\n\\[A= \\begin{pmatrix} 2&-1&4\\\\ -1&3&0\\\\ 4&0&5 \\end{pmatrix}\\]\n\nis symmetric, whereas a matrix with unequal entries in positions \\((1,2)\\) and \\((2,1)\\) 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.\n\nThe real symmetric \\(n\\times n\\) matrices form a vector space, commonly written \\(\\operatorname{Sym}_n(\\mathbb R)\\). Its dimension is\n\n\\[\\frac{n(n+1)}2,\\]\n\nbecause the \\(n\\) diagonal entries and the \\(n(n-1)/2\\) entries above the diagonal determine the entire matrix. A standard basis consists of the matrices \\(E_{ii}\\) and \\(E_{ij}+E_{ji}\\) for \\(i<j\\), where \\(E_{ij}\\) has a single nonzero entry, equal to \\(1\\), in position \\((i,j)\\). Thus a symmetric matrix has approximately half as many independent entries as a general square matrix of the same size.\n\nSums and scalar multiples of symmetric matrices remain symmetric. Products generally do not: for symmetric \\(A\\) and \\(B\\),\n\n\\[(AB)^T=BA,\\]\n\nso \\(AB\\) is symmetric exactly when \\(AB=BA\\). Every nonnegative integer power of a symmetric matrix is symmetric, as is its inverse when that inverse exists. Every real square matrix \\(M\\) also has the unique decomposition\n\n\\[M=\\frac{M+M^T}{2}+\\frac{M-M^T}{2},\\]\n\ninto a symmetric part and a skew-symmetric part. Under the Frobenius inner product, these two matrix subspaces are orthogonal. In particular, \\((M+M^T)/2\\) is the closest symmetric matrix to \\(M\\) in Frobenius norm.\n\nOver the complex numbers, transpose symmetry must be distinguished from conjugate symmetry. A Hermitian matrix satisfies \\(A^*=A\\), where \\(A^*\\) 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,\n\n\\[N=\\begin{pmatrix}i&1\\\\1&-i\\end{pmatrix}\\]\n\nis symmetric and nonzero, but \\(N^2=0\\). 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."
    },
    {
      "heading": "Orthogonal diagonalization and the spectral theorem",
      "text": "For every real symmetric matrix \\(A\\), there is an orthogonal matrix \\(Q\\) and a real diagonal matrix \\(\\Lambda\\) such that\n\n\\[A=Q\\Lambda Q^T, \\qquad Q^TQ=I.\\]\n\nThe columns \\(q_1,\\ldots,q_n\\) of \\(Q\\) form an orthonormal basis of eigenvectors, while the diagonal entries \\(\\lambda_1,\\ldots,\\lambda_n\\) of \\(\\Lambda\\) 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.\n\nThe reality of the eigenvalues follows from self-adjointness. If \\(Az=\\lambda z\\) for a nonzero complex vector \\(z\\), then\n\n\\[\\lambda=\\frac{z^*Az}{z^*z}.\\]\n\nSince a real symmetric matrix also satisfies \\(A^*=A\\), the scalar \\(z^*Az\\) equals its own complex conjugate and is therefore real. Eigenvectors belonging to different eigenvalues are orthogonal: if \\(Ax=\\lambda x\\) and \\(Ay=\\mu y\\), then\n\n\\[\\lambda x^Ty=(Ax)^Ty=x^TAy=\\mu x^Ty.\\]\n\nWhen \\(\\lambda\\ne\\mu\\), this forces \\(x^Ty=0\\). A repeated eigenvalue causes no obstruction, because an orthonormal basis can be chosen within its eigenspace.\n\nOne proof of the full theorem begins by maximizing \\(x^TAx\\) on the unit sphere. The maximum exists by compactness, and a constrained stationary-point calculation produces an eigenvector. Its orthogonal complement is invariant under \\(A\\), because \\(x^TAy=(Ax)^Ty=0\\) whenever \\(y\\) is perpendicular to the eigenvector \\(x\\). 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.\n\nFor example,\n\n\\[A=\\begin{pmatrix}2&1\\\\1&2\\end{pmatrix}\\]\n\nhas eigenvalues \\(3\\) and \\(1\\), with normalized eigenvectors\n\n\\[q_1=\\frac1{\\sqrt2}\\begin{pmatrix}1\\\\1\\end{pmatrix}, \\qquad q_2=\\frac1{\\sqrt2}\\begin{pmatrix}1\\\\-1\\end{pmatrix}.\\]\n\nThe transformation stretches these perpendicular directions by factors of \\(3\\) and \\(1\\). More generally,\n\n\\[A=\\sum_{j=1}^n\\lambda_jq_jq_j^T.\\]\n\nEach \\(q_jq_j^T\\) 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."
    },
    {
      "heading": "Quadratic forms, bilinear forms, and coordinate changes",
      "text": "A real symmetric matrix naturally represents a quadratic form,\n\n\\[q(x)=x^TAx.\\]\n\nIn coordinates,\n\n\\[q(x)=\\sum_i a_{ii}x_i^2+2\\sum_{i<j}a_{ij}x_ix_j.\\]\n\nThe factor \\(2\\) in the mixed terms is important: the polynomial \\(3x^2+4xy+5y^2\\), for example, is represented by\n\n\\[A=\\begin{pmatrix}3&2\\\\2&5\\end{pmatrix}.\\]\n\nEvery 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 \\(x^TKx=0\\) for every skew-symmetric matrix \\(K\\).\n\nThe associated symmetric bilinear form is\n\n\\[b(x,y)=x^TAy.\\]\n\nIt is linear separately in \\(x\\) and \\(y\\), and satisfies \\(b(x,y)=b(y,x)\\). Over the real numbers, the quadratic form determines the bilinear form through polarization:\n\n\\[b(x,y)=\\frac14\\bigl(q(x+y)-q(x-y)\\bigr).\\]\n\nThis correspondence explains why symmetric matrices arise whenever pairwise interactions contribute symmetrically to a scalar quantity. If \\(A\\) is positive definite, \\(b\\) is an inner product; without positivity, it remains a symmetric bilinear form but need not define lengths.\n\nTwo distinct matrix transformations appear in this setting. A change of basis for a linear operator produces similarity,\n\n\\[A\\longmapsto S^{-1}AS.\\]\n\nA change of coordinates \\(x=Sy\\) in a quadratic form instead gives\n\n\\[x^TAx=y^T(S^TAS)y,\\]\n\ncalled congruence. Congruence preserves symmetry for every invertible \\(S\\), whereas arbitrary similarity need not. Orthogonal changes of basis are special because \\(S^{-1}=S^T\\), 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.\n\nSylvester’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 \\((n_+,n_-,n_0)\\). By an invertible coordinate change, a quadratic form can be reduced to\n\n\\[y_1^2+\\cdots+y_{n_+}^2 -y_{n_++1}^2-\\cdots-y_{n_++n_-}^2,\\]\n\nwith 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."
    },
    {
      "heading": "Positive definiteness and matrix order",
      "text": "A real symmetric matrix \\(A\\) is positive definite if\n\n\\[x^TAx>0\\]\n\nfor every nonzero real vector \\(x\\), and positive semidefinite if \\(x^TAx\\ge0\\) for every \\(x\\). 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.\n\nSeveral 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:\n\n\\[\\det A_{1:k,1:k}>0,\\qquad k=1,\\ldots,n.\\]\n\nFor positive semidefiniteness, the corresponding condition is that all principal minors are nonnegative, not merely the leading ones. For instance, the diagonal matrix \\(\\operatorname{diag}(0,-1)\\) 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.\n\nPositive definite matrices admit a Cholesky decomposition\n\n\\[A=LL^T,\\]\n\nwhere \\(L\\) is lower triangular with positive diagonal entries. Conversely, any such product with nonsingular \\(L\\) is positive definite. Positive semidefinite matrices have factorizations \\(A=B^TB\\), where \\(B\\) 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.\n\nSymmetric matrices also carry the Loewner partial order: \\(A\\preceq B\\) means that \\(B-A\\) is positive semidefinite. This is not entrywise comparison. It asserts instead that \\(x^TAx\\le x^TBx\\) 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 \\(x^TAx=1\\). Their eigenvectors give the principal axes, with corresponding semiaxis lengths \\(1/\\sqrt{\\lambda_i}\\). The intersection of this cone with affine constraints is the basic feasible region of semidefinite optimization. Matrix order also behaves predictably under congruence: if \\(A\\preceq B\\), then \\(S^TAS\\preceq S^TBS\\), even when \\(S\\) is rectangular."
    },
    {
      "heading": "Variational principles and sensitivity of eigenvalues",
      "text": "For a nonzero vector \\(x\\), the Rayleigh quotient of a real symmetric matrix is\n\n\\[R_A(x)=\\frac{x^TAx}{x^Tx}.\\]\n\nWriting \\(x=\\sum_i c_iq_i\\) in an orthonormal eigenbasis gives\n\n\\[R_A(x)=\\frac{\\sum_i\\lambda_i c_i^2}{\\sum_i c_i^2}.\\]\n\nIt is therefore a weighted average of the eigenvalues. In particular,\n\n\\[\\lambda_{\\min}(A)\\le R_A(x)\\le\\lambda_{\\max}(A),\\]\n\nwith equality at the relevant extreme eigenspaces. These bounds turn an algebraic eigenvalue problem into the optimization of a quadratic expression over the unit sphere.\n\nThe Courant–Fischer variational principle extends this characterization to every eigenvalue. With eigenvalues ordered increasingly,\n\n\\[\\lambda_1\\le\\cdots\\le\\lambda_n,\\]\n\none version states\n\n\\[\\lambda_k= \\min_{\\substack{S\\subseteq\\mathbb R^n\\\\ \\dim S=k}} \\ \\max_{\\substack{x\\in S\\\\x\\ne0}}R_A(x).\\]\n\nThe minimization ranges over \\(k\\)-dimensional linear subspaces. One consequence is eigenvalue monotonicity: if \\(A\\preceq B\\), then \\(\\lambda_k(A)\\le\\lambda_k(B)\\) for every \\(k\\). Another is Cauchy interlacing. If \\(B\\) is a principal submatrix obtained by deleting one row and the corresponding column of \\(A\\), and its eigenvalues are \\(\\mu_1\\le\\cdots\\le\\mu_{n-1}\\), then\n\n\\[\\lambda_k(A)\\le\\mu_k\\le\\lambda_{k+1}(A).\\]\n\nSymmetric eigenvalue problems also have strong perturbation bounds. For a symmetric perturbation \\(E\\), Weyl’s bound gives\n\n\\[|\\lambda_k(A+E)-\\lambda_k(A)|\\le\\|E\\|_2,\\]\n\nwhere \\(\\|\\cdot\\|_2\\) 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.\n\nEigenvectors 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 \\(A(t)\\), with normalized eigenvector \\(q(t)\\),\n\n\\[\\frac{d\\lambda}{dt}=q(t)^TA'(t)q(t).\\]\n\nThis formula connects eigenvalue sensitivity directly to the perturbation’s quadratic action in the eigenvector direction."
    },
    {
      "heading": "Matrix functions, norms, and approximation",
      "text": "The spectral decomposition defines functions of a real symmetric matrix. If a scalar function \\(f\\) is defined at every eigenvalue, then\n\n\\[f(A)=Q\\,\\operatorname{diag}\\bigl(f(\\lambda_1),\\ldots,f(\\lambda_n)\\bigr)Q^T.\\]\n\nFor 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 \\(A\\), the matrix \\(f(A)\\) acts by multiplication by \\(f(\\lambda_i)\\).\n\nSeveral important constructions follow immediately. The matrix exponential is\n\n\\[e^A=Q\\,\\operatorname{diag}(e^{\\lambda_i})Q^T\\]\n\nand is positive definite for every real symmetric \\(A\\). A positive semidefinite matrix has a unique positive semidefinite square root,\n\n\\[A^{1/2}=Q\\,\\operatorname{diag}(\\sqrt{\\lambda_i})Q^T.\\]\n\nFor 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.\n\nBasic matrix invariants acquire simple spectral descriptions:\n\n\\[\\operatorname{tr}(A)=\\sum_i\\lambda_i,\\qquad \\det(A)=\\prod_i\\lambda_i.\\]\n\nThe 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\n\n\\[\\|A\\|_2=\\max_i|\\lambda_i|, \\qquad \\|A\\|_F=\\left(\\sum_i\\lambda_i^2\\right)^{1/2}.\\]\n\nThe 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\n\n\\[\\kappa_2(A)= \\frac{\\max_i|\\lambda_i|}{\\min_i|\\lambda_i|}.\\]\n\nThese facts support low-rank approximation. Order the eigenpairs so that\n\n\\[|\\lambda_1|\\ge\\cdots\\ge|\\lambda_n|,\\]\n\nand retain the first \\(k\\):\n\n\\[A_k=\\sum_{i=1}^k\\lambda_iq_iq_i^T.\\]\n\nThe Eckart–Young–Mirsky theorem implies that this is a best rank-at-most-\\(k\\) approximation in both spectral and Frobenius norm. The errors are \\(|\\lambda_{k+1}|\\) and \\((\\sum_{i>k}\\lambda_i^2)^{1/2}\\), respectively. A related projection replaces each negative eigenvalue by zero. The resulting matrix\n\n\\[A_+=Q\\,\\operatorname{diag}(\\max(\\lambda_i,0))Q^T\\]\n\nis the nearest positive semidefinite matrix to \\(A\\) in Frobenius norm. Additional constraints, such as prescribed diagonal entries, turn this simple clipping operation into a different and generally more involved approximation problem."
    },
    {
      "heading": "Numerical algorithms and preservation of symmetry",
      "text": "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 \\(n(n+1)/2\\) numbers rather than \\(n^2\\). 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 \\((A+A^T)/2\\) restores exact symmetry, but this operation does not by itself restore positive definiteness.\n\nFor dense eigenvalue computations, a standard strategy first reduces \\(A\\) to symmetric tridiagonal form:\n\n\\[T=Q^TAQ.\\]\n\nHouseholder transformations perform the reduction while preserving symmetry and orthogonal similarity. The reduction takes order \\(n^3\\) 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.\n\nFor a large sparse matrix, computing every eigenvector is often unnecessary and prohibitively expensive. Lanczos iteration constructs orthonormal bases for Krylov subspaces generated by\n\n\\[v,\\ Av,\\ A^2v,\\ldots\\]\n\nand 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.\n\nLinear systems also benefit from symmetry. Positive definite systems can be solved by Cholesky factorization, requiring approximately \\(n^3/3\\) operations for a dense matrix, compared with about \\(2n^3/3\\) for general LU factorization. Symmetric indefinite systems commonly use a pivoted factorization\n\n\\[P^TAP=LDL^T,\\]\n\nwhere \\(D\\) may contain both \\(1\\times1\\) and \\(2\\times2\\) 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."
    },
    {
      "heading": "Covariance, statistical analysis, and optimization",
      "text": "In statistics, the covariance matrix of a real random vector \\(X\\) with finite second moments is\n\n\\[\\Sigma=\\mathbb E\\bigl[(X-\\mu)(X-\\mu)^T\\bigr], \\qquad \\mu=\\mathbb E[X].\\]\n\nIt is symmetric because the covariance of \\(X_i\\) and \\(X_j\\) is unchanged when their order is reversed. It is also positive semidefinite, since\n\n\\[a^T\\Sigma a=\\operatorname{Var}(a^TX)\\ge0.\\]\n\nThus 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.\n\nIn 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 \\(X\\) with observations in rows, the sample covariance is \\(X^TX/(m-1)\\), where \\(m\\) is the number of observations. Its rank is at most \\(\\min(n,m-1)\\), so it is necessarily singular when there are more variables than centered-data degrees of freedom.\n\nIn optimization, symmetry appears in second derivatives. If a scalar function has continuous second partial derivatives, its Hessian satisfies\n\n\\[H_{ij}=\\frac{\\partial^2f}{\\partial x_i\\partial x_j} =\\frac{\\partial^2f}{\\partial x_j\\partial x_i} =H_{ji}.\\]\n\nNear a point \\(x\\), the second-order expansion contains\n\n\\[f(x+h)=f(x)+\\nabla f(x)^Th+\\frac12h^TH(x)h+o(\\|h\\|^2).\\]\n\nAt 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 \\(t^4\\) and \\(-t^4\\) both have zero second derivative at zero but opposite local behavior.\n\nQuadratic objectives display these relationships globally. For symmetric \\(A\\),\n\n\\[f(x)=\\frac12x^TAx-b^Tx\\]\n\nhas gradient \\(Ax-b\\) and Hessian \\(A\\). If \\(A\\) is positive definite, the unique minimizer solves \\(Ax=b\\). If \\(A\\) is positive semidefinite and singular, a minimizer exists exactly when \\(b\\) lies in the range of \\(A\\), and it is then nonunique along the null space. In least squares, the normal matrix \\(X^TX\\) is always symmetric positive semidefinite, becoming positive definite when the columns of \\(X\\) are linearly independent. Adding \\(\\lambda I\\) with \\(\\lambda>0\\), as in ridge regression, shifts every eigenvalue upward by \\(\\lambda\\). 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."
    },
    {
      "heading": "Geometry, graphs, and physical systems",
      "text": "In geometry, a positive definite symmetric matrix specifies an inner product in coordinates:\n\n\\[\\langle x,y\\rangle_G=x^TGy.\\]\n\nOn 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.\n\nIn 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 \\(w_{ij}\\), the graph Laplacian is \\(L=D-W\\), where \\(D_{ii}=\\sum_jw_{ij}\\). Its defining quadratic identity is\n\n\\[x^TLx=\\frac12\\sum_{i,j}w_{ij}(x_i-x_j)^2.\\]\n\nThis 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.\n\nMechanical vibration provides a closely related generalized eigenvalue problem:\n\n\\[Kq=\\omega^2Mq.\\]\n\nHere \\(K\\) is a symmetric stiffness matrix and \\(M\\) a symmetric positive definite mass matrix. Although \\(M^{-1}K\\) need not be symmetric in ordinary coordinates, the substitution \\(u=M^{1/2}q\\) converts the problem to\n\n\\[M^{-1/2}KM^{-1/2}u=\\omega^2u,\\]\n\nwhose matrix is symmetric. Distinct vibration modes can therefore be chosen orthogonal in the mass inner product \\(q_i^TMq_j\\). If the stiffness matrix is positive semidefinite, all squared natural frequencies are nonnegative; zero modes correspond to unconstrained motions or other null directions.\n\nSymmetry also arises from variational discretizations of differential equations. In the finite element method, a symmetric bilinear expression such as\n\n\\[a(u,v)=\\int_\\Omega \\nabla u\\cdot\\nabla v\\,dx\\]\n\nproduces a matrix with entries \\(A_{ij}=a(\\phi_j,\\phi_i)\\), which satisfy \\(A_{ij}=A_{ji}\\). 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."
    }
  ],
  "links": [
    "matrix",
    "matrix-transpose",
    "linear-algebra",
    "spectral-theorem",
    "vector-space",
    "dimension-vector-space",
    "inverse-matrix",
    "complex-number",
    "hermitian-matrix",
    "conjugate-transpose",
    "orthogonal-matrix",
    "orthonormal-basis",
    "eigenvalues-and-eigenvectors",
    "matrix-diagonalization",
    "eigenspace",
    "orthogonal-complement",
    "orthogonal-projection",
    "quadratic-form",
    "inner-product",
    "matrix-similarity",
    "positive-definite-matrix",
    "cholesky-decomposition",
    "gram-matrix",
    "partial-order",
    "convex-set",
    "linear-subspace",
    "polynomial",
    "exponential-function",
    "matrix-trace",
    "determinant",
    "matrix-rank",
    "singular-value-decomposition",
    "condition-number",
    "numerical-linear-algebra",
    "floating-point-arithmetic",
    "householder-transformation",
    "qr-algorithm",
    "numerical-stability",
    "sparse-matrix",
    "conjugate-gradient-method",
    "statistics",
    "covariance-matrix",
    "principal-component-analysis",
    "mathematical-optimization",
    "hessian-matrix",
    "least-squares",
    "ridge-regression",
    "geometry",
    "metric-tensor",
    "graph-theory",
    "adjacency-matrix",
    "graph-laplacian",
    "finite-element-method",
    "self-adjoint-operator"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}