# [Maxima] Documentation Bug in eigenvectors()?

Barton Willis willisb at unk.edu
Tue Feb 19 18:43:42 CST 2008

```Our documentation says:

"The calculated eigenvectors and the unit eigenvectors of the matrix are
the right
eigenvectors and the right unit eigenvectors respectively"

It takes the will to read right out of me -- I don't think this quote
says that all the calculated eigenvectors are unit vectors, does it?

Shameless plug --- my favorite way to find eigenvectors:

(%i48) algebraic : true\$

(%i49) m : matrix([25,7],[7,-25]);
(%o49) matrix([25,7],[7,-25])

(%i50) mm : ptriangularize(m - z * identfor(m),z);
(%o50) matrix([7,-z-25],[0,674/7-z^2/7])

Use tellrat to declare 674/7-z^2/7 --> 0

(%i51) tellrat(mm[2,2]);
(%o51) [z^2-674]

Find the eigenpace:

(%i52) nullspace(mm);
(%o52) span(matrix([z+25],[7]))

Let's check:

(%i53) ratsimp(mm . first(%));
(%o53) matrix([0],[0])

One more:

(%i54) untellrat(z);
(%o54) []
(%i55) m : matrix([1,2,3],[4,5,6],[7,8,9])\$
(%i56) mm : ptriangularize(m - z * identfor(m),z);
(%o56) matrix([4,5-z,6],[0,66
/49,-z^2/7+(102*z)/49+132/49],[0,0,(49*z^3)/264-(245*z^2)/88-(147*z)/44])

(%i57) tellrat(%[3,3])\$

(%i58) nullspace(mm);
(%o58)
span(matrix([-1568*z^2+24696*z+12936],[1372*z^2-19992*z-25872],[12936]))

Again, let's check:

(%i59) ratsimp(mm . first(%));
(%o59) matrix([0],[0],[0])

Barton

-----maxima-bounces at math.utexas.edu wrote: -----

>To: Maxima List <Maxima at math.utexas.edu>
>From: Rob Frohne <frohro at wallawalla.edu>
>Sent by: maxima-bounces at math.utexas.edu
>Date: 02/19/2008 05:56PM
>Subject: [Maxima] Documentation Bug in eigenvectors()?
>
>Hi,
>
>The documentation claims that the eigenvectors returned are unit
>eigenvectors (which seems to me that they should be unit length), but
>the first entry is 1, and the others aren't zero on the matrix I tried.
>Here is my output.
>
>(%i1) matrix(
> [25,7],
> [7,-25]
>);
>(%o1) matrix([25,7],[7,-25])
>(%i2) eigenvectors(%);
>(%o2)
>[[[-sqrt(674),sqrt(674)],[1,1]],[1,-(sqrt(674)+25)/7],[1,(sqrt(674)-25)/7]
>]
>(%i3)
>
>Is this a bug?
>
>Best regards,
>
>Rob
>--
>Rob Frohne <frohro at wallawalla.edu>
>Walla Walla University
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
```