David Joyner wrote: > sage: R.<a> = PolynomialRing(QQ,"a") > sage: A=matrix([[0,1,1],[2,2,-2],[-1,a,3]]) > sage: A.echelon_form() > > [ 2 2 -2] > [ 0 -1 -1] > [ 0 0 -a + 1] >
Note that your answer and my answer both suffer from not getting the matrix into "true" row-reduced echelon form (the 1,1 entry is not 1). We both are doing something slightly different than what Matt asked for, in that we are calculating the echelon_form over a ring, not a field. I wonder how hard it would be to actually do what was asked, e.g., don't assume you can divide by the variable, but do assume that you can divide by 2 so that the 1,1 entry is 1. Hmmm, but PolynomialRing(QQ,"a") has the element 1/2 in it. How come the first row was not scaled by 1/2 so that the 1,1 entry became 1? Jason -- Jason Grout --~--~---------~--~----~------------~-------~--~----~ 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 URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
