I have to deal with very large matrices in Mathematica (dimensions $10^4\times10^4$ at least). Obtaining the eigenvalues of these matrices is not so difficult since, it is not memory intensive or particularly slow. Finding the eigenvectors is not slow either, but it is particularly memory intensive, since Mathematica first finds and stores all the eigenvectors and then allows for manipulations using them.

What I would like to do is compute a function that depends on the eigenvectors and eigenvalues, but without dealing with the memory requirements.

Is there any good way within Mathematica where I can compute the eigenvectors one by one , use them to compute the function and then throw them away? I was unable to spot anything within the documentation, but if there is something in there that I missed, it would be nice if someone could point it out.

  • 1
    $\begingroup$ If you want specific eigenvectors Arnoldi methods would seem to be the best bet, but it could be expensive to have to go through all ~10k of them... Maybe the FEAST method Mathematica provides if you know what ranges they'll fall in? It'd definitely be cool to have some kind of eigenvector iterator though that uses ARPACK to successively get eigenvectors... $\endgroup$ – b3m2a1 Aug 28 '19 at 2:59
  • $\begingroup$ I don't know any information about them, and I need all of them, because the function depends on all of them. I posted this because Mathematica lacks this very basic coding functionality within an arms reach, so I would love to see any solution that gives me access to the flow of Eigensystem or else. $\endgroup$ – DinosaurEgg Aug 28 '19 at 3:03
  • 1
    $\begingroup$ Hm. Is the matrix sparse? Is it symmetric? $\endgroup$ – Henrik Schumacher Aug 28 '19 at 3:07
  • $\begingroup$ If you're willing to get them in chunks you could also write something somewhat clever that gets the first 100, uses that as a shift for Arnoldi, gets the next hundred, etc. By doing it in chunks of ~100 you'll be faster but still be fine on memory. $\endgroup$ – b3m2a1 Aug 28 '19 at 3:18
  • $\begingroup$ @HenrikSchumacher the matrix is sparse and symmetric indeed. In this case the trick above should be sufficient if I find a way to implement it. Still curious to see if anyone else has a less roundabout answer. $\endgroup$ – DinosaurEgg Aug 28 '19 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.