Ch-7-Prob-P9-New-허재석

1841 days ago by matrix

x1=vector([1,-1,2,0]) x2=vector([-2,1,0,1]) x3=vector([0,-1,4,1]) x4=vector([3,1,1,-1]) A=matrix([x1,x2,x3,x4]) [G,mu]=A.gram_schmidt() B=matrix([G.row(i) / G.row(i).norm() for i in range(0, 3)]); B print G print print B*B.transpose() print print B.transpose()*B print print B*B.transpose()==B.transpose()*B 
       
[   1   -1    2    0]
[-3/2  1/2    1    1]
[   1 19/9  5/9 -1/9]

[1 0 0]
[0 1 0]
[0 0 1]

[131/156   5/156    5/52 -55/156]
[  5/156 155/156   -1/52  11/156]
[   5/52   -1/52   49/52   11/52]
[-55/156  11/156   11/52  35/156]

False
[   1   -1    2    0]
[-3/2  1/2    1    1]
[   1 19/9  5/9 -1/9]

[1 0 0]
[0 1 0]
[0 0 1]

[131/156   5/156    5/52 -55/156]
[  5/156 155/156   -1/52  11/156]
[   5/52   -1/52   49/52   11/52]
[-55/156  11/156   11/52  35/156]

False