Skip to content
homeaboutworkprojectsthesiswritingresume
Loading
~/blog/positive-definite-matrices0%dark
  1. home/
  2. writing/
  3. Positive Definite Matrices

26 June 2026 · 5 min read · updated 09 June 2026

Positive Definite Matrices

A positive semidefinite matrix is one whose quadratic form is never negative, the matrix analogue of a nonnegative number, and it is exactly the kind of matrix a covariance is. We prove the equivalence of positive semidefiniteness with nonnegative eigenvalues, with a Gram factorisation, and with the existence of a positive semidefinite square root, prove the Cholesky factorisation of a positive definite matrix, and identify the covariance matrix as the canonical positive semidefinite matrix whose eigenstructure is principal component analysis. This is the algebra the Gaussian and the quadratic programs of finance are written in.

  • 1 equation
  • 7 results
  • 6 connections
  • linear-algebra
  • optimization
  • statistics
On this page▾
  • Characterisations
  • The Cholesky factorisation
  • The covariance matrix

5 min left

  • Characterisations2m
  • The Cholesky factorisation1m
  • The covariance matrix1m

A positive semidefinite matrix is the matrix version of a nonnegative number, one whose quadratic form x⊤Axx^\top Axx⊤Ax never drops below zero. These are exactly the matrices that arise as covariances, as Gram matrices of inner products, and as the Hessians of convex functions, and the spectral theorem gives them a square root just as a nonnegative number has one. This post proves the characterisations of positive semidefiniteness, the Cholesky factorisation, and the identification of the covariance matrix as the canonical example [1], [2]. Matrices are real symmetric and act on Rn\R^nRn with ⟨x,y⟩=x⊤y\ip xy=x^\top y⟨x,y⟩=x⊤y.

#Characterisations

Definition1

A symmetric matrix AAA is positive semidefinite, written A⪰0A\succeq 0A⪰0, when x⊤Ax≥0x^\top Ax\ge 0x⊤Ax≥0 for all xxx, and positive definite, A≻0A\succ 0A≻0, when x⊤Ax>0x^\top Ax>0x⊤Ax>0 for all x≠0x\neq 0x=0.

The quadratic form, the eigenvalues, and a factorisation all say the same thing.

Theorem2

For a symmetric AAA the following are equivalent. First, A⪰0A\succeq 0A⪰0. Second, every eigenvalue of AAA is nonnegative. Third, A=B⊤BA=B^\top BA=B⊤B for some matrix BBB. Fourth, AAA has a positive semidefinite square root, a symmetric A1/2⪰0A^{1/2}\succeq 0A1/2⪰0 with (A1/2)2=A(A^{1/2})^2=A(A1/2)2=A.

Proof

By the spectral theorem write A=QΛQ⊤A=Q\Lambda Q^\topA=QΛQ⊤ with QQQ orthogonal and Λ=diag⁡(λi)\Lambda=\operatorname{diag}(\lambda_i)Λ=diag(λi​). For any xxx, substituting y=Q⊤xy=Q^ \top xy=Q⊤x gives x⊤Ax=y⊤Λy=∑iλiyi2x^\top Ax=y^\top\Lambda y=\sum_i\lambda_i y_i^2x⊤Ax=y⊤Λy=∑i​λi​yi2​. If every λi≥0\lambda_i\ge 0λi​≥0 this is nonnegative, so the second condition implies the first. Conversely, taking x=qix=q_ix=qi​ gives x⊤Ax=λix^\top Ax= \lambda_ix⊤Ax=λi​, so A⪰0A\succeq 0A⪰0 forces each λi≥0\lambda_i\ge 0λi​≥0. Given nonnegative eigenvalues, set A1/2=QΛ1/2Q⊤A^{1/2}=Q \Lambda^{1/2}Q^\topA1/2=QΛ1/2Q⊤ with Λ1/2=diag⁡(λi)\Lambda^{1/2}=\operatorname{diag}(\sqrt{\lambda_i})Λ1/2=diag(λi​​), which is symmetric, has nonnegative eigenvalues hence is positive semidefinite, and squares to QΛQ⊤=AQ\Lambda Q^\top=AQΛQ⊤=A, giving the fourth condition. The square root is a factorisation A=B⊤BA=B^\top BA=B⊤B with B=A1/2B=A^{1/2}B=A1/2 symmetric, the third condition. Finally A=B⊤BA=B^\top BA=B⊤B implies x⊤Ax=x⊤B⊤Bx=∥Bx∥2≥0x^\top Ax=x^\top B^\top Bx=\norm{Bx}^2\ge 0x⊤Ax=x⊤B⊤Bx=∥Bx∥2≥0, the first condition, closing the cycle.

