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: P.<a,b> = PolynomialRing(QQ)
sage: matrix(P,4,4,((a, b, 0, 0),
....: (b,-a,b,0),
....: (0,b,a,b),
....: (0,0,b,-a)))
[ a b 0 0]
[ b -a b 0]
[ 0 b a b]
[ 0 0 b -a]
sage: A.echelon_form() # row_reduction by constant entries only
[ a b 0 0]
[ b -a b 0]
[ 0 b a b]
[ 0 0 b -a]
sage: A.echelon_form?
sage: A.echelon_form('frac') # over the fraction field
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
sage: A.echelon_form('bareiss') # fraction free
[ b -a 0 0]
[ 0 a*b b^2 -a*b]
[ 0 0 -a^2*b - b^3 a^3 + 2*a*b^2]
[ 0 0 0 -a^4 - 3*a^2*b^2 - b^4]
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---