Post · 6 min read· pp. 593–596

What Is a Symmetric Positive Definite Matrix?

A real n×nn\times n matrix AA is symmetric positive definite if it is symmetric (AA is equal to its transpose, ATA^T) and

xT ⁣Ax>0\mboxforallnonzerovectors x.x^T\!Ax > 0 \quad \mbox{for all nonzero vectors}~x.

By making particular choices of xx in this definition we can derive the inequalities

aii>0\mboxforall i,aij<aiiajj\mboxforall i≠j.\begin{alignedat}{2} a_{ii} &>0 \quad&&\mbox{for all}~i,\\ a_{ij} &< \sqrt{ a_{ii} a_{jj} } \quad&&\mbox{for all}~i\ne j. \end{alignedat}

Satisfying these inequalities is not sufficient for positive definiteness. For example, the matrix

A=[13/403/413/403/41]A = \begin{bmatrix} 1 & 3/4 & 0 \\ 3/4 & 1 & 3/4 \\ 0 & 3/4 & 1 \\ \end{bmatrix}

satisfies all the inequalities but xT ⁣Ax<0x^T\!Ax < 0 for x=[1,− ⁣2, 1]Tx = [1,{}-\!\sqrt{2},~1]^T.

A sufficient condition for a symmetric matrix to be positive definite is that it has positive diagonal elements and is diagonally dominant, that is, aii>∑j≠i∣aij∣a_{ii} > \sum_{j \ne i} |a_{ij}| for all ii.

The definition requires the positivity of the quadratic form xT ⁣Axx^T\!Ax. Sometimes this condition can be confirmed from the definition of AA. For example, if A=BT ⁣BA = B^T\!B and BB has linearly independent columns then xT ⁣Ax=(Bx)TBx>0x^T\!Ax = (Bx)^T Bx > 0 for x≠0x\ne 0. Generally, though, this condition is not easy to check.

Two equivalent conditions to AA being symmetric positive definite are

  • every leading principal minor det⁡(Ak)\det(A_k), where the submatrix Ak=A(1 ⁣:k,1 ⁣:k)A_k = A(1\colon k, 1 \colon k) comprises the intersection of rows and columns 11 to kk, is positive,
  • the eigenvalues of AA are all positive.

The first condition implies, in particular, that det⁡(A)>0\det(A) > 0, which also follows from the second condition since the determinant is the product of the eigenvalues.

Here are some other important properties of symmetric positive definite matrices.

  • A−1A^{-1} is positive definite.
  • AA has a unique symmetric positive definite square root XX, where a square root is a matrix XX such that X2=AX^2 = A.
  • AA has a unique Cholesky factorization A=RT ⁣RA = R^T\!R, where RR is upper triangular with positive diagonal elements.

Sources of positive definite matrices include statistics, since nonsingular correlation matrices and covariance matrices are symmetric positive definite, and finite element and finite difference discretizations of differential equations.

Examples of symmetric positive definite matrices, of which we display only the 4×44\times 4 instances, are the Hilbert matrix

H_4 = \left[\begin{array}{@{\mskip 5mu}c*{3}{@{\mskip 15mu} c}@{\mskip 5mu}} 1 & \frac{1}{2} & \frac{1}{3} & \frac{1}{4} \\[6pt] \frac{1}{2} & \frac{1}{3} & \frac{1}{4} & \frac{1}{5}\\[6pt] \frac{1}{3} & \frac{1}{4} & \frac{1}{5} & \frac{1}{6}\\[6pt] \frac{1}{4} & \frac{1}{5} & \frac{1}{6} & \frac{1}{7}\\[6pt] \end{array}\right],

the Pascal matrix

P_4 = \left[\begin{array}{@{\mskip 5mu}c*{3}{@{\mskip 15mu} r}@{\mskip 5mu}} 1 & 1 & 1 & 1\\ 1 & 2 & 3 & 4\\ 1 & 3 & 6 & 10\\ 1 & 4 & 10 & 20 \end{array}\right],