The positive definite case is the same with strict inequalities, A≻0A\succ 0A≻0 exactly when all eigenvalues are positive, equivalently A=B⊤BA=B^\top BA=B⊤B with BBB of full column rank, equivalently AAA invertible and positive semidefinite. The square root is moreover unique among positive semidefinite matrices. Let S⪰0S\succeq 0S⪰0 with S2=AS^2=AS2=A, diagonalised S=Udiag⁡(sj)U⊤S=U\operatorname{diag}(s_j)U^\topS=Udiag(sj​)U⊤ with sj≥0s_j\ge 0sj​≥0 and orthonormal columns uju_juj​. For any eigenvector vvv of AAA with Av=μvAv=\mu vAv=μv, writing v=∑jcjujv=\sum_j c_j u_jv=∑j​cj​uj​ gives ∑jcjsj2uj=S2v=Av=∑jcjμuj\sum_j c_j s_j^2 u_j=S^2v=Av= \sum_j c_j\mu u_j∑j​cj​sj2​uj​=S2v=Av=∑j​cj​μuj​, so cj(sj2−μ)=0c_j(s_j^2-\mu)=0cj​(sj2​−μ)=0 and hence cj≠0⇒sj=μc_j\neq 0\Rightarrow s_j=\sqrt\mucj​=0⇒sj​=μ​; therefore Sv=∑jcjsjuj=μ vSv= \sum_j c_j s_j u_j=\sqrt\mu\,vSv=∑j​cj​sj​uj​=μ​v. Thus SSS acts as λi\sqrt{\lambda_i}λi​​ on each eigenspace of AAA and is forced to equal QΛ1/2Q⊤=A1/2Q\Lambda^{1/2}Q^\top=A^{1/2}QΛ1/2Q⊤=A1/2. The argument needs only A⪰0A\succeq 0A⪰0.

#The Cholesky factorisation

A positive definite matrix factors through a triangular matrix, the form a numerical solver uses.

Theorem3

A positive definite matrix AAA has a unique factorisation A=LL⊤A=LL^\topA=LL⊤ with LLL lower triangular and positive diagonal entries.

Proof

Argue by induction on nnn, the case n=1n=1n=1 being A=(a)A=(a)A=(a) with a>0a>0a>0 and L=(a)L=(\sqrt a)L=(a​). For n>1n>1n>1 write AAA in block form with first entry a=A11>0a=A_{11}>0a=A11​>0, first-column tail bbb, and lower block CCC,

A=(ab⊤bC),L=(a0b/aL′).(1)A=\begin{pmatrix}a & b^\top\\ b & C\end{pmatrix},\qquad L=\begin{pmatrix}\sqrt a & 0\\ b/\sqrt a & L' \end{pmatrix}. \tag{1}A=(ab​b⊤C​),L=(a​b/a​​0L′​).(1)

Multiplying out, LL⊤LL^\topLL⊤ has corner aaa, off-diagonal blocks bbb, and lower block bb⊤a+L′L′⊤\frac{bb^\top}{a}+L'L'^ \topabb⊤​+L′L′⊤, so A=LL⊤A=LL^\topA=LL⊤ requires L′L′⊤=C−bb⊤aL'L'^\top=C-\frac{bb^\top}{a}L′L′⊤=C−abb⊤​, the Schur complement. That complement is positive definite of size n−1n-1n−1, because for any z≠0z\neq 0z=0 the vector x=(−b⊤za,z)x=(-\frac{b^\top z}{a},z)x=(−ab⊤z​,z) has x⊤Ax=z⊤(C−bb⊤a)zx^ \top Ax=z^\top(C-\frac{bb^\top}{a})zx⊤Ax=z⊤(C−abb⊤​)z after expanding, and positivity of AAA makes it positive. By induction the Schur complement has a Cholesky factor L′L'L′, and assembling Equation (1) gives A=LL⊤A=LL^\topA=LL⊤ with positive diagonal. Uniqueness follows because the equations fix a\sqrt aa​, then b/ab/\sqrt ab/a​, then recurse on L′L'L′, each step determined.

