LA Ch7 Exs Prob 8 by 김지윤

388 days ago by jykim

A=matrix(3, 3, [1, 2, 1, 2, 1, 1, 1, 2, 1]) print "RREF(A)=" print A.rref() print "rank(A)=", A.rank() 
       
RREF(A)=
[  1   0 1/3]
[  0   1 1/3]
[  0   0   0]
rank(A)= 2
RREF(A)=
[  1   0 1/3]
[  0   1 1/3]
[  0   0   0]
rank(A)= 2
A=matrix(3, 3, [1, 2, -3, 2, -3, 1, -3, 2, 1]) print "RREF(A)=" print A.rref() print "rank(A)=", A.rank() 
       
RREF(A)=
[ 1  0 -1]
[ 0  1 -1]
[ 0  0  0]
rank(A)= 2
RREF(A)=
[ 1  0 -1]
[ 0  1 -1]
[ 0  0  0]
rank(A)= 2
A=matrix(3, 3, [1, 2, 2, 2, 2, 1, 2, 2, 1]) print "RREF(A)=" print A.rref() print "rank(A)=", A.rank() 
       
RREF(A)=
[  1   0  -1]
[  0   1 3/2]
[  0   0   0]
rank(A)= 2
RREF(A)=
[  1   0  -1]
[  0   1 3/2]
[  0   0   0]
rank(A)= 2