### Eigenvectors for Lop-Sided Matrices

In many physics problems we need eigenvectors and values for DC where D is diagonal and C is symmetric.

Let E = √D. ECE is symmetric. We use this to find x and λ such that ECEx = λx. Multiply on left by E.
EECEx = λEx
DCEx = λEx
(DC)(Ex) = λEx
Thus Ex is an eigenvector of DC and λ is its eigenvalue!

In abeyance:

Here is some C code where
void lev(int n, R C[n][n], R d[n], R eval[n], R g[n][n]);
is the prototype where d[j] is Djj. The n eigenvectors are placed in g and the eigenvalues go to eval. The two blocks that follow “if(1)” are respectively optional checks for

• symmetry of C
• that the routine eigen gets good answers.
We illustrate and test the code in the main routine where we adopt symmetric matrix c, an arbitrary d, and call lev to compute and place eigenvectors in vc and vl. We then compute DC as above and call evt to verify out eigenvectors and eigenvalues.

Routine void evt(int n, R m[n][n], R val[n], R vec[n][n]) checks that eigenvectors have been found. It has the same arguments as eigen except that all the arguments are inputs to evt.
Index j chooses which eigenvector to test.
Index y chooses which component of the eigenvector to compute.
Vector u is DCEx