# Computing eigenpairs of singular matrix with ZGEEV?

I've never run into a singular matrix before, so bear with me.

I have a complex non-symmetric matrix (about 1000 x 1000) that I know has a couple zero eigenvalues. It isn't guaranteed to be diagonalizable, but when I pass it to ZGEEV, I see no apparent problems. I use all the eigenpairs for later analysis, but I am unsure if I am 'allowed' to do this.

Can I trust the results of ZGEEV for computing the eigenvalues and eigenvectors when my matrix is singular, or is there a better way to compute these eigenpairs?

As far as I can tell, the eigenvectors are not the trivial solutions. Is ZGEEV actually stable for computing Ax = 0?

• What do you mean with "the eigenvectors are not the trivial solutions" and "is ZGEEV actually stable for computing Ax=0"? Also, note that "has zero eigenvalues" $\neq$ "is not diagonalizable". – Federico Poloni Dec 24 '14 at 20:55
• @FedericoPoloni I mean that Ax=0 for x $\neq$ 0. By stability, I mean can I trust the results of the diagonalization of my matrix with ZGEEV (not sure if there are some nuances I need to worry about). Fair point with the last comment. I will update my question. – jjgoings Dec 24 '14 at 21:02

In any case, one of the issues you will encounter is that eigenvalues that are $0$ in theory are perturbed in practice to small nonzero values such as $10^{-15}$. You will need to set a threshold to tell what is "zero" and what is not. There are no silver-bullet solutions to choose it; in many cases it depends on the matrix size and on the amount of noise that you are expecting to find in your data. This is an intrinsic difficulty, because computing ranks and kernels is a "is this value zero or not" problem, and this kind of problem is inherently non-continuous.
Singularity of the matrix $A$ is required to obtain nontrivial solutions of $Ax=0$. Using a singular matrix with zgeev should be safe.
To solve the homogeneous system, you can use zgeev to compute the right eigenvectors $v$ which correspond to the zero eigenvalues of $A$, since $$Av_j=\lambda_j v_j\text{ .}$$