This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

PositiveDefiniteMatrixQ

PositiveDefiniteMatrixQ[m]
tests whether m is a positive definite matrix.
  • A Hermitian matrix m is considered positive definite if and only if all its eigenvalues are positive.
Test if a matrix is explicitly positive definite:
This means that the quadratic form for all vectors :
Test if a matrix is explicitly positive definite:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
This means that the quadratic form for all vectors :
In[3]:=
Click for copyable input
Out[3]=
Test a matrix of machine numbers:
Test a matrix of complex numbers:
Test a matrix of arbitrary-precision numbers:
Test a matrix of exact numeric quantities:
Test a sparse matrix:
Test a matrix with symbolic entries:
The test returns False unless it is true for all possible complex values of symbolic parameters:
A Hermitian matrix is positive definite if and only if its eigenvalues are all positive:
The eigenvalues of are all positive:
So must be positive definite:
A matrix is positive definite if and only if its Hermitian part, , is positive definite:
The Hermitian part has positive eigenvalues, so it is positive definite:
Therefore, must be positive definite:
Note, this does not mean that the eigenvalues of are necessarily positive:
A positive definite Hermitian matrix has a square root given by the CholeskyDecomposition:
A square root of is a matrix such that :
A sufficient condition for a minimum is a zero gradient and positive definite Hessian:
Check the conditions for up to five variables:
If positive definiteness is not certain at the matrix precision, the test returns False:
Hilbert matrices are positive definite:
The smallest eigenvalue is too small to be certainly positive at machine precision:
At machine precision, the matrix does not test positive definite:
Using precision high enough to resolve positiveness will work:
New in 6