Hi.
I have some problems when trying to diagonalize a complex(dp) symmetric matrix. I have a strong belief that it might be due to machine precision, since there seems to be a difference of about 17 orders of magnitude between the largest and smallest eigenvalues. If that is the case, please let me know, and stop reading! If not, you can check the entire problem below:
My approach to the problem was to take the adjoint, combine it with the original to get a hermitian matrix, and diagonalize it using zheev. Usually, as a check, I diagonalize it twice, once with the 'U' option and once with the 'L' option. On all cases I just find the eigenvalues (actually, the square of the eigenvalues I am interested in, and these squares are the ones that are 17 orders of magnitude apart).
Anyway, with this particular matrix I am working on, I get different eigenvalues with the 'U' and 'L option. The largest one was the same for both cases, but the others didn't match up to about one order of magnitude.
Trying to simplify the problem, I turned off all imaginary components, and made real copies of this hermitian matrix. This time, since it was a real matrix, I used dsyev. Again, I had differences with the 'U' and 'L' option, but interestingly enough, the 'U' options using zheev matched the one with dsyev. Likewise for 'L'.
Then I realized that I could use zgeev for this, with the original symmetric matrix. I did, and got a set of eigenvectors that, when squared, matched the 'U' option of zheev and dsyev.
Finally, with real copies of my original symmetric matrix, I used dsyev to calculate the eigenvector directly, and got again the 'U' result, in both 'U' and 'L' cases. It seemed then that the 'U' option was the right one, but still felt uncomfortable with the other results.
(I also checked the whole thing asking for the eigenvectors, and got the same results).
Anyway, after all of these checks, NOW I am sure that the 'U' option for zheev is the right one. But unfortunately this is only one case, and I am unsure of what can happen when turning on the imaginary parts.
I hope you can advise me on this matter. I suppose that it is a machine precision problem and that I should use zgeev, but I am quite unsure if this is the proper way to proceed.
I can post the relevant part of the code if you'd like.
Many thanks,
Joel

