On 7/19/07, David Roe <[EMAIL PROTECTED]> wrote:
> Hey all,
> Just a note for people working on linear algebra that eigenspaces for real
> matrices don't work:
>
> M = MatrixSpace(RR, 3,3)
> A = M([3,67,4,2,246,e,3,246,e+1])
> A.eigenspaces()
>
> returns
>  [
> (-0.218769859879233, [
>
> ]),
> (3.62798619883961, [
> (1.00000000000000, -1.51195385390357, 1.21729796888225)
> ]),
> (249.309065489499, [
>
> ])
> ]
> It's just subtracting off the root of the characteristic polynomial and
> taking the kernel, which often won't work when the field is inexact.

It's just using a generic algorithm, as you pointed out, which
doesn't work well in this case.  You might want to use RDF (double
precision) matrices, which are more sophisticated. There's an eigen
command, with slightly different semantics, which is very fast, etc.:

sage: M = MatrixSpace(RDF, 3,3)
sage: A = M([3,67,4,2,246,e,3,246,e+1])
sage: A.eigen()
([249.309065489, 3.62798619884, -0.218769859879],
 [    -0.19928006572    -0.939771584998    -0.773141774956]
[   -0.691128777474    0.0115860176681 -0.000721878392843]
[   -0.694714666863    -0.341606692301      0.63423282374])

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to