# [Maxima] eigenvector problems for 3x3 matrices in floating point

S. Newhouse sen1 at math.msu.edu
Mon Dec 3 17:31:54 CST 2007

```Hello,
I noticed some problems with finding eigenvectors for 3x3 matrices.  In
the following, f(b) gives the eigenvectors of a 3x3 matrix which depends
on the real parameter b.

It works symbolically with b=101/100, but not with b=1.01.
I know one can rationalize the matrix first, but why is it necessary?

Any ideas will be appreciated.

TIA,
-sen

--------------------------------------------------------------------

Consider the following:
(%i106) build_info();

Maxima version: 5.13.0
Maxima build date: 0:28 12/3/2007
host type: i686-pc-linux-gnu
lisp-implementation-type: SBCL
lisp-implementation-version: 1.0.9

(%i107) dispfun(f);
1
(%t107) f(b) := eigenvectors(matrix([- 1, 1, 0], [1, - 1, - b], [b, b, -]))
3

(%o107)                             [%t107]
(%i108) f(1);
sqrt(35) %i - 1  sqrt(35) %i + 1
(%o108) [[[- ---------------, ---------------, - 2], [1, 1, 1]],
6                6
sqrt(35) %i - 7  7 sqrt(5) sqrt(7) %i + 11
[1, - ---------------, -------------------------],
6                    18
sqrt(35) %i + 7    7 sqrt(5) sqrt(7) %i - 11
[1, ---------------, - -------------------------], [1, - 1, 0]]
6                      18

This is OK, but

(%i109) f(1.01);

algsys failure: the eigenvector(s) for the 1 th eigenvalue will be missing.

algsys failure: the eigenvector(s) for the 2 th eigenvalue will be missing.

algsys failure: the eigenvector(s) for the 3 th eigenvalue will be missing.

(%i111) f(101/100);
sqrt(89309) %i - 50  sqrt(89309) %i + 50
(%o111) [[[- -------------------, -------------------, - 2], [1, 1, 1]],
300                  300
sqrt(89309) %i - 350  700 sqrt(11) sqrt(23) sqrt(353) %i + 56809
[1, - --------------------, ------------------------------------------],
300                             90900
sqrt(89309) %i + 350    700 sqrt(11) sqrt(23) sqrt(353) %i - 56809
[1, --------------------, - ------------------------------------------],
300                               90900
[1, - 1, 0]]

```