# PositiveDefiniteMatrixQ

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

# Details # Examples

open allclose all

## Basic Examples(1)

Test if a matrix is explicitly positive definite:

This means that the quadratic form for all vectors :

## Scope(5)

A real matrix:

A complex matrix:

A dense matrix:

A sparse matrix:

An approximate MachinePrecision matrix:

An approximate arbitrary-precision matrix:

A matrix with exact numeric entries:

A matrix with symbolic entries:

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

## Applications(9)

Find the level sets for a quadratic form for a positive definite matrix:

In 2D, the level sets are ellipses:

In 3D, the level sets are ellipsoids:

A real nonsingular Covariance matrix is always symmetric and positive definite:

A complex nonsingular Covariance matrix is always Hermitian and positive definite:

CholeskyDecomposition works only with positive definite symmetric or Hermitian matrices:

An upper triangular decomposition of m is a matrix b such that b.bm:

A Gram matrix is a symmetric matrix of dot products of vectors:

A Gram matrix is always positive definite if vectors are linearly independent:

The Lehmer matrix is symmetric positive definite:

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

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

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

A sufficient condition for a minimum of a function f is a zero gradient and positive definite Hessian:

Check the conditions for up to five variables:

Check that a matrix drawn from WishartMatrixDistribution is symmetric positive definite:

## Properties & Relations(15)

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

The eigenvalues of m are all positive:

A Hermitian matrix is positive definite if and only if its eigenvalues are all positive:

The eigenvalues of m are all positive:

A real is positive definite if and only if its symmetric part, , is positive definite:

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

The symmetric part has positive eigenvalues:

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

A complex is positive definite if and only if its Hermitian part, , is positive definite:

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

The Hermitian part has positive eigenvalues:

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

A diagonal matrix is positive definite if the diagonal elements are positive:

A positive definite matrix is always positive semidefinite:

The determinant and trace of a symmetric positive definite matrix are positive:

The determinant and trace of a Hermitian positive definite matrix are always positive:

A symmetric positive definite matrix is invertible:

The inverse matrix is positive definite:

A Hermitian positive definite matrix is invertible:

The inverse matrix is positive definite:

A symmetric positive definite matrix m has a uniquely defined square root b such that mb.b:

The square root b is positive definite and symmetric:

A Hermitian positive definite matrix m has a uniquely defined square root b such that mb.b:

The square root b is positive definite and Hermitian:

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

If m is positive definite, then there exists δ>0 such that xτ.m.xδx2 for any nonzero x:

A positive definite real matrix has the general form m.d.m+a, with a diagonal positive definite d:

m is a nonsingular square matrix:

a is an antisymmetric matrix:

## Possible Issues(1)

Hilbert matrices are positive definite:

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

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

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