B=matrix([[13,12],[-4,7],[11,-13]]) # Coefficients of the variables
print 'Matrix=\n',B
b = vector([-6,-73,157]) 
sol = B.solve_right(b)# Solution of the Matrix
B * sol
x, y = var('x, y')
print "\nResult of the Expressions:"
solve([13*x+12*y==-6,
       -4*x+7*y==-73,
      11*x-13*y==157], x, y)# Displaying the Values of x and y

SageDays/Kreyszig-6.3-7 (last edited 2010-08-12 12:55:04 by Mahesh Goheja)