Message Boards Message Boards


Weird problem with eigenvalues of large matrices

Posted 9 years ago
6 Replies
2 Total Likes
Hello to all of you.

I would like to tell you about this weird problem I'm having when opperating with matrices  in mathematica.
I want to calculate the eigenssystem of a matrix which has seemingly not too high dimensions (729x729). The matrix is a quite good one (e.g. with many differnt symmetres such as SU(2);  Z(3) within 2 blocks etc.), but it seems that it takes forever to do that, at least more then 5-min (I did not wait that long). I fed the (NUMERICAl) matix directly to the function "Eigenvalues". On the other hand I found on the web an example kkkk = 1000;Timing[Eigenvalues[RandomReal[{0, 1}, {kkkk, kkkk}]]][[1]] -> 1.03 which is done very fast (I checked  that). 
So it would be  really helpful  if you could tell me: whats the problem here that with a matix which has no symmetries whatsoever the calculation is done in a moment, while a "better one is" just killing the computer? Does Mathematica have any  preferences regarding to exactly what kind of matrices should be fed in? 
Thank you in addvance and I'm sorry if it was an obvious one and just wasted your timeemoticon
POSTED BY: Vahagn Abgaryan
6 Replies
@Abgaryan, it looks like the Det is zero.
POSTED BY: Shenghui Yang
Thank you, my mistake, in that particular case it is. But i don't think that it was going to mess with eigenvalue calculations, because you do not engage in inverted matrix consideration when obtaining the eigenvalues (or does the internal algorithm somehow engage?)
POSTED BY: Vahagn Abgaryan
Doing an exact, symbolic computation is indeed going to be slow. To see why, take a look at the expressions returned from

Eigenvalues[RandomInteger[1, {100, 100}]]

If one is only interested in the Eigenvalues as numbers, Eigenvalues[N[ A]] should be much faster.
POSTED BY: Ilian Gachevski
Thank you llian it really worked and much faster than i could imagine!
POSTED BY: Vahagn Abgaryan
Are all the numbers in the matrix exact? If so, you could try Eigenvalues[N[ mat]]. If not, could you perhaps attach a notebook with the matrix to your post.
POSTED BY: Ilian Gachevski
Yes all the elements are either 0-s or 1-s. The matrix is not singular that's for sure. I uploaded  an example of matrix.
POSTED BY: Vahagn Abgaryan
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract