| 1 | initial version |
I'm not sure why this does not work over the symbolic ring, but it does so over the rational field of polynomials in h and k:
R.<h,k> = PolynomialRing(QQ,2)
A = matrix([[1,-3,0,2],[-2,4,0,h],[0,-2,1,k],[3,-1,7,1]])
A.echelon_form()
gives
[ 1 0 0 -3/2*h - 4]
[ 0 1 0 -1/2*h - 2]
[ 0 0 1 -h + k - 4]
[ 0 0 0 11*h - 7*k + 39]
| 2 | No.2 Revision |
I'm not sure why this does not work over the symbolic ring, but it does so over the rational field of polynomials in h and k:
R.<h,k> = PolynomialRing(QQ,2)
A = matrix([[1,-3,0,2],[-2,4,0,h],[0,-2,1,k],[3,-1,7,1]])
A.echelon_form()
gives
[ 1 0 0 -3/2*h - 4]
[ 0 1 0 -1/2*h - 2]
[ 0 0 1 -h + k - 4]
[ 0 0 0 11*h - 7*k + 39]
ADDED. Explanation for why this does not work over SR is given in this answer.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.