{
  "id": "positive-semidefinite-matrix",
  "title": "Positive Semidefinite Matrix",
  "lang": "en",
  "source_lang": "en",
  "summary": "A positive semidefinite matrix is a symmetric or Hermitian matrix whose quadratic form is nonnegative for every vector, equivalently one whose eigenvalues are all nonnegative.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "Nonnegative definite matrix",
    "PSD matrix"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/positive-semidefinite-matrix/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/positive-semidefinite-matrix/",
      "json": "https://aiwiki.page/zh/positive-semidefinite-matrix.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A positive semidefinite matrix is a real symmetric or complex Hermitian matrix \\(A\\) for which \\(x^*Ax\\geq 0\\) for every vector \\(x\\) of the appropriate dimension. Here \\(x^*\\) denotes the conjugate transpose, which reduces to the ordinary transpose for real vectors. Positive semidefinite matrices describe nonnegative quadratic quantities, including variances, squared lengths, and quadratic energy functions. They are fundamental in linear algebra, statistics, optimization, and numerical computation."
    },
    {
      "heading": "Definition and conventions",
      "text": "A complex square matrix \\(A\\in\\mathbb C^{n\\times n}\\) is positive semidefinite if\n\n\\[A=A^* \\quad\\text{and}\\quad x^*Ax\\geq 0 \\qquad\\text{for every }x\\in\\mathbb C^n.\\]\n\nThe condition \\(A=A^*\\) says that \\(A\\) is a Hermitian matrix. For real matrices, the corresponding definition requires \\(A=A^{\\mathsf T}\\) and\n\n\\[x^{\\mathsf T}Ax\\geq 0 \\qquad\\text{for every }x\\in\\mathbb R^n.\\]\n\nThe standard notation is\n\n\\[A\\succeq 0.\\]\n\nThe sets of real symmetric and complex Hermitian positive semidefinite matrices are commonly denoted by \\(\\mathbb S_+^n\\) and \\(\\mathbb H_+^n\\), respectively.\n\nThe expression \\(x^*Ax\\) is the quadratic form associated with \\(A\\). “Semidefinite” allows this expression to vanish for a nonzero vector. By contrast, a positive definite matrix satisfies\n\n\\[x^*Ax>0\\qquad\\text{whenever }x\\neq 0.\\]\n\nPositive definite matrices are therefore positive semidefinite, but the converse need not hold. The zero matrix is positive semidefinite.\n\nSymmetry is an important part of the standard real-matrix definition. For an arbitrary real square matrix \\(M\\),\n\n\\[x^{\\mathsf T}Mx = x^{\\mathsf T}\\left(\\frac{M+M^{\\mathsf T}}2\\right)x.\\]\n\nConsequently, nonnegativity of this expression alone constrains only the symmetric part of \\(M\\). Some authors use “positive semidefinite” more broadly in this setting, so conventions should be checked when nonsymmetric matrices occur."
    },
    {
      "heading": "Equivalent characterizations",
      "text": "For a Hermitian matrix \\(A\\), the following statements are equivalent:\n\n- \\(A\\succeq 0\\).\n- Every eigenvalue of \\(A\\) is nonnegative.\n- There is a possibly rectangular matrix \\(B\\) such that\n\n\\[A=B^*B.\\]\n- Every principal minor of \\(A\\) is nonnegative.\n- \\(A\\) has a Hermitian positive semidefinite square root.\n\nThese equivalences connect the quadratic-form definition with spectral, algebraic, and geometric descriptions.\n\nSpectral decomposition and square roots\n\nBy the spectral theorem, a Hermitian matrix has a decomposition\n\n\\[A=U\\Lambda U^*,\\]\n\nwhere \\(U\\) is unitary and \\(\\Lambda=\\operatorname{diag}(\\lambda_1,\\ldots,\\lambda_n)\\) has real diagonal entries. Writing \\(y=U^*x\\) gives\n\n\\[x^*Ax=\\sum_{i=1}^n\\lambda_i|y_i|^2.\\]\n\nThis is nonnegative for every \\(x\\) precisely when every \\(\\lambda_i\\geq 0\\).\n\nFor such a matrix, its unique Hermitian positive semidefinite square root is\n\n\\[A^{1/2} = U\\operatorname{diag}(\\sqrt{\\lambda_1},\\ldots,\\sqrt{\\lambda_n})U^*.\\]\n\nThus \\(A=(A^{1/2})^*A^{1/2}\\), establishing a factorization of the form \\(B^*B\\).\n\nIf \\(A\\) has rank \\(r\\), the matrix \\(B\\) can be chosen with exactly \\(r\\) rows. Its columns then represent \\(A\\) as a Gram matrix:\n\n\\[a_{ij}=b_i^*b_j.\\]\n\nConversely, every Gram matrix is positive semidefinite because\n\n\\[x^*B^*Bx=\\|Bx\\|^2\\geq 0.\\]\n\nPrincipal minors\n\nA principal submatrix is obtained by choosing the same index set for rows and columns. Its determinant is a principal minor. A Hermitian matrix is positive semidefinite exactly when all its principal minors are nonnegative.\n\nChecking only the leading principal minors is not sufficient. For example,\n\n\\[A= \\begin{pmatrix} 0&0\\\\ 0&-1 \\end{pmatrix}\\]\n\nhas leading principal minors \\(0\\) and \\(0\\), but is not positive semidefinite. Its principal minor corresponding to the second diagonal entry is \\(-1\\).\n\nThis differs from the positive definite case, where positivity of all leading principal minors is sufficient."
    },
    {
      "heading": "Examples and entrywise consequences",
      "text": "A real symmetric \\(2\\times2\\) matrix\n\n\\[A= \\begin{pmatrix} a&b\\\\ b&c \\end{pmatrix}\\]\n\nis positive semidefinite exactly when\n\n\\[a\\geq 0,\\qquad c\\geq 0,\\qquad ac-b^2\\geq 0.\\]\n\nFor example,\n\n\\[A= \\begin{pmatrix} 1&1\\\\ 1&1 \\end{pmatrix}\\]\n\nis positive semidefinite because\n\n\\[x^{\\mathsf T}Ax=(x_1+x_2)^2.\\]\n\nIts eigenvalues are \\(2\\) and \\(0\\), so it is not positive definite.\n\nPositive semidefiniteness is not the same as having nonnegative entries. The matrix\n\n\\[\\begin{pmatrix} 1&-1\\\\ -1&1 \\end{pmatrix}\\]\n\nis positive semidefinite, whereas\n\n\\[\\begin{pmatrix} 1&2\\\\ 2&1 \\end{pmatrix}\\]\n\nhas only positive entries but has eigenvalues \\(3\\) and \\(-1\\).\n\nFor any positive semidefinite matrix,\n\n\\[a_{ii}\\geq 0, \\qquad |a_{ij}|^2\\leq a_{ii}a_{jj}.\\]\n\nThe second inequality follows from its \\(2\\times2\\) principal minors and is also a manifestation of the Cauchy–Schwarz inequality in a Gram representation. In particular, a zero diagonal entry forces every entry in the corresponding row and column to be zero."
    },
    {
      "heading": "Algebraic and geometric properties",
      "text": "Closure and transformations\n\nIf \\(A,B\\succeq 0\\) and \\(\\alpha,\\beta\\geq 0\\), then\n\n\\[\\alpha A+\\beta B\\succeq 0.\\]\n\nThus positive semidefinite matrices form a convex cone. This cone is closed, and its interior in the space of Hermitian matrices consists exactly of the positive definite matrices.\n\nFor every compatible matrix \\(C\\),\n\n\\[C^*AC\\succeq 0.\\]\n\nIf \\(C\\) is invertible, this transformation preserves positive semidefiniteness in both directions. Taking \\(C\\) to select coordinates shows that every principal submatrix of a positive semidefinite matrix is positive semidefinite.\n\nThe ordinary product \\(AB\\) of two positive semidefinite matrices need not be Hermitian and therefore need not be positive semidefinite. If \\(A\\) and \\(B\\) commute, their product is positive semidefinite. By contrast, their entrywise product is always positive semidefinite; this is the Schur product theorem.\n\nNull directions and seminorms\n\nFor \\(A\\succeq 0\\),\n\n\\[x^*Ax=0 \\quad\\Longleftrightarrow\\quad Ax=0.\\]\n\nThus the zero directions of its quadratic form are exactly its null space.\n\nThe expression\n\n\\[\\|x\\|_A=\\sqrt{x^*Ax}\\]\n\ndefines a seminorm. It is a genuine norm precisely when \\(A\\) is positive definite. Similarly, \\(x^*Ay\\) defines a possibly degenerate inner product, becoming an inner product when \\(A\\) is positive definite.\n\nThe eigenvalues also show that\n\n\\[\\operatorname{tr}(A)\\geq 0, \\qquad \\det(A)\\geq 0.\\]\n\nA positive semidefinite matrix is positive definite exactly when it is invertible, or equivalently when its determinant is strictly positive. Neither nonnegative trace nor nonnegative determinant alone is sufficient to establish positive semidefiniteness.\n\nThe Loewner order\n\nFor Hermitian matrices of the same size, define\n\n\\[A\\succeq B \\quad\\Longleftrightarrow\\quad A-B\\succeq 0.\\]\n\nThis relation, called the Loewner order, is a partial order, not an entrywise comparison. It means\n\n\\[x^*Ax\\geq x^*Bx \\qquad\\text{for every }x.\\]\n\nUsing the trace pairing, the positive semidefinite cone is self-dual:\n\n\\[A\\succeq 0 \\quad\\Longleftrightarrow\\quad \\operatorname{tr}(AB)\\geq 0 \\quad\\text{for every }B\\succeq 0,\\]\n\nwhere \\(A\\) is Hermitian. This property is important in optimization duality."
    },
    {
      "heading": "Applications",
      "text": "Covariance matrices\n\nFor a real random vector \\(X\\) with finite second moments, its covariance matrix is\n\n\\[\\Sigma = \\mathbb E\\!\\left[(X-\\mathbb EX)(X-\\mathbb EX)^{\\mathsf T}\\right].\\]\n\nFor every vector \\(v\\),\n\n\\[v^{\\mathsf T}\\Sigma v = \\operatorname{Var}(v^{\\mathsf T}X)\\geq 0.\\]\n\nHence every covariance matrix is positive semidefinite.\n\nSingularity has a precise statistical meaning: some nonzero linear combination of the centered variables vanishes almost surely. Conversely, every real symmetric positive semidefinite matrix is the covariance matrix of some random vector, including a possibly degenerate multivariate normal vector.\n\nThe nonnegative eigenvalues of a covariance matrix represent variances along orthogonal directions, providing the spectral basis of principal component analysis.\n\nConvexity and optimization\n\nFor the quadratic function\n\n\\[f(x)=\\frac12x^{\\mathsf T}Ax+b^{\\mathsf T}x+c,\\]\n\nwith \\(A\\) real symmetric, convexity is equivalent to \\(A\\succeq 0\\).\n\nMore generally, a twice continuously differentiable function on an open convex domain is convex if and only if its Hessian matrix is positive semidefinite everywhere on that domain. This connects matrix positivity with convex optimization.\n\nIn semidefinite programming, a linear objective is optimized subject to affine constraints and positive semidefiniteness requirements. A typical constraint is the linear matrix inequality\n\n\\[A_0+\\sum_{i=1}^m x_iA_i\\succeq 0.\\]\n\nThese problems include applications in control, estimation, and relaxations of discrete optimization problems.\n\nBlock matrix constraints can often be simplified using a Schur complement. If \\(P\\succ 0\\), then\n\n\\[\\begin{pmatrix} P&Q\\\\ Q^*&R \\end{pmatrix}\\succeq 0 \\quad\\Longleftrightarrow\\quad R-Q^*P^{-1}Q\\succeq 0.\\]\n\nWhen \\(P\\) is singular, an analogous criterion requires a generalized inverse and an additional range condition.\n\nKernel methods and graph energies\n\nIn machine learning, a positive semidefinite kernel produces a positive semidefinite Gram matrix for every finite collection of inputs. This makes the kernel interpretable as an inner product in a feature space and supports methods such as support vector machines and Gaussian process models.\n\nIn graph theory, the Laplacian \\(L=D-W\\) of an undirected graph with symmetric nonnegative edge weights satisfies\n\n\\[x^{\\mathsf T}Lx = \\frac12\\sum_{i,j}w_{ij}(x_i-x_j)^2 \\geq 0.\\]\n\nThe Laplacian is therefore positive semidefinite. Its null space consists of vectors that are constant on each connected component."
    },
    {
      "heading": "Computation and numerical limitations",
      "text": "For a symmetric or Hermitian matrix, computing its eigenvalues provides a direct test for positive semidefiniteness. In floating-point arithmetic, however, a matrix that is theoretically positive semidefinite may acquire small negative eigenvalues through rounding or approximation. Numerical tests therefore commonly compare the smallest eigenvalue against a tolerance related to matrix scale and computational accuracy.\n\nCholesky decomposition is particularly effective for positive definite matrices. Positive semidefinite matrices also admit triangular square-root factorizations in exact arithmetic, but zero pivots require special handling, and standard positive-definite Cholesky routines may stop on singular input. Pivoted factorizations or eigenvalue-based methods are often used when rank deficiency is expected.\n\nTwo common modifications serve different purposes:\n\n- Diagonal shifting: replacing \\(A\\) by \\(A+\\varepsilon I\\), with \\(\\varepsilon>0\\), makes a positive semidefinite matrix positive definite.\n- Eigenvalue clipping: for a Hermitian matrix, replacing negative eigenvalues by zero gives its nearest positive semidefinite matrix in the Frobenius norm.\n\nSuch changes alter the original matrix. In statistical and optimization applications, they may therefore change the covariance model, objective, or feasible set rather than merely improve numerical behavior."
    }
  ],
  "links": [
    "matrix",
    "conjugate-transpose",
    "linear-algebra",
    "hermitian-matrix",
    "quadratic-form",
    "positive-definite-matrix",
    "eigenvalues-and-eigenvectors",
    "spectral-theorem",
    "matrix-rank",
    "gram-matrix",
    "determinant",
    "cauchy-schwarz-inequality",
    "null-space",
    "norm-mathematics",
    "inner-product",
    "partial-order",
    "covariance-matrix",
    "principal-component-analysis",
    "hessian-matrix",
    "convex-optimization",
    "semidefinite-programming",
    "machine-learning",
    "graph-theory",
    "floating-point-arithmetic",
    "cholesky-decomposition"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}