1 | initial version |
Like this:
sage: F = PolynomialRing(QQ,2,'x')
sage: K = F.fraction_field()
sage: x = K.gens()
sage: A = Matrix([[x[0]*x[1]+1,x[1]],[x[0],1]])
sage: A.rational_form()
[ 0 -1]
[ 1 x0*x1 + 2]
2 | No.2 Revision |
Like this:
sage: F = PolynomialRing(QQ,2,'x')
sage: K = F.fraction_field()
PolynomialRing(QQ,2,'x').fraction_field()
sage: x = K.gens()
sage: A = Matrix([[x[0]*x[1]+1,x[1]],[x[0],1]])
sage: A.rational_form()
[ 0 -1]
[ 1 x0*x1 + 2]