and minus the second difference matrix, which is the tridiagonal matrix

S_4 = \left[\begin{array}{@{\mskip 5mu}c*{3}{@{\mskip 15mu} r}@{\mskip 5mu}} 2 & -1 & & \\ -1 & 2 & -1 & \\ & -1 & 2 & -1 \\ & & -1 & 2 \end{array}\right].

All three of these matrices have the property that aija_{ij} is non-decreasing along the diagonals. However, if AA is positive definite then so is PTAPP^TAP for any permutation matrix PP, so any symmetric reordering of the row or columns is possible without changing the definiteness.

A 4×44\times 4 symmetric positive definite matrix that was often used as a test matrix in the early days of digital computing is the Wilson matrix

W=[5765710876810957910].W = \begin{bmatrix} 5 &7& 6& 5 \\ 7 &10& 8& 7 \\ 6& 8& 10& 9 \\ 5& 7& 9 &10 \end{bmatrix}.

What is the best way to test numerically whether a symmetric matrix is positive definite? Computing the eigenvalues and checking their positivity is reliable, but slow. The fastest method is to attempt to compute a Cholesky factorization and declare the matrix positivite definite if the factorization succeeds. This is a reliable test even in floating-point arithmetic. If the matrix is not positive definite the factorization typically breaks down in the early stages so and gives a quick negative answer.

Symmetric block matrices

C=[AXXTB]C = \begin{bmatrix} A & X\\ X^T & B \end{bmatrix}

often appear in applications. If AA is nonsingular then we can write

[AXXTB]=[I0XTA−1I][A00B−XTA−1X][IA−1X0I],\begin{bmatrix} A & X\\ X^T & B \end{bmatrix} = \begin{bmatrix} I & 0\\ X^TA^{-1} & I \end{bmatrix} \begin{bmatrix} A & 0\\ 0 & B-X^TA^{-1}X \end{bmatrix} \begin{bmatrix} I & A^{-1}X\\ 0 & I \end{bmatrix},

which shows that CC is congruent to a block diagonal matrix, which is positive definite when its diagonal blocks are. It follows that CC is positive definite if and only if both AA and B−XTA−1XB - X^TA^{-1}X are positive definite. The matrix B−XTA−1XB - X^TA^{-1}X is called the Schur complement of AA in CC.

We mention two determinantal inequalities. If the block matrix CC above is positive definite then det⁡(C)≤det⁡(A)det⁡(B)\det(C) \le \det(A) \det(B) (Fischer’s inequality). Applying this inequality recursively gives Hadamard’s inequality for a symmetric positive definite AA:

det⁡(A)≤a11a22…ann,\det(A) \le a_{11}a_{22} \dots a_{nn},

with equality if and only if AA is diagonal.

Finally, we note that if xTAx≥0x^TAx \ge 0 for all x≠0x\ne0, so that the quadratic form is allowed to be zero, then the symmetric matrix AA is called symmetric positive semidefinite. Some, but not all, of the properties above generalize in a natural way. An important difference is that semidefinitness is equivalent to all principal minors, of which there are 2n−12^{n-1}, being nonnegative; it is not enough to check the nn leading principal minors. Consider, as an example, the matrix

[111111110],\begin{bmatrix} 1 & 1 & 1\\ 1 & 1 & 1\\ 1 & 1 & 0 \end{bmatrix},

which has leading principal minors 11, 00, and 00 and a negative eigenvalue.

A complex n×nn\times n matrix AA is Hermitian positive definite if it is Hermitian (AA is equal to its conjugate transpose, A∗A^*) and x∗Ax>0x^*Ax > 0 for all nonzero vectors xx. Everything we have said above generalizes to the complex case.

References

This is a minimal set of references, which contain further useful references within.

This article is part of the “What Is” series, available from https://nhigham.com/category/what-is and in PDF form from the GitHub repository https://github.com/higham/what-is.