As far as I can tell, there is no way to tell the builtin PositiveSemidefiniteQ
about assumptions on symbols.
For example, the matrix
{{1,0,0,Sqrt[1-p]}, {0,0,0,0}, {0,0,p,0}, {Sqrt[1-p],0,0,1-p}}
has eigenvalues {0,0,2-p,p}
and is therefore positive semi-definite whenever 0<=p<=2
, but PositiveSemidefiniteQ
always returns False
.
Is checking the non-negativity of the eigenvalues with $Assumptions
a good way to test for this? Or would it be better to do something like row-reduction? There are a bunch of algorithms answering this related question, but I don't know which ones translate best to symbolics.
Edits:
- The scope section of the documentation for
PositiveSemidefiniteQ
says "The test returnsFalse
unless it is true for all possible complex values of symbolic parameters") - For clarification, I mean my questions exactly as stated above. To paraphrase, what is the best way to check for the positive semi-definite condition of a symbolic matrix allowing for symbol assumptions? This question is given in the context that, in the numeric case, checking eigenvalue signs is not the best way.