Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Matrices and Linear Algebra >

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 x.A.x>0for all vectors x!=0:
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 x.A.x>0for all vectors x!=0:
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 m are all positive:
So m must be positive definite:
A matrix m is positive definite if and only if its Hermitian part, , is positive definite:
The Hermitian part has positive eigenvalues, so is positive definite:
Therefore, m must be positive definite:
Note, this does not mean that the eigenvalues of m are necessarily positive:
A positive definite Hermitian matrix has a square root given by the CholeskyDecomposition:
A square root of m is a matrix b such that b^.b=m:
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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team