I have a question regarding the same as Problem with Eigenvectors when given a matrix containing approximate numbers and symbols
Why won't Mathematica obtain eigenvectors for this symmetric matrix?

I saw these well written answers but I couldn't seem to get my answer from there, I don't know why.

I am trying to find the eigenvalues of this matrix:

mat[k_]={{-1. (1/2 E^((0. - 1.1708 I) + I k) - 1/2 E^((0. + 1.1708 I) + I k)),
   0. - 0.389418 I, 0}, {0, 0, 
  0. - 1. I}, {-0.389418, (0. - 
     1. I) (1/2 E^((0. - 1.1708 I) - I k) - 
     1/2 E^((0. + 1.1708 I) - I k)), 0}};

Eigenvectors::eivec0: Unable to find all eigenvectors.

Even though, the equations are cubic, I am not getting the solution.

Version: 11.1.1 for Linux x86 (64-bit) (April 18, 2017)

  • 1
    $\begingroup$ It seems to work with Eigenvectors[mat[k], Cubics -> True] $\endgroup$ Commented Nov 21, 2017 at 13:46
  • $\begingroup$ Thanks @nikie. Are these eigenvectors exact? $\endgroup$
    – L.K.
    Commented Nov 21, 2017 at 13:57
  • $\begingroup$ As far as I understand the documentation, the eigenvectors are exact using exact algebra, but if you evaluate them using machine precision, you might get numerical errors. I.e. larger errors than using Eigenvectors[some numerical matrix] $\endgroup$ Commented Nov 21, 2017 at 14:25

1 Answer 1


With a bit of simplification it works.

The main two steps i added are Rationalize to make the matrix purely symbolic, which is good if we want the result to be fully symbolic as well and ExpToTrig, which simplifies the expressions in general, making the Eigenvectors computation faster. Notice that //MatrixForm is outside the (mat=...) Set call because it's just for display purposes and shouldn't be part of the mat expression.

(mat = {{-1. (1/2 E^((0. - 1.1708 I) + I k) - 1/2 E^((0. + 1.1708 I) + I k)), 0. - 0.389418 I, 0},
        {0, 0, 0. - 1. I},
        {-0.389418, (0. -  1. I) (1/2 E^((0. - 1.1708 I) - I k) - 1/2 E^((0. + 1.1708 I) - I k)), 0}
       } //Rationalize //ExpToTrig //FullSimplify) // MatrixForm




which gives the eigenvectors in terms of Root objects. If you like explicit algebraic expressions, you can add the Cubics->True option to the call to Eigenvectors like @nikie suggested.

  • $\begingroup$ Thanks for the answer @Thies. Just the same question(sorry for repetition), are these eigenvectors exact, when using Cubics -> True? $\endgroup$
    – L.K.
    Commented Nov 21, 2017 at 14:12
  • 1
    $\begingroup$ @L.K. Yes, in both cases they are exact. The Root[] representation is just more compact and more general than the explicit algebraic Cubics, but they are both exact symbolic representations. The only inaccuracy comes from the floating point input data, e.g. -1.1708. If you can replace those floating point constants with symbolic expressions, that would be even better. $\endgroup$ Commented Nov 21, 2017 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.