# How to make LAPACK eigenvectors orthogonal like Matlab?

I'm using LAPACK zgeev to calculate eigenvectors of a symmetric complex matrix of high dimensions ($n \approx 2000$). I need these eigenvectors to satisfy

$$\sum_{m=1}^{n} \frac{\lvert m \rangle \langle \overline m \lvert}{\langle \overline m\lvert m \rangle} = I_n$$

Where $\lvert m\rangle$ is an eigenvector and $\langle \overline m\lvert$ is the same eigenvector transposed (Attention: Not conjugated) and $I_n$ is the identity matrix of size $n$.

I don't know if all symmetric complex matrices satisfy this but this matrix has specific structure and it always should:

$n=6$ (Algorithm to generate these matrices are way too complicated to share, But I think one can get their pattern from these two examples)

$n=9$ But the eigenvectors I get from zgeev do not follow the equation I mentioned and they are not orthogonal.

I have tested these matrices in Matlab and eigenvectors generated by Matlab satisfy this condition AND are orthogonal. (i.e $\langle m_i\lvert \overline m_j \rangle=\delta_{ij}$)

How can I get the same eigenvectors from LAPACK zgeev?

• Your new comment about using a non-conjugated inner product is interesting. Like mentioned before, distinct eigenvectors of a complex-symmetric matrix are not orthogonal ($v_i^Hv_j\ne0$) in general, but they do satisfy ($v_i^Tv_j=0$). I would expect LAPACK's output to uphold this property. Are you possibly computing the inner product differently between your matlab test and your LAPACK test? For instance, inadvertently conjugating the LAPACK one? To check your property (which is not orthogonality, I wouldn't call it that) you'd want to use ZDOTU, not ZDOTC. Aug 2 '17 at 13:14
• Are the non-orthogonal eigenvectors associated with eigenvalues that are (nearly) equal? Aug 3 '17 at 13:35