# How to correctly calculate symbolic eigenvectors

I give a minimalistic example of my problem:

I have a matrix:

m[a_,b_]:={{0,-a+b},{b,0}};


I define the eigenvectors as:

e[a_,b_]:=Eigenvectors[m[a,b],Cubics\[Rule]True,Quartics\[Rule]True]


and get the result

e[a_,b_]= {{-(Sqrt[b (-a + b)]/b), 1}, {Sqrt[b (-a + b)]/b, 1}}


If I calculate e[a,0] I get

e[a,0]={{1, 0}, {0, 0}}


but if I store the symbolic equation for the eigenvectors, speaking

f[a_,b_]={{-(Sqrt[b (-a + b)]/b), 1}, {Sqrt[b (-a + b)]/b, 1}}


and try to calculate f[a,0] I get the "intermediate" result cause the algorithm tries to divide by 0.

How can I get the symbolic output of eigenvectors to give the correct result?

• Your matrix becomes similar to a Jordan block for $b=0$. Eigenvectors[] does not automatically assume a symbolic matrix is defective. – J. M.'s technical difficulties May 27 '16 at 18:42
• How can i add this exeption to get an global solution? – MathNut May 27 '16 at 18:49
• A strategy similar to the one done here would work. – J. M.'s technical difficulties May 27 '16 at 18:52
• I read the comment but i dont understand how this solves my problem. – MathNut May 27 '16 at 19:45
• I have an symbolic expression for the eigenvectors and want to get the right result replacing the variables a and b by the values for every case of a and b – MathNut May 27 '16 at 19:46

• Huh? That eigenvector corresponds to an eigenvalue of $0$. What you might have meant is that an arbitrary vector could have been assigned as the eigenvector corresponding to the zero eigenvalue. – J. M.'s technical difficulties May 30 '16 at 8:16