Details and Options
- A matrix m is indefinite if Re[Conjugate[x].m.x] achieves both positive and negative values.
- 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.
Examplesopen allclose all
Basic Examples (2)
Basic Uses (6)
Use IndefiniteMatrixQ with an arbitrary-precision matrix:
Use IndefiniteMatrixQ with a symbolic matrix:
IndefiniteMatrixQ works efficiently with large numerical matrices:
Adjust the option Tolerance to give a correct answer:
The Geometry and Algebra of Positive Semidefinite Matrices (6)
Sources of Indefinite Matrices (6)
FourierMatrix[k] is indefinite for :
ToeplitzMatrix[k] is indefinite for :
Many filter kernel matrices are indefinite, including CrossMatrix[k]:
And DiskMatrix[k] for :
DiskMatrix is positive semidefinite:
Randomly generated matrices tend to be indefinite, with the probability of the matrix being indefinite rapidly increasing as the dimensions of the matrix increase. The following inputs estimate the probability of a matrix being indefinite for matrices from to . First, matrices whose entries are independently and uniformly drawn from the interval :
Matrices drawn from GaussianOrthogonalMatrixDistribution:
Matrices drawn from GaussianUnitaryMatrixDistribution:
Matrices drawn from CircularRealMatrixDistribution:
Uses of Indefinite Matrices (4)
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:
Roughly half of three-dimensional rotation matrices are indefinite. This can be understood as vectors parallel to the axis of rotation being unchanged by the rotation, and vectors perpendicular to the axis being rotated by more than . For the former , and for the latter . First, generate random rotation matrices:
A spacetime or pseudo-Riemannian metric is an invertible, real symmetric, indefinite matrix that becomes positive definite when restricted some three-dimensional subspace. It gives a notion of squared distance between events in spacetime via its associated quadratic form. Show that the standard or Minkowski metric is a spacetime metric:
Properties & Relations (9)
By the spectral theorem, can be unitarily diagonalized using JordanDecomposition:
Wolfram Research (2014), IndefiniteMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/IndefiniteMatrixQ.html.
Wolfram Language. 2014. "IndefiniteMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/IndefiniteMatrixQ.html.
Wolfram Language. (2014). IndefiniteMatrixQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IndefiniteMatrixQ.html