213 - A16 - Finding a vector NOT in the span

7 days ago by Professor213

var('v1,v2,v3') original = matrix([[4,-4,v1],[-3,2,v2],[4,-7,v3]]) A = copy(original) show("Original Augmented with general vector =",A) A[0] = A[0]/(4) show("Getting started with Gauss-Jordan =",A) A[1] = A[1] + 3*A[0] A[2] = A[2] - 4*A[0] show("After one general step of GJ =",A) A[1] = A[1]/(-1) show(A) A[0] = A[0] + A[1] A[2] = A[2] + 3*A[1] show("After another general step =",A) v1o = 8 v2o = -2 v3o = 20 pretty_print("Picking v1 = ",v1o) pretty_print("Picking v2 = ",v2o) pretty_print("Picking v3 = ",v3o) show("With these values for v1, v2, v3, look for consistent: ",A(v1=v1o, v2=v2o, v3=v3o)) V = A[0][2](v1=v1o,v2=v2o,v3=v3o)*original.column(0)+ A[1][2](v1=v1o,v2=v2o,v3=v3o)*original.column(1) - original.column(2)(v1=v1o,v2=v2o,v3=v3o) show("With these values for v1, v2, v3, look at col1 + col2 - other side = zeros if in the span: ",V)