All published worksheets from http://sagenb.org
# Section 1.5
# 9 (Find solutions to the homogeneous equation Ax=0) A = matrix(QQ,[[3,-6,6,0],[-2,4,-2,0]]) A
A.rref()
# Therefore, # x_1 = 2x_2 # x_2 is free # x_3 = 0 x_1, x_2, x_3 = var('x_1,x_2, x_3')
# In vector form, this is x = vector(SR,[2*x_2,x_2,0]); x
# 17 Find solutions to Ax=b, and write in parametric form. A = matrix(QQ,[[2,2,4,8],[-4,-4,-8,-16],[0,-3,-3,12]]) A
# x_3 is the free parameter. x_1 = 8-x_3, x_2 = -4 -x_3. In vector form we get x = vector(SR, [x_1,x_2,x_3]) x
# Thus, x = vector(SR, [8,-4,0]) + x_3 * vector(SR,[-1,-1,1]) x