# how can I numerically calculate all eigenvectors of a $n \times n$ complex tridiagonal matrix?

I have tried matlab eig command, it results true eigenvalues but wrong eigenvectors. I also tried direct iteration with rayleigh qotient which is better but doesn't give all eigenvectors also I have tried QR method which gives eigenvalues but not eigenvectors is there any algorithm that i can use to find eigenvalues and corresponding eigenvectors?

• How "wrong" were the eigenvectors returned from Matlab's eig? If they were just imprecise, you could use the corresponding eigenvalues and the Inverse Iteration Method to refine them. – Pedro Aug 18 '13 at 12:52
• How big is $n$? Are you sure that you need all the eigenvalues and vectors? What underlying problem does your matrix come from? People will be better able to answer your question if you enhance it with this information. – Bill Barth Aug 18 '13 at 13:02
• In what sense are the eigenvectors returned by eig wrong? Is $\| Ax - \lambda x \|$ large? Is there something else about the eigenvectors that you don't like? Can you give us a specific example of this behavior so that we can reproduce the problem? – Brian Borchers Aug 18 '13 at 13:45

MATLAB's eig() function normalizes the eigenvectors to have unit norm; it doesn't normalize the eigenvalues. You can check the norm of the vectors to verify their correctness. Remember, if $\bf x$ is an eigenvector of $A$, then so is $c\,\bf x$.

You can "turn off" the normalization by using

[v,d] = eig(A,'nobalance')


but this also disables preconditioning and may give less accurate results.

• I'm often annoyed by the "wrong" choice of signs even for real eigenvectors (wrong = not what I want aesthetically), and of course normalizing what might well be complex-valued eigenvectors is further fraught with surprise. – hardmath Aug 18 '13 at 15:40

"Wrong" eigenvectors is a poor problem statement in terms of how it helps us to help you. Are they merely of the wrong sign? Since the sign is arbitrary, that is impossible to control, but you can easily flip the signs if you don't like them.

One not uncommon convention is to always force the sign of the first non-zero element to be positive, but that too can be sometimes an issue if the first element were very near zero. How close is close enough?

Are there replicated eigenvalues? If so, then the eigenvectors for that set of replicated eigenvalues are not unique. You can essentially rotate the eigenvectors that span that subspace arbitrarily and they will still be equally valid eigenvectors.

So unless you give us more help as to why eig produced the "incorrect" eigenvectors, we can at best guess at the real problem.