# Only get the lowest Eingenvalue? [duplicate]

I have a huge sparse matrix and I want to have the smallest eigenvalue and its corresponding eingenvector. I use this code (a used a smaller matrix for the example):

A = {{1,0,0},{0,-2,0},{0,0,5}};
{val,vec}  = Eigensystem[A,-1];
Print[val];
Print[vec];


I want to have -2 and {0,1,0} as output, but instead I get the eigenvalue with the lowest magnitude, here 1 and {1,0,0}. Is there a way to get the eigenvalue with the lowest value?

• Surprisingly, the "Criteria" suboption seems to be completely ignored in the exact case... Mar 18, 2016 at 12:29
• @Henry Do you mean something like this {m = Min[val], vec[[Position[val, m][[1, 1]]]]} Mar 18, 2016 at 12:53
• First@Sort[Transpose[Eigensystem[A]]] Mar 18, 2016 at 14:00
• (1) Pick a value that is larger than the most negative eigenvalue (use whatever convenient bound). (2) Find the eigenvalue closest to its negative. I'll show this with 10 as my choice. In[1705]:= A = {{1, 0, 0}, {0, -2, 0}, {0, 0, 5}}; {val, vec} = Eigensystem[A + 10*IdentityMatrix[3], -1] + {-10, 0} Out[1706]= {{-2}, {{0, 1, 0}}} Mar 18, 2016 at 15:47
• Alternatively and maybe more reliably: In[1709]:= A = {{1, 0, 0}, {0, -2, 0}, {0, 0, 5}}; {val, vec} = Eigensystem[A - 10*IdentityMatrix[3], 1] + {10, 0} Out[1710]= {{-2}, {{0, 1, 0}}} (I'd figure out which is the better way to go about this, but I need more coffee...) Mar 18, 2016 at 15:50

A = {{1, 0, 0}, {0, -2, 0}, {0, 0, 5}};

myDesiredPosition = Position[Eigenvalues[A], Min[Eigenvalues[A]]];

Eigenvectors[A][[myDesiredPosition[[1]]]]