Details and Options
- A matrix m is positive semidefinite if Re[Conjugate[x].m.x]≥0 for all vectors x.
- PositiveSemidefiniteMatrixQ works for symbolic as well as numerical matrices.
- For approximate matrices, the option Tolerance->t can be used to indicate that all eigenvalues λ satisfying λ≤t λmax are taken to be zero where λmax is an eigenvalue largest in magnitude.
- The option Tolerance has Automatic as its default value.
Examplesopen allclose all
Basic Examples (1)
An approximate MachinePrecision real matrix:
An approximate MachinePrecision complex matrix:
The test returns False unless it is true for all possible complex values of symbolic parameters:
Adjust the option Tolerance to accept matrices as positive semidefinite:
A real singular Covariance matrix is symmetric and positive semidefinite:
Tolerance is used to set to zero roundoff errors in computed eigenvalues:
A complex singular Covariance matrix is Hermitian and positive semidefinite:
Tolerance is used to set to zero roundoff errors in eigenvalues:
Properties & Relations (11)
Possible Issues (2)
CholeskyDecomposition does not work with symmetric or Hermitian positive semidefinite matrices that are singular:
The function returns False for symbolic matrices having non-numeric eigenvalues that cannot be determined as non-negative: