Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to diagonalize a certain 2 x 2 matrix, but Mathematica refuses to find the eigenvectors. In particular, when I input

Eigenvectors[{{1.8741*10^7 + 1.40161*10^6 B, 2.79374*10^7}, 
              {2.79374*10^7, -3.1235*10^7 - 1.40161*10^6 B}}]

(B is a parameter). I receive the error

Eigenvectors::eivec0: Unable to find all eigenvectors

and the bogus output

{{0, 0}, {0, 0}}

On the other hand, Mathematica has no problem with the eigenvalues, for some reason. Can someone help me figure out what's going on here?

share|improve this question
Eigenvectors[{{18741000 + 1401610 B, 27937400}, {27937400, -31235000 - 1401610 B}}]. First section of the doumentation... – ciao Apr 7 '14 at 8:15
@rasher Where is it written that Power shoudln't be used with Eigenvectors? – Öskå Apr 7 '14 at 9:41
@Öskå: First item, details (at least for v9 docs): "Eigenvectors finds numerical eigenvectors if m contains approximate real or complex numbers. " - does't like mix of symbolic & inexact. – ciao Apr 7 '14 at 9:50
I guess I'm not good enough in English to understand that it doesn't like the mix :) – Öskå Apr 7 '14 at 9:57
@Öskå It's a NKE (a New Kind of English) – Dr. belisarius Apr 7 '14 at 11:43
up vote 1 down vote accepted

Although the documentation could be clearer on this point, Eigenvectors doesn't like to work symbolically on a matrix containing elements with approximate numbers. The solution is to Rationalize the matrix.

data = {{1.8741*10^7 + 1.40161*10^6 B, 2.79374*10^7}, 
        {2.79374*10^7, -3.1235*10^7 - 1.40161*10^6 B}};
Eigenvectors[Rationalize[data]] // Column


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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