# Can't find the eigenvectors of a simple 2x2 matrix

Bug introduced in 8.0 or earlier and fixed in 10.3.0

Why can't Mathematica find the eigenvectors of this matrix?

Eigenvectors[{{Cos[0. + x], Exp[I x]}, {1, 0}}]

Eigenvectors::eivec0: Unable to find all eigenvectors. >>
{{0, 0}, {0, 0}}

If I get rid of the (0. +) in the cosine, it works fine.

• What version of MMA are you currently using? – MarcoB Jul 20 '15 at 3:00
• Version 10.0.2.0, running on Mac OS X x86 – tparker Jul 20 '15 at 3:29
• V10.1 has this problem, too. Running on OS X 10.10.2. Eigenvectors[{{Cos[0. + x], Exp[I x]}, {1, 0}} // Simplify] works – m_goldberg Jul 20 '15 at 3:51
• Yeah, the Simplify inside the Eigenvectors just gets rid of the (0. +) in the Cos, which as I mentioned in the OP fixes the problem. But obviously not always practical to Simplify if the expression's hugely complicated. Looks like a Mathematica bug, I'll report it. – tparker Jul 20 '15 at 4:34
• Try a ZeroTest -> PossibleZeroQ for a workaround. – ilian Jul 20 '15 at 4:43

$Version (* "10.3.0 for Mac OS X x86 (64-bit) (October 9, 2015)" *) Eigenvectors[{{Cos[0. + x], Exp[I x]}, {1, 0}}] (* {{-0.5 (-Cos[0. + x] + Sqrt[4 E^(I x) + Cos[0. + x]^2]), 1.}, {-0.5 (-Cos[0. + x] - Sqrt[4 E^(I x) + Cos[0. + x]^2]), 1.}} *) Simplify@Eigenvectors[{{Cos[0. + x], Exp[I x]}, {1, 0}}]$\left( \begin{array}{cc} e^{-1. i x} \left(-0.25 \sqrt{1.+2. e^{2 i x}+16. e^{3 i x}+e^{4 i x}}+0.25 e^{2. i x}+0.25\right) & 1. \\ 0.25 e^{-1. i x} \left(\sqrt{1.+2. e^{2 i x}+16. e^{3 i x}+e^{4 i x}}+e^{2. i x}+1.\right) & 1. \end{array} \right)$• David, I get the same result as the OP with your expression. The Simplify does nothing at all for me, as Eigenvectors returns an error. I am on MMA v. 10.2; what version are you on? I wonder if this is some recently introduce bug with the numerical methods to calculate eigenvectors. – MarcoB Jul 20 '15 at 2:59 • I'm on my home machine, v. 7.0.$\left( \begin{array}{cc} \frac{1}{4} e^{-i x} \left(-\sqrt{1+2 e^{2 i x}+16 e^{3 i x}+e^{4 i x}}+e^{2 i x}+1\right) & 1 \\ \frac{1}{4} e^{-i x} \left(\sqrt{1+2 e^{2 i x}+16 e^{3 i x}+e^{4 i x}}+e^{2 i x}+1\right) & 1 \end{array} \right)$– David G. Stork Jul 20 '15 at 3:01 • I'm surprised that you get the exact$1/4\$ values in the result if you used a finite-precision 0. in the argument of Cos. – MarcoB Jul 20 '15 at 3:05