# checkPD -- returns positive definite matrices from a list of matrices

## Synopsis

• Usage:
checkPD(L)
• Inputs:
• Optional inputs:
• ZeroTolerance => ..., default value 1e-10, optional input to set the largest absolute value that should be treated as zero
• Outputs:
• a list, of positive definite matrices

## Description

This function takes a list of matrices (or a single matrix) and returns another list with only positive definite matrices. If there are no positive definite matrices in the list, it returns an empty list.

If a matrix contains an imaginary part below the tolerance level, then only the real part is reported in the output. (See checkPD(...,ZeroTolerance=>...))

 i1 : L={matrix{{1,0},{0,1}},matrix{{-2,0},{0,1}},matrix{{sqrt(-1),0},{0,sqrt (-1)}}} o1 = {| 1 0 |, | -2 0 |, | ii 0 |} | 0 1 | | 0 1 | | 0 ii | o1 : List i2 : checkPD(L) o2 = {| 1 0 |} | 0 1 | o2 : List

## Ways to use checkPD :

• "checkPD(List)"
• "checkPD(Matrix)"

## For the programmer

The object checkPD is .