6
$\begingroup$

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:

  1. The scope section of the documentation for PositiveSemidefiniteQ says "The test returns False unless it is true for all possible complex values of symbolic parameters")
  2. 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.
$\endgroup$
1
  • 1
    $\begingroup$ "I am therefore interested in an implementation that allows for assumptions." <-- I would recommend rewriting your question, including this bit of information I found, and asking specifically about such an implementation. I deleted my answer to give room for new ones. For reference, my answer pointed at the documentation of PositiveDefiniteMatrixQ, Examples -> Scope. $\endgroup$
    – Szabolcs
    Commented Apr 15, 2015 at 19:57

1 Answer 1

7
$\begingroup$

One way is shown below. Alternatives include using Simplify with Assumptions, again on testing that the eigenvalues are nonnegative.

Resolve[
 ForAll[p, 0 <= p <= 2, 
  And @@ Thread[
    Eigenvalues[{{1, 0, 0, Sqrt[1 - p]}, {0, 0, 0, 0}, {0, 0, p, 
        0}, {Sqrt[1 - p], 0, 0, 1 - p}}] >= 0]]]

(* Out[9]= True *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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