On Jun 23, 4:37 am, Dima Pasechnik <[email protected]> wrote:
> Don't they at least know about complex numbers?!
> Or are we talking about some dark ages situation when complex numbers
> were considered
> a heresy? :–)
> I don't thing Sage should suffer from bad decisions made by designers
> of stupidifying curricula...

Hi Dima,

No, I'm not talking about banning the complex numbers, or ignoring
them, or restricting eigenvalues to the reals.  Perhaps the opposite
in some sense - I want to see complex numbers, not some notion of
Galois conjugates over QQ.  And when it comes to whether or not to
leave the base field, I do not really have a dog in that race -
probably just more interested in a consistent approach, which perhaps
is a pipe dream.

Here is the root problem in my view - the output/format of eigenspaces
when characteristic polynomials have non-trivial irreducible factors
over QQ.  This is the second random matrix over ZZ that I got back
(the first had a linear factor):

sage: B = matrix(ZZ, [[-87, -1, 1], [17, 2, -6], [-1, -2, 7]])
sage: B.eigenspaces_right()
[
(a0, Vector space of degree 3 and dimension 1 over Number Field in a0
with defining polynomial x^3 + 78*x^2 - 763*x + 93
User basis matrix:
[                         1 1/9*a0^2 + 74/9*a0 - 371/3 1/9*a0^2 +
83/9*a0 - 110/3])
]

To my eye, that is incomprehensible (or worse, extremely misleading)
to a second-year undergraduate taking their first post-calculus
algebra course.  What is a0?  Why just one eigenspace (when in truth
there are 3)? Where are the 3 eigenvalues I expect? I want to see
eigenvalues and eigenvectors that a student, engineer or scientist
will recognize, and they would likely be complex numbers in a larger
example.

This is more like what I would like to see from Sage in this setting,
as KDC has shown:

sage: B.change_ring(QQbar).eigenspaces_right()
[
(8.67897278866459?, Vector space of degree 3 and dimension 1 over
Algebraic Field
User basis matrix:
[ 1.000000000000000? -43.93682721916003?  51.74214556950456?]),
(0.12344763849958892?, Vector space of degree 3 and dimension 1 over
Algebraic Field
User basis matrix:
[ 1.000000000000000? -122.6499594923977? -35.52651185389811?]),
(-86.80242042716417?, Vector space of degree 3 and dimension 1 over
Algebraic Field
User basis matrix:
[   1.000000000000000?  -0.1909910662200515? 0.006588506615773059?])
]

since, for example:

sage: B.change_ring(RDF).eigenmatrix_right()
(
[-86.8024204272              0              0]
[             0  8.67897278866              0]
[             0              0   0.1234476385],

[  -0.982224919531   -0.014730281408 -0.00783112834928]
[   0.187596184649    0.647201829113    0.960487574819]
[ -0.0064713953805   -0.762176364893     0.27821267413]
)

As Jason has noted, the first example has output that is very
interesting "mathematically."  I agree entirely.  And I'd like to
preserve that view.  So to make the discussion more concrete, a
precise

Proposal:  For matrices over QQ (or implicitly ZZ) with eigenvalues
outside QQ, make the default output like the second example above,
while retaining the current output as optional behavior via a keyword.

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to