A positive semidefinite matrix is the matrix version of a nonnegative number, one whose quadratic form 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 with .
#Characterisations
A symmetric matrix is positive semidefinite, written , when for all , and positive definite, , when for all .
The quadratic form, the eigenvalues, and a factorisation all say the same thing.
For a symmetric the following are equivalent. First, . Second, every eigenvalue of is nonnegative. Third, for some matrix . Fourth, has a positive semidefinite square root, a symmetric with .
By the spectral theorem write with orthogonal and . For any , substituting gives . If every this is nonnegative, so the second condition implies the first. Conversely, taking gives , so forces each . Given nonnegative eigenvalues, set with , which is symmetric, has nonnegative eigenvalues hence is positive semidefinite, and squares to , giving the fourth condition. The square root is a factorisation with symmetric, the third condition. Finally implies , the first condition, closing the cycle.
The positive definite case is the same with strict inequalities, exactly when all eigenvalues are positive, equivalently with of full column rank, equivalently invertible and positive semidefinite. The square root is moreover unique among positive semidefinite matrices. Let with , diagonalised with and orthonormal columns . For any eigenvector of with , writing gives , so and hence ; therefore . Thus acts as on each eigenspace of and is forced to equal . The argument needs only .
#The Cholesky factorisation
A positive definite matrix factors through a triangular matrix, the form a numerical solver uses.
A positive definite matrix has a unique factorisation with lower triangular and positive diagonal entries.
Argue by induction on , the case being with and . For write in block form with first entry , first-column tail , and lower block ,
Multiplying out, has corner , off-diagonal blocks , and lower block , so requires , the Schur complement. That complement is positive definite of size , because for any the vector has after expanding, and positivity of makes it positive. By induction the Schur complement has a Cholesky factor , and assembling Equation (1) gives with positive diagonal. Uniqueness follows because the equations fix , then , then recurse on , 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.
The covariance matrix of a random vector with mean and finite second moments is positive semidefinite, and unless lies almost surely in a proper affine subspace.
Each , so by Cauchy-Schwarz and every is finite. For any deterministic the integrand is a finite sum of integrable terms, so linearity of expectation gives , so . The form vanishes, , exactly when is almost surely constant, which confines to the affine hyperplane . If no such exists, every and .
The eigenvectors of 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 is the linear map that turns uncorrelated unit-variance noise into a sample with covariance , the construction that realises a Gaussian vector of any prescribed covariance. Positive definiteness of is the condition that makes the inverse exist and the quadratic risk 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.