ch7-exercise18_황훌

388 days ago by kyunganoh

x1=vector([1,2,3,4]) x2=vector([1,3,5,7]) x3=vector([1,7,9,13]) x4=vector([1,1,0,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,4)]);B print B*B.transpose() # 직교행렬인지 확인 print print B.transpose()*B 
       
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]

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

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