LA.Ch7.Ex15(2).SC.Kim

2039 days ago by seongchan

A=matrix(6, 9, [1, 2, 3, 4, 5, 4, 3, 2, 1, -1, 2, 3, 4, 5, 4, 3, 2, -1, 1, -2, 3, 4, 5, 4, 3, -2, 1, 1, 2, -3, 4, 5, 4, -3, 2, 1, 1, 2, 3, -4, 5, -4, 3, 2, 1, 1, 2, 3, 4, -5, 4, 3, 2, 1,]) b=matrix(6, 1, [1, 2, 0, 1, 0, 2]) C=A.transpose()*A print "rank(A)=",; print A.rank() print "RREF(C)=" print C.rref() 
       
rank(A)= 5
RREF(C)=
[1 0 0 0 0 0 0 0 1]
[0 1 0 0 0 0 0 1 0]
[0 0 1 0 0 0 1 0 0]
[0 0 0 1 0 1 0 0 0]
[0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
rank(A)= 5
RREF(C)=
[1 0 0 0 0 0 0 0 1]
[0 1 0 0 0 0 0 1 0]
[0 0 1 0 0 0 1 0 0]
[0 0 0 1 0 1 0 0 0]
[0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]