Martin Albrecht <[EMAIL PROTECTED]> writes:

> On Tuesday 14 October 2008, sonium wrote:
> > ((a, b, 0, 0),
> > (b,-a,b,0),
> > (0,b,a,b),
> > (0,0,b,-a))
> 
> Hi, try this:
> 
> sage: A.echelon_form() # row_reduction by constant entries only

> sage: A.echelon_form('frac') # over the fraction field

> sage: A.echelon_form('bareiss') # fraction free

I thought the original author wanted to find the diagonalised matrix?  I.e.,
the eigenvalues on the diagonal.  Did I misunderstand?

sage: A= matrix(SR,4,4,((a, b, 0, 0),(b,-a,b,0),(0,b,a,b),(0,0,b,-a)))
sage: A.parent()
Full MatrixSpace of 4 by 4 dense matrices over Symbolic Ring
sage: A.eigenvalues()

[-sqrt(sqrt(5)*b^2 + 3*b^2 + 2*a^2)/sqrt(2),
 sqrt(sqrt(5)*b^2 + 3*b^2 + 2*a^2)/sqrt(2),
 -sqrt(-sqrt(5)*b^2 + 3*b^2 + 2*a^2)/sqrt(2),
 sqrt(-sqrt(5)*b^2 + 3*b^2 + 2*a^2)/sqrt(2)]
sage: A.jordan_form()

[-sqrt(2*x^2 + sqrt(5)*b^2 - 3*b^2)/sqrt(2)|
0|                                         0|
0]
[------------------------------------------+------------------------------------------+------------------------------------------+------------------------------------------]
[                                         0| sqrt(2*x^2 + sqrt(5)*b^2 -
3*b^2)/sqrt(2)|                                         0|
0]
[------------------------------------------+------------------------------------------+------------------------------------------+------------------------------------------]
[                                         0|
0|-sqrt(2*x^2 - sqrt(5)*b^2 - 3*b^2)/sqrt(2)|
0]
[------------------------------------------+------------------------------------------+------------------------------------------+------------------------------------------]
[                                         0|
0|                                         0| sqrt(2*x^2 - sqrt(5)*b^2 -
3*b^2)/sqrt(2)]

Martin


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to