NegativeDefiniteMatrixQ

NegativeDefiniteMatrixQ[m]

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

Details

Examples

open allclose all

Basic Examples  (2)

Test if a 2×2 real matrix is explicitly negative definite:

This means that the quadratic form for all vectors :

Visualize the values of the quadratic form:

Test if a 3×3 Hermitian matrix is negative definite:

Scope  (10)

Basic Uses  (6)

Test if a real machine-precision matrix is explicitly negative definite:

Test if a complex matrix is negative definite:

Test if an exact matrix is negative definite:

Use NegativeDefiniteMatrixQ with an arbitrary-precision matrix:

A random matrix is typically not negative definite:

Use NegativeDefiniteMatrixQ with a symbolic matrix:

The matrix becomes negative definite when b=-TemplateBox[{a}, Conjugate]:

NegativeDefiniteMatrixQ works efficiently with large numerical matrices:

Special Matrices  (4)

Use NegativeDefiniteMatrixQ with sparse matrices:

Use NegativeDefiniteMatrixQ with structured matrices:

The identity matrix is not negative definite:

HilbertMatrix is not negative definite:

Applications  (11)

The Geometry and Algebra of Negative Definite Matrices  (4)

Consider a real, negative definite 2×2 matrix and its associated real quadratic q=TemplateBox[{x}, Transpose].m.x:

Because is negative definite, the level sets are ellipses:

The plot of will be an downward-facing elliptic paraboloid:

For a real, negative definite matrix, the level sets are -ellipsoids:

A Hermitian matrix defines a real-valued quadratic form by q=TemplateBox[{x}, ConjugateTranspose].m.x:

If is negative definite, is negative for all nonzero inputs:

Visualize for real-valued inputs:

For a real-valued matrix , only the symmetric part determines whether is negative definite. Write with symmetric and antisymmetric:

As is real and symmetric TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], ., s, ., x}, )}}, Conjugate]=TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], ., s, ., x}, )}}, ConjugateTranspose]=TemplateBox[{x}, ConjugateTranspose].TemplateBox[{s}, ConjugateTranspose].TemplateBox[{{(, TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], )}}, ConjugateTranspose]=TemplateBox[{x}, ConjugateTranspose].s.x, meaning TemplateBox[{x}, ConjugateTranspose].s.x is purely real:

Similarly, as is real and antisymmetric TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], ., a, ., x}, )}}, Conjugate]=-TemplateBox[{x}, ConjugateTranspose].a.x, or TemplateBox[{x}, ConjugateTranspose].a.x is pure imaginary:

Thus, Re(TemplateBox[{x}, ConjugateTranspose].m.x)=TemplateBox[{x}, ConjugateTranspose].s.x, so is negative definite if and only if is:

For a complex-valued matrix , only the Hermitian part determines whether is negative definite. Write with Hermitian and antihermitian:

As is Hermitian, TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose], ., h, ., x}, )}}, Conjugate]=TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose], ., h, ., x}, )}}, ConjugateTranspose]=TemplateBox[{x}, ConjugateTranspose].TemplateBox[{h}, ConjugateTranspose].TemplateBox[{{(, TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], )}}, ConjugateTranspose]=TemplateBox[{x}, ConjugateTranspose].h.x, meaning TemplateBox[{x}, ConjugateTranspose].h.x is purely real:

Similarly, as is antihermitian, TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], ., a, ., x}, )}}, Conjugate]=-TemplateBox[{x}, ConjugateTranspose].a.x, or TemplateBox[{x}, ConjugateTranspose].a.x is pure imaginary:

Thus, Re(TemplateBox[{x}, ConjugateTranspose].m.x)=TemplateBox[{x}, ConjugateTranspose].h.x, so is negative definite if and only if is:

Sources of Negative Definite Matrices  (4)

Two-dimensional rotation matrices with angles in the interval are negative definite:

This follows from the fact that in this case Re(TemplateBox[{x}, ConjugateTranspose].r.x) corresponds to the normal dot product and :

The squares of nonsingular antihermitian matrices are negative definite:

The negated Lehmer matrix is symmetric negative definite:

Its inverse is tridiagonal, which is also symmetric negative definite:

The matrix -Min[i,j] is always symmetric negative definite:

Its inverse is a tridiagonal matrix, which is also symmetric negative definite:

Uses of Negative Definite Matrices  (3)

The second derivative test classifies critical points of a function as local minima if the Hessian is positive definite, local maxima if the Hessian is negative definite and saddle points if the Hessian is indefinite (the test fails if the Hessian is not one of these three types). Find the critical points of a function of two variables:

Compute the Hessian matrix :

The last of the three critical points is a saddle point:

The first two points are local maxima:

Visualize the function. The red and blue points are maxima and the green point is a saddle point:

Find the critical points of a function of three variables:

Compute the Hessian matrix of f:

The first two critical points are local maxima:

The last three are saddle points:

For this function, any three of the critical points are linearly dependent, so they all lie in a single plane:

Compute the normal to that plane:

Visualize the function, with the maxima green and the non-extreme critical points red:

It is possible to apply CholeskyDecomposition to a negative definite matrix by negating it:

The Cholesky decomposition works only with positive definite Hermitian matrices:

An upper triangular decomposition of is a matrix such that :

Properties & Relations  (14)

NegativeDefiniteMatrixQ[x] trivially returns False for any x that is not a matrix:

A matrix is negative definite if Re(TemplateBox[{x}, ConjugateTranspose].m.x)<0 for all nonzero vectors :

The sign of Im(TemplateBox[{x}, ConjugateTranspose].m.x) is irrelevant:

A real matrix is negative definite if and only if its symmetric part is negative definite:

In general, a matrix is negative definite if and only if its Hermitian part is negative definite:

A real symmetric matrix is negative definite if and only if its eigenvalues are all negative:

The statement is true of Hermitian matrices more generally:

A general matrix can have all negative eigenvalues without being negative definite:

Equally, a matrix can be negative definite without having negative eigenvalues:

The failure is due to the eigenvalues being complex:

The real part of the eigenvalues of a negative definite matrix must be negative:

A diagonal matrix is negative definite if and only if the diagonal elements have negative real part:

A negative definite matrix has the general form u.d.TemplateBox[{u}, ConjugateTranspose]+a with a diagonal negative definite :

Split into its Hermitian and antihermitian parts:

By the spectral theorem, can be unitarily diagonalized using JordanDecomposition:

The matrix is diagonal with negative diagonal entries:

The matrix is unitary:

Verify that m=u.d.TemplateBox[{u}, ConjugateTranspose]+a:

A matrix is negative definite if and only if is positive definite:

A negative definite matrix is always negative semidefinite:

It cannot be indefinite or positive semidefinite:

A negative definite matrix is invertible:

The inverse matrix is negative definite as well:

If is real and negative definite, there exists such that TemplateBox[{x}, Transpose].m.x<=-delta ||x||^2 for any real vector :

Let be the smallest eigenvalue of the symmetric part of :

Verify that TemplateBox[{x}, Transpose].m.x<=-delta ||x||^2:

The determinant and trace of a real, symmetric, negative definite matrix are negative:

This is also true of negative definite Hermitian matrices:

A Hermitian negative definite matrix has a uniquely defined square root such that :

The root is uniquely defined by the condition that is negative definite and Hermitian:

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

Replacing one matrix in the product by a positive definite one gives a negative definite matrix:

Possible Issues  (2)

The Hilbert matrix m is positive definite and -m is negative definite:

The smallest eigenvalue of m is too small to be certainly negative at machine precision:

At machine precision, the matrix -m does not test as negative definite:

Using precision high enough to compute negative eigenvalues will give the correct answer:

NegativeDefiniteMatrixQ gives False unless it can prove a symbolic matrix is positive definite:

Using a combination of Eigenvalues and Reduce can give more precise results:

Wolfram Research (2014), NegativeDefiniteMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/NegativeDefiniteMatrixQ.html.

Text

Wolfram Research (2014), NegativeDefiniteMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/NegativeDefiniteMatrixQ.html.

CMS

Wolfram Language. 2014. "NegativeDefiniteMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NegativeDefiniteMatrixQ.html.

APA

Wolfram Language. (2014). NegativeDefiniteMatrixQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NegativeDefiniteMatrixQ.html

BibTeX

@misc{reference.wolfram_2024_negativedefinitematrixq, author="Wolfram Research", title="{NegativeDefiniteMatrixQ}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/NegativeDefiniteMatrixQ.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_negativedefinitematrixq, organization={Wolfram Research}, title={NegativeDefiniteMatrixQ}, year={2014}, url={https://reference.wolfram.com/language/ref/NegativeDefiniteMatrixQ.html}, note=[Accessed: 21-December-2024 ]}