A=matrix([[6,4],[3,5]]) # Coefficients of the variables
print 'Matrix=\n',A
b = vector([2, -34]) 
sol = A.solve_right(b)# Solution of the Matrix
A * sol
x, y = var('x, y')
print "\nResult of the Expressions:"
solve([6*x+4*y==2, 
       3*x-5*y==-34], x, y)# Displaying the Values of x and y

SageDays/Kreyszig-6.3-1 (last edited 2010-08-11 12:24:52 by Mahesh Goheja)