test for positive or negative definite or indefinite Matrices
equation of the form query = attribute where attribute is one of 'positive_definite', 'positive_semidefinite', 'negative_definite', 'negative_semidefinite', or 'indefinite'
The IsDefinite(A, query = 'positive_definite') returns true if A is a real symmetric or a complex Hermitian Matrix and all the eigenvalues are determined to be positive. Because the default query is query = 'positive_definite', this command is equivalent to IsDefinite(A).
Similarly, for real symmetric or complex Hermitian Matrices, the following calling sequences return the indicated result:
IsDefinite(A, query = 'positive_semidefinite') returns true if all the eigenvalues are determined to be nonnegative.
IsDefinite(A, query = 'negative_definite') returns true if all the eigenvalues are determined to be negative.
IsDefinite(A, query = 'negative_semidefinite') returns true if all the eigenvalues are determined to be non-positive.
IsDefinite(A, query = 'indefinite') returns true if at least one eigenvalue is determined to be positive and at least one eigenvalue is determined to be negative.
If the eigenvalues are determined to be other than described in the cases above, a value of false is returned.
If the requested query cannot be resolved, this routine returns a boolean expression representing the condition which must be satisfied for that resolution to be true.
The definition of positive definite is that, for all column Vectors x, 0<HermitianTranspose⁡x·A·x.
The definitions for positive semidefinite, negative definite, and negative semidefinite involve reversal of the inequality sign, or relaxation from a strict inequality.
The definition of indefinite is that it is equivalent to not positive semidefinite and not negative semidefinite.
A complex, non-Hermitian Matrix A has the same definiteness as its Hermitian part, that is, A2+HermitianTranspose⁡A2.
A real, non-symmetric Matrix A has the same definiteness as its symmetric part, that is, A2+Transpose⁡A2.
This function is part of the LinearAlgebra package, and so it can be used in the form IsDefinite(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[IsDefinite](..).
A ≔ DiagonalMatrix⁡−5,0,−1
B ≔ 1,8,3|−4,5,2|6,1,0
C ≔ 1,2+I|2−I,5
In the next example, the result of the query depends on the values assigned to x and y.
Download Help Document
What kind of issue would you like to report? (Optional)