Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168772
Image: ubuntu2004

EXAMPLE 1  System with No Solutions

x y2z= 2 x -  y - 2z =  2
2x3y+6z= 52x - 3y + 6z =  5
3x4y+4z=123x - 4y + 4z = 12

M = matrix([[1, -1, -2, 2], [2, -3, 6, 5], [3, -4, 4, 12]]) M
M[1] = 2*M[0] - M[1] M[2] = 3*M[0] - M[2] M
M[2] = -M[1] + M[2] M
M.echelon_form()

EXAMPLE 2  System with Infinite Solutions

3x4y+4z=73x - 4y + 4z = 7
x y2z=2 x -  y - 2z = 2
2x3y+6z=52x - 3y + 6z = 5

M = matrix([[3, -4, 4, 7], [1, -1, -2, 2], [2, -3, 6, 5]]) M
M.swap_rows(0, 1) M
M[1] = 3*M[0] - M[1] M[2] = 2*M[0] - M[2] M
M[2] = -M[1] + M[2] M
var('x y z') y = -1 + 10*z x = 1 + 12*z (x, y, z)
M = matrix([[3, -4, 4, 7], [1, -1, -2, 2], [2, -3, 6, 5]]) M
M.echelon_form()

EXAMPLE 3  System with Fewer Equations than Variables

3x+7y+6z=263x + 7y + 6z = 26
x+2y+ z=8 x + 2y +  z = 8

M = matrix([[3, 7, 6, 26], [1, 2, 1, 8]]) M
M.swap_rows(0, 1) M
M[1] = -3*M[0] + M[1] M
var('x y z') y = 2 - 3*z x = 8 - z - 2*y (x, y, z)