[R] highest eigenvalues of a matrix

baptiste Auguié ba208 at exeter.ac.uk
Thu Jun 19 09:29:43 CEST 2008


Hi,

On 18 Jun 2008, at 23:52, Moshe Olshansky wrote:

> Hi Baptiste,
>
> If the rank of your matrix is 3 than all the eigenvalues, except  
> for 3, are 0.

Good point! I obviously mixed up the rank of the matrix with the  
degeneracy (multiplicity) of its eigenvalues. What I meant is that  
out of 200 eigenvalues returned by eigen(), only 2 or 3 are  
noticeably different and these are the ones I am looking for. None  
are 0, which means the rank is 200. The high degeneracy comes from a  
very high symmetry in the particular problem, so most eigenvectors  
will describe the same state, I think.

Sorry for the confusion, I hope this makes sense now.

Baptiste


> How do you know that the rank is so low?
> If your matrix is A and it is of order N (NxN) and it's rank is 3  
> then there exist matrices B and C such that B is Nx3 and C is 3xN  
> and A = B*C (if A is symmetric then C = t(B)).
> Can you get that representation? If yes then any non-zero  
> eigenvector of A is a linear combination of columns of B and your  
> problem can be reduced to finding eigenvalues and eigenvectors of a  
> 3x3 matrix, which is trivial.
>
> Regards,
>
> Moshe.
>
> --- On Thu, 19/6/08, baptiste Auguié <ba208 at exeter.ac.uk> wrote:
>
>> From: baptiste Auguié <ba208 at exeter.ac.uk>
>> Subject: [R] highest eigenvalues of a matrix
>> To: "R Help" <r-help at stat.math.ethz.ch>
>> Received: Thursday, 19 June, 2008, 6:56 AM
>> DeaR list,
>>
>>
>> I happily use eigen() to compute the eigenvalues and
>> eigenvectors of
>> a fairly large matrix (200x200, say), but it seems
>> over-killed as its
>> rank is limited to typically 2 or 3. I sort of remember
>> being taught
>> that numerical techniques can find iteratively decreasing
>> eigenvalues
>> and corresponding orthogonal eigenvectors, which would
>> provide a nice
>> alternative (once I have the first 3, say, I stop the
>> search).
>>
>>
>> Looking at the R source code for eigen and some posts on
>> this list,
>> it seems that the function uses a LAPACK routine, but
>> obviously all
>> the options are not available through the R wrapper.
>> I'm not
>> experienced enough to try and make my own interface with
>> Fortran
>> code, so here are two questions:
>>
>> - is this option (choosing a desired number of
>> eigenvectors) already
>> implemented in some function / package that I missed?
>>
>> - is the "range of indices" option in DSYEVR.f
>> < http://
>> www.netlib.org/lapack/double/dsyevr.f > what I think,
>> the indices of
>> the desired eigenvalues ordered from the highest to lowest?
>>
>> Many thanks in advance for any piece of advice,
>>
>> Sincerely,
>>
>> Baptiste
>>
>> dummy example if needed:
>>
>> test <- matrix(c(1, 2, 0, 4, 5, 6, 1.00001, 2, 0),
>> ncol=3)
>> eigen(test)
>>
>>
>>
>>
>> _____________________________
>>
>> Baptiste Auguié
>>
>> Physics Department
>> University of Exeter
>> Stocker Road,
>> Exeter, Devon,
>> EX4 4QL, UK
>>
>> Phone: +44 1392 264187
>>
>> http://newton.ex.ac.uk/research/emag
>> http://projects.ex.ac.uk/atto
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained,
>> reproducible code.

_____________________________

Baptiste Auguié

Physics Department
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag
http://projects.ex.ac.uk/atto



More information about the R-help mailing list