# IndefiniteMatrixQ

gives True if m is explicitly indefinite, and False otherwise.

# Details and Options • A matrix m is indefinite if its Hermitian part is neither a positive nor a negative semidefinite matrix.
• IndefiniteMatrixQ 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 indefinite:

The quadratic form has positive and negative values for different 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 entries:

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 :

If the element of order is a roundoff error, then the matrix is incorrectly considered as indefinite:

## Applications(2)

The quadratic form for an indefinite matrix has degenerate level sets:

In 3D, the level sets are degenerate ellipsoids, in this case an elliptic cylinder:

The Redheffer matrix is a 0-1 indefinite matrix:

## Properties & Relations(6)

A real symmetric matrix is indefinite if and only if it contains both non-positive and non-negative eigenvalues:

The matrix m contains both non-positive and non-negative eigenvalues:

A Hermitian matrix is indefinite if and only if it contains both non-positive and non-negative eigenvalues:

The matrix m contains both non-positive and non-negative eigenvalues:

A real matrix is indefinite if its symmetric part, , is indefinite:

The symmetric part contains both non-positive and non-negative eigenvalues:

Note that this does not mean that the eigenvalues of m are non-positive or non-negative, because they can be complex:

A complex matrix is indefinite if its Hermitian part, , is indefinite:

The Hermitian part contains both non-positive and non-negative eigenvalues:

Note that this does not mean that the eigenvalues of m are non-positive or non-negative, because they can be complex:

A diagonal matrix is indefinite if it contains both positive and negative elements on its main diagonal:

An indefinite matrix has the general form , with a diagonal indefinite : is any nonsingular square matrix: 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 or non-negative:

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

Introduced in 2014
(10.0)