0
$\begingroup$

I believe the following should be True but returns False for me:

PositiveSemidefiniteMatrixQ[DiagonalMatrix[{1, -10^-100}], Tolerance -> 10^-10]

As far as I can tell the Tolerance option does nothing. An easy workaround is

PositiveSemidefiniteMatrixQ[A + tolerance*IdentityMatrix[Length@A]]

I have checked that this happens in 10.0.2 and 10.1. Is it still a bug in newer versions?

$\endgroup$
3
  • $\begingroup$ More generally, where can I find a list of fixed bugs between versions? I can only find lists of new features... $\endgroup$ – Ian Hincks Dec 3 '15 at 4:57
  • $\begingroup$ The bugs tag is reserved for questions where the problem has been vetted by this community and the observed behavior is confirmed to be a bug. Once it is agreed that the behavior is actually a bug, a moderator (or someone of similar standing) will add the bugs tag. $\endgroup$ – march Dec 3 '15 at 5:00
  • 1
    $\begingroup$ "For approximate matrices, the option Tolerance -> t can be used..." per the documentation. $\endgroup$ – ilian Dec 3 '15 at 5:25
4
$\begingroup$

From the documentation:

For approximate matrices, the option Tolerance->t can be used to indicate that all eigenvalues $\lambda$ satisfying $|\lambda|\leq t\lambda_{max}$ are taken to be zero where $\lambda_{max}$ is an eigenvalue largest in magnitude.

Note that you are providing an exact matrix, not an approximation. If you evaluate:

PositiveSemidefiniteMatrixQ[DiagonalMatrix[{1, -10.^-100}]]

you get the result you expect, True. A decimal point, or the ` character can be used to denote that a value is approximate, or has some arbitrary precision.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.