A matrix is assumed to be positive definite if for all eigenvalues e:
- realPart e > ZeroTolerance
- abs imaginaryPart e <= ZeroTolerance
If a matrix contains an imaginary part below the tolerance level, then only the real part is reported in the output.
i1 : L={matrix{{10^(-9)+10^(-10)*sqrt(-1),0},{0,10^(-9)+10^(-10)*sqrt (-1)}},
matrix{{10^(-10)+10^(-10)*sqrt(-1),0},{0,10^(-10)+10^(-10)*sqrt (-1)}},
matrix{{1+10^(-10)*sqrt(-1),0},{0,1+10^(-10)*sqrt (-1)}},
matrix{{1-10^(-9)*sqrt(-1),0},{0,1+10^(-9)*sqrt (-1)}}
}
o1 = {| 1e-9+1e-10ii 0 |, | 1e-10+1e-10ii 0 |, | 1+1e-10ii 0 |, | 1-1e-9ii 0 |}
| 0 1e-9+1e-10ii | | 0 1e-10+1e-10ii | | 0 1+1e-10ii | | 0 1+1e-9ii |
o1 : List
|
i2 : checkPD L
o2 = {| 1e-9 0 |, | 1 0 |}
| 0 1e-9 | | 0 1 |
o2 : List
|