# Numerically determine eigenvalues of real non-symmetric matrix known to have positive eigenvalues

I need to numerically determine eigenvalues of real non-symmetric matrix $$M$$ known to have real positive eigenvalues $$\lambda_i>0$$. I know this due to the overall problem I'm solving.

Problem is that the matrix has large dynamic range and it happens fairly often that I get some complex eigenvalues. I wonder if there is a way to use the information I know (only positive eigenvalues) before the eigenvalue solver, and then solve a related problem to "force" the eigenvalues to stay positive. For example I hoped that the symmetric part $$M_S=1/2\cdot(M+M^T)$$ and its eigenvalues would have some connection to the eigenvalues of $$M$$, but it seems that it doesn't.

Obviously I could move to higher precision numerical calculations, but this is again somewhat impractical.

Is there a way to solve this problem more cleverly?

• To me, it seems you are taking the problem the wrong way. If you have complex eigenvalues (by which I suppose you mean that the imaginary part is not negligible), then you should rather question the way you are constructing $M$ instead of trying to modify it to obtain the results you want. – nicomezi Oct 23 '18 at 9:08
• I don't disagree completely, but unfortunately I don't have a way to change my way of "constructing" $M$. And most of the time finding the eigenvalues works fine, but I need to ensure that they are real and positive for my whole algorithm to not completely fail. I don't mind if the eigenvalues have a somewhat larger error. And in general it's not uncommon to have some constraints in a numerical algorithm to prevent nonsensical results I would say. – oli Oct 23 '18 at 9:21
• Then you could try to perform an SVD on $MM^T$, which is a PSD matrix, then take the (positive) square root of singular values as your new eigenvalues. I cannot guarantee it will work fine though. – nicomezi Oct 23 '18 at 10:14
• Nice idea! Actually this was basically I was looking for. As you guessed it unfortunately doesn't work... Worth a shot though. Now I probably have to move to completely different approach where I don't encounter that issue. – oli Oct 23 '18 at 11:08
• Let me clarify: the complex eigenvalues you get, they are just numerical errors, correct? In other words, you are sure that for exact computations you would only get real positive values? – Yuriy S Oct 23 '18 at 14:21