#The covariance matrix

The canonical positive semidefinite matrix is a covariance, and its eigenstructure is the principal component analysis of the underlying randomness.

Proposition4

The covariance matrix Σ=E[(X−μ)(X−μ)⊤]\Sigma=\mathbb E[(X-\mu)(X-\mu)^\top]Σ=E[(X−μ)(X−μ)⊤] of a random vector XXX with mean μ\muμ and finite second moments E[∥X∥2]<∞\mathbb E[\norm{X}^2]<\inftyE[∥X∥2]<∞ is positive semidefinite, and Σ≻0\Sigma\succ 0Σ≻0 unless XXX lies almost surely in a proper affine subspace.

Proof

Each Xi∈L2X_i\in L^2Xi​∈L2, so XiXj∈L1X_iX_j\in L^1Xi​Xj​∈L1 by Cauchy-Schwarz and every Σij\Sigma_{ij}Σij​ is finite. For any deterministic aaa the integrand ∑i,jaiaj(Xi−μi)(Xj−μj)\sum_{i,j}a_ia_j(X_i-\mu_i)(X_j-\mu_j)∑i,j​ai​aj​(Xi​−μi​)(Xj​−μj​) is a finite sum of integrable terms, so linearity of expectation gives a⊤Σa=E[(a⊤(X−μ))2]=Var⁡(a⊤X)≥0a^\top\Sigma a=\mathbb E[(a^\top(X-\mu))^2]=\operatorname{Var}(a^\top X)\ge 0a⊤Σa=E[(a⊤(X−μ))2]=Var(a⊤X)≥0, so Σ⪰0\Sigma\succeq 0Σ⪰0. The form vanishes, a⊤Σa=0a^\top\Sigma a=0a⊤Σa=0, exactly when a⊤Xa^\top Xa⊤X is almost surely constant, which confines XXX to the affine hyperplane {x:a⊤x=a⊤μ}\{x:a^\top x=a^\top\mu\}{x:a⊤x=a⊤μ}. If no such a≠0a\neq 0a=0 exists, every a⊤Σa>0a^\top\Sigma a>0a⊤Σa>0 and Σ≻0\Sigma\succ 0Σ≻0.

The eigenvectors of Σ\SigmaΣ are the principal axes of the data and its eigenvalues the variances along them, by the variational characterisation, so the spectral decomposition of a covariance is principal component analysis, the same decomposition the Karhunen-Loeve expansion performs in infinite dimensions. The square root Σ1/2\Sigma^{1/2}Σ1/2 is the linear map that turns uncorrelated unit-variance noise into a sample with covariance Σ\SigmaΣ, the construction that realises a Gaussian vector of any prescribed covariance. Positive definiteness of Σ\SigmaΣ is the condition that makes the inverse Σ−1\Sigma^{-1}Σ−1 exist and the quadratic risk w⊤Σww^\top\Sigma ww⊤Σw of a portfolio strictly convex, so the mean-variance problem has a unique solution. Positive definiteness is the algebraic form of genuine randomness in every direction.

[1]
R. A. Horn and C. R. Johnson, Matrix Analysis, 2nd ed. Cambridge University Press, 2013.
[2]
G. Strang, Introduction to Linear Algebra, 5th ed. Wellesley-Cambridge Press, 2016.

Part 2 of 2 in Linear Algebra

← previousEigenvalues and the Spectral Theorem

Explore connections

see in the atlas →

related

  • Gaussian Vectors and Processes
  • The Mean-Variance Portfolio
  • Compact Operators and the Spectral Theorem

referenced by (1)

  • The Mean-Variance Portfolio
cite
@misc{positive-definite-matrices,
  author = {Zac Kienzle},
  title  = {Positive Definite Matrices},
  year   = {2026},
  month  = {06},
  url    = {https://zackienzle.com/blog/positive-definite-matrices}
}