Performance of eig for Hessenberg matrices

1 view (last 30 days)
Bernd
Bernd on 28 Aug 2014
Edited: Matt J on 29 Aug 2014
According to what I read, Matlab uses an algorithm for calculating eigenvalues, that first transforms a given matrix to Hessenberg form and then uses QR-iterations. So the calculation should be quicker for a matrix, that is already in Hessenberg form. In particular the page MathWorks states:
"This matrix has the same eigenvalues as the original, but less computation is needed to reveal them."
In a simple Script however
M1 = rand(1000);
M2 = hess(M1);
tic; eig(M1); toc
tic; eig(M2); toc
the calculation of eigenvalues from the Hessenberg matrix regularly takes way longer then the corresponding calculation for the original matrix. What did I not understand here?
For my actual problem I have to retrieve eigenvalues and -vectors from big Hessenberg matrices (or generalized Hessenberg matrices). What would be the fastest approach within matlab?
Thanks for Your time.
EDIT: incorrect link
  3 Comments
Bernd
Bernd on 28 Aug 2014
No. Just messed up the link. Should be fixed now.
Matt J
Matt J on 29 Aug 2014
Edited: Matt J on 29 Aug 2014
The repaired link is to the documentation on the hess command. It doesn't confirm that eig makes use of transformation to Hessenberg form, like you supposed at the beginning of your post. Since the documentation for eig doesn't say anything about this, I wonder if it's true.

Sign in to comment.

Answers (0)

Categories

Find more on Linear Algebra in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!