This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Check a matrix is positive definite

Tags: None
(comma "," separated)
bobo01
Registered Member
Posts
10
Karma
0

Check a matrix is positive definite

Tue Apr 29, 2014 12:21 pm
I am doing some signal processing and it should be that my matrix is positive definite as it is an auto-correlation matrix. However, which is the quickest way to check this? What are other people doing? Does Eigen have an API that could check?

I thought of this, but not sure how quick this is going to be:

http://en.wikipedia.org/wiki/Sylvester%27s_criterion

Thanks for any tips.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
That depends on what you want to do with your matrix and what is the size of the matrix. If you want to solve a Ax=b problem, then you try to factorize it assuming it is SPD (e.g., using http://eigen.tuxfamily.org/dox/classEigen_1_1LLT.html) and then check that everything went well with the .info() method, or compute its eigen values with http://eigen.tuxfamily.org/dox/classEig ... olver.html and check that eigenvalues()(0)>0 && eigenvalues()(0)/eigenvalues()(n-1) > machine_precision.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell