NegativeSemidefiniteMatrixQ

NegativeSemidefiniteMatrixQ[m]

gives True if m is explicitly negative semidefinite, and False otherwise.

Details and Options

  • A matrix m is negative semidefinite if Re[Conjugate[x].m.x]0 for all vectors x.
  • NegativeSemidefiniteMatrixQ 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.

Examples

open allclose all

Basic Examples  (1)

Test if a matrix is explicitly negative semidefinite:

This means that the quadratic form for all vectors :

Scope  (6)

A real matrix:

A complex matrix:

Test a sparse matrix:

An approximate MachinePrecision real matrix:

An approximate MachinePrecision complex matrix:

An approximate arbitrary-precision matrix:

A matrix with exact numeric quantities:

A matrix with symbolic entries:

The test returns False unless it is true for all possible complex values of symbolic parameters:

Options  (1)

Tolerance  (1)

Generate a real-valued diagonal matrix with some random perturbation of order :

Adjust the option Tolerance to accept matrices as negative semidefinite:

Applications  (1)

Find the level sets for a quadratic form for a negative semidefinite matrix:

In 2D, the level sets are straight lines:

In 3D, the level sets are elliptical cylinders or planes:

Properties & Relations  (10)

A symmetric matrix is negative semidefinite if and only if its eigenvalues are non-positive:

The condition Re[Conjugate[x].m.x]0 is satisfied:

The eigenvalues of m are all non-positive:

A Hermitian matrix is negative semidefinite if and only if its eigenvalues are all non-positive:

The condition Re[Conjugate[x].m.x]0 is satisfied:

The eigenvalues of m are all non-negative:

A real matrix m is negative semidefinite if its symmetric part, , is negative semidefinite:

The symmetric part has non-positive eigenvalues:

Note that this does not mean that the eigenvalues of m are necessarily non-positive:

A complex matrix m is negative semidefinite if its Hermitian part, , is non-positive:

The Hermitian part has non-positive eigenvalues:

Note that this does not mean that the eigenvalues of m are necessarily non-positive:

A diagonal matrix is negative semidefinite if the diagonal elements are non-positive:

The determinant and trace of a symmetric negative semidefinite matrix are non-positive:

The determinant and trace of a Hermitian negative semidefinite matrix are non-positive:

The Kronecker product of two symmetric negative semidefinite matrices is symmetric and positive semidefinite:

The Kronecker product of a symmetric negative matrix and a symmetric positive semidefinite matrix is symmetric and negative semidefinite:

A negative semidefinite real matrix has the general form with a diagonal negative semidefinite d:

m is any square matrix:

a is any antisymmetric matrix:

Possible Issues  (1)

The function returns False for symbolic matrices having non-numeric eigenvalues that cannot be determined as non-positive:

It is not possible to determine if the eigenvalues of m are non-negative:

Introduced in 2014
 (10.0)