Command Palette

Search for a command to run...

Linear Methods AI

Positive Definite Matrix

Positive and Semidefinite Definitions

Imagine we have a bowl that always faces upward. No matter from which direction we throw a ball into it, the ball will always roll to the lowest point. Positive definite matrices have a property similar to this bowl in mathematical space.

A symmetric matrix ARn×nA \in \mathbb{R}^{n \times n} or Hermitian matrix ACn×nA \in \mathbb{C}^{n \times n} is called positive semidefinite if:

xTAx0 for all xRnx^T A x \geq 0 \text{ for all } x \in \mathbb{R}^n
xHAx0 for all xCnx^H A x \geq 0 \text{ for all } x \in \mathbb{C}^n

A matrix is called positive definite if a stronger condition is satisfied:

xTAx>0 for all x0 in Rnx^T A x > 0 \text{ for all } x \neq 0 \text{ in } \mathbb{R}^n
xHAx>0 for all x0 in Cnx^H A x > 0 \text{ for all } x \neq 0 \text{ in } \mathbb{C}^n

Conversely, a matrix is called negative semidefinite if A-A is positive semidefinite, and negative definite if A-A is positive definite. A matrix that is neither positive nor negative semidefinite is called indefinite.

Geometric Properties of Ellipsoids

Why is this concept important? Let's look at it from an interesting geometric perspective.

If AA is a positive definite matrix, then the set:

E={xRn:xTAx=1}E = \{x \in \mathbb{R}^n : x^T A x = 1\}

forms an ellipsoid in nn-dimensional space centered at the origin. This ellipsoid shape provides a visual representation of how the matrix "stretches" space in various directions.

Specifically, if A=1r2IA = \frac{1}{r^2} I where II is the identity matrix, then EE becomes a sphere with radius rr.

Properties of Diagonal Elements

One simple but important property of positive definite matrices is that all their diagonal elements must be positive.

If AA is a positive definite matrix, then all diagonal elements aii>0a_{ii} > 0 for i=1,2,,ni = 1, 2, \ldots, n.

Why is this so? Because if we take the standard basis vector eie_i that has component 1 at position ii and 0 elsewhere, then:

aii=eiTAei>0a_{ii} = e_i^T A e_i > 0

However, this condition is not sufficient to guarantee positive definiteness. We can have a matrix with all positive diagonal elements but still not be positive definite.

Eigenvalue Criteria

The most elegant way to determine positive definiteness is through eigenvalues. Let's look at this very useful criterion.

A symmetric matrix ARn×nA \in \mathbb{R}^{n \times n} or Hermitian matrix ACn×nA \in \mathbb{C}^{n \times n} is positive definite if and only if all its eigenvalues are positive:

λ1,λ2,,λn>0\lambda_1, \lambda_2, \ldots, \lambda_n > 0

For positive semidefinite, all eigenvalues must be non-negative (λi0\lambda_i \geq 0).

Why is this true? Because for symmetric or Hermitian matrices, we can perform orthogonal diagonalization. If A=QΛQTA = Q \Lambda Q^T where Λ\Lambda is a diagonal matrix containing eigenvalues, then:

xTAx=xTQΛQTx=yTΛy=i=1nλiyi2x^T A x = x^T Q \Lambda Q^T x = y^T \Lambda y = \sum_{i=1}^n \lambda_i y_i^2

where y=QTxy = Q^T x. This expression is positive for all x0x \neq 0 if and only if all λi>0\lambda_i > 0.

Leading Principal Minor Criteria

There's another practical way to check positive definiteness without computing eigenvalues. This method is called the leading principal minor criteria or Hauptminorenkriterium.

Let ARn×nA \in \mathbb{R}^{n \times n} be a symmetric matrix. For k=1,2,,nk = 1, 2, \ldots, n, define the kk-th leading principal minor as:

Ak=(a11a1kak1akk)A_k = \begin{pmatrix} a_{11} & \cdots & a_{1k} \\ \vdots & \ddots & \vdots \\ a_{k1} & \cdots & a_{kk} \end{pmatrix}

This is the upper-left submatrix of size k×kk \times k from matrix AA. The determinant of AkA_k is called the kk-th leading principal minor.

A symmetric matrix AA is positive definite if and only if all its leading principal minors are positive:

detAk>0 for all k=1,2,,n\det A_k > 0 \text{ for all } k = 1, 2, \ldots, n

It's important to note that this leading principal minor criterion only detects positive definiteness, not positive semidefiniteness.

Application Examples

Let's look at some examples to better understand these concepts.

Indefinite Matrix with Mixed Eigenvalues

Consider the matrix A=(1554)A = \begin{pmatrix} 1 & 5 \\ 5 & 4 \end{pmatrix}. This matrix has eigenvalues approximately λ17.7202\lambda_1 \approx 7.7202 and λ22.7202\lambda_2 \approx -2.7202.

Since there is a negative eigenvalue, this matrix is indefinite. Even though its diagonal elements (1 and 4) are both positive, this doesn't guarantee positive definiteness.

Positive Definite Matrix with Verification

Now consider the matrix A=(5114)A = \begin{pmatrix} 5 & 1 \\ 1 & 4 \end{pmatrix}. This matrix has eigenvalues λ15.6180\lambda_1 \approx 5.6180 and λ23.3820\lambda_2 \approx 3.3820. Both eigenvalues are positive, so this matrix is positive definite.

We can also verify this using the leading principal minor criteria:

A1=(5),detA1=5>0A_1 = (5), \quad \det A_1 = 5 > 0
A2=(5114),detA2=201=19>0A_2 = \begin{pmatrix} 5 & 1 \\ 1 & 4 \end{pmatrix}, \quad \det A_2 = 20 - 1 = 19 > 0

Since all leading principal minors are positive, this matrix is positive definite.

Inverse of Positive Definite Matrix

From the previous example, the inverse of the positive definite matrix is:

A1=(4/191/191/195/19)A^{-1} = \begin{pmatrix} 4/19 & -1/19 \\ -1/19 & 5/19 \end{pmatrix}

This matrix has eigenvalues approximately λ10.17800\lambda_1 \approx 0.17800 and λ20.29569\lambda_2 \approx 0.29569. Both are positive, so A1A^{-1} is also positive definite.

Properties of Transpose Matrices

One important result in linear algebra is the property of the matrix ATAA^T A for rectangular matrices.

If ARm×nA \in \mathbb{R}^{m \times n} with mnm \geq n, then the matrix ATARn×nA^T A \in \mathbb{R}^{n \times n} is positive semidefinite. This matrix becomes positive definite if and only if AA has full rank (rank nn).

Why is this so? Because for any vector xRnx \in \mathbb{R}^n:

xT(ATA)x=(Ax)T(Ax)=Ax20x^T (A^T A) x = (Ax)^T (Ax) = \|Ax\|^2 \geq 0

This expression equals zero only if Ax=0Ax = 0. If AA has full rank, then Ax=0Ax = 0 only for x=0x = 0, so ATAA^T A is positive definite.

Spectral Transformation

A very useful concept in practice is the ability to "shift" the spectrum of a matrix.

If ARn×nA \in \mathbb{R}^{n \times n} is a symmetric matrix or ACn×nA \in \mathbb{C}^{n \times n} is a Hermitian matrix, and tt is a real number smaller than all eigenvalues of AA, then the matrix:

AtIA - tI

is positive definite.

This provides a practical way to make a matrix positive definite by shifting its eigenvalues. If we know the lower bound of the smallest eigenvalue, we can shift the spectrum so that all eigenvalues become positive.

Positive definite matrices play a central role in optimization, numerical analysis, and machine learning due to their geometric properties that guarantee the existence of a unique global minimum.