In [1]:
from mth309 import *

Check if vector is in Col A

In [3]:
A = Matrix([[1,-3,-4],[-4,6,-2],[-3,7,6]])
A
Out[3]:
  1 -3 -4
 -4  6 -2
 -3  7  6
In [4]:
b = Matrix([3,3,-4])
b
Out[4]:
3 3 -4

Is b in Col A?

In [5]:
Aaug = augmented(A,b)
Aaug
Out[5]:
  1 -3 -4  3
 -4  6 -2  3
 -3  7  6 -4
In [6]:
re(Aaug)
Out[6]:
 1 -3 -4    3
 0  1  3 -5/2
 0  0  0    0

Find basis for Col A and Nul A

In [7]:
A = Matrix([[-3,6,-1,1,-7],[1,-2,2,3,-1],[2,-4,5,8,-4]])
A
Out[7]:
 -3  6 -1 1 -7
  1 -2  2 3 -1
  2 -4  5 8 -4
In [10]:
zero = Matrix([0,0,0])
Aaug = augmented(A,zero)
Aaug
Out[10]:
 -3  6 -1 1 -7 0
  1 -2  2 3 -1 0
  2 -4  5 8 -4 0
In [11]:
re(Aaug)
Out[11]:
 1 -2 1/3 -1/3 7/3 0
 0  0   1    2  -2 0
 0  0   0    0   0 0
In [12]:
rre(Aaug)
Out[12]:
 1 -2 0 -1  3 0
 0  0 1  2 -2 0
 0  0 0  0  0 0