1
$\begingroup$

I have a Fortran subroutine that calculates eigenvalues and eigenvectors of a symmetric $3 \times 3$ matrix. The eigenvector corresponding to an eigenvalue are calculated and then they are normalized dividing each component by the length. In the subroutine, when the calculated length is close to zero (i.e. it is lower than a specified tolerance) the eigenvector is set to $[1, 0, 0]$ or $[0,1,0]$ or $[0, 0, 1]$ if it corresponds to the first, the second or the third eigenvalue respectively. I cannot see the mathematical justification for that, can anyone clarify this?

$\endgroup$
  • $\begingroup$ What is the algorithm? Is it an iterative method? $\endgroup$ – Omnomnomnom Aug 21 '15 at 17:10
  • $\begingroup$ Nope, it is purely analytical. Eigenvalues are computed in closed form the matrix principal invariants, eigenvectors components are obtained by solving the homogenous system of linear equations and then normalized. Obviously, the solution of the system is trivial . $\endgroup$ – user2078621 Aug 21 '15 at 17:16
  • $\begingroup$ My best guess is that dividing by too small a length leads to some kind of division by zero or NaN situation. In order to avoid this, it's better to give an arbitrary result than to let the error occur. $\endgroup$ – Omnomnomnom Aug 21 '15 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.