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

Rank of 3x3 matrix

Tags: None
(comma "," separated)
User avatar
dzenanz
Registered Member
Posts
35
Karma
0
OS

Rank of 3x3 matrix

Tue Jun 28, 2011 12:28 pm
Hi guys,

how can I calculate the rank of a symmetric 3x3 matrix with positive values on the diagonal? Also, can I get a rank as a byproduct of applying SelfAdjointEigenSolver?

Regards,
Dženan
matse
Registered Member
Posts
16
Karma
0
OS

Re: Rank of 3x3 matrix

Tue Jun 28, 2011 2:39 pm
I guess one method is described here
Documentation Chapter 6
matse
User avatar
dzenanz
Registered Member
Posts
35
Karma
0
OS

Re: Rank of 3x3 matrix

Tue Jun 28, 2011 2:56 pm
Chapter 6 docs say: "Rank-revealing decompositions offer at least a rank() method."
Also, this table: http://eigen.tuxfamily.org/dox/TopicLin ... tions.html
suggest that SelfAdjointEigenSolver is rank-revealing. But the following code:

Eigen::SelfAdjointEigenSolver<EigenMatrix3> es(myMatrix);
std::cout<<"Rank: "<<es.rank();

gives error C2039: 'rank' : is not a member of 'Eigen::SelfAdjointEigenSolver'

So, I guess I would have to use FullPivLU to calculate rank.
User avatar
dzenanz
Registered Member
Posts
35
Karma
0
OS

Re: Rank of 3x3 matrix  Topic is solved

Wed Jun 29, 2011 7:31 am
For anyone stumbling onto this thread later:
For hermitian matrices, number of non-zero eigenvalues=rank. So no need for extra FullPivLU decomposition


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]