New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make isposdef
return true for unsymmetric positive definite matrices
#26045
Comments
There are two definitions: a stricter which is simpler conceptually as well as easier to implement and a slightly more general definition which is less simple conceptually. Right now we use the former. What I miss is the good motivation for using the latter. If people frequently would like to test for the generalized version for non-symmetric matrices then it would make sense to consider using that version. However, in practice, the request has only come up in cases where the matrix was actually supposed to be symmetric but rounding had made it slightly non-symmetric. I don't think that is a compelling motivation. In these cases, if we changed |
The main confusion seems to be that isposdef returns false on non-symmetric positive definite matrices. Maybe a bit radical, but how about deprecating |
I don't think that is needed. The definition used in Julia for positive definiteness does not include the extension as described in https://en.wikipedia.org/wiki/Positive-definite_matrix#Extension_for_non-symmetric_matrices. Just add a note to the docs about it and done imo. |
Why not add an option to switch to the less restricted definition at least? If the main concern is confusing people used to or expecting the restricted definition and therefore calling |
If someone (perhaps you, @mohamed82008?) wants to implement the the more general definition and experiment with it, that seems like a good idea for a third-party package. |
That's possible of course, but it's unlikely that someone who wants to check for positive definiteness will want to look further than the standard library for linear algebra. If you are suggesting this because only few people may need this functionality then I understand, but I don't think it's the best way to do it. |
I'm suggesting that in an open source project, if someone wants to explore an idea like this, the most effective way to make that happen is to try it out themselves, demonstrate that it is useful and coherent and then use that working demonstration to convince other people that they are correct. |
If you mean to convince people that the function is theoretically correct, that doesn't need an implementation. But if you mean to make a correct implementation first to make it easier to merge later, if that's not off the table, then sure I can do that. |
As stated here: A non-symmetric real matrix |
Note my response in the same discourse thread. |
Can we at least stick to Householder's definition and throw an error when the matrix is not Hermitian? Quoting Householder: “A Hermitian matrix A is said to be positive definite in case x≠0→x^HAx>0; it is nonnegative semidefinite in case x^HAx≥0 for every x. For non-Hermitian matrices the concept is not defined.” I think for real matrices the fact that some authors allow unsymmetric matrices can lead to |
I could imagine to make a PR with the following changes for But I am not sure, if @andreasnoack and @KristofferC could be convinced to approve this. |
The documantation of Julia should mention that isposdef only works on a symetrical matrix |
It does!
For real matrices, "symmetric" is equivalent to "Hermitian" and for complex matrices, "symmetric" is not relevant for positive definiteness. |
Since this question https://discourse.julialang.org/t/isposdef-inconsistent-results-numerically-unstable/9013 got no further response, I am opening an issue hoping it won't be shot down.
The text was updated successfully, but these errors were encountered: