LA.Ch.7.Ex15(1).SC.Kim

2041 days ago by seongchan

A=matrix(5, 5, [1, 3, 5, 2, -2, -2, 1, -2, 1, 0, -1, -3, 0, 1, 0, -3, 0, 1, 0, 0, 0, 1, 2, -2, 1]) b=matrix(5, 1, [1, 0, 1, 0, 0]) C=A.transpose()*A print "rank(A)=",; print A.rank() print "x=" print C.inverse()*A.transpose()*b 
       
rank(A)= 5
x=
[ 11/97]
[ -5/97]
[ 33/97]
[ 93/97]
[125/97]
rank(A)= 5
x=
[ 11/97]
[ -5/97]
[ 33/97]
[ 93/97]
[125/97]