Ch7 problem18

382 days ago by semele27

x1=vector([1,2,1]) x2=vector([1,0,1]) x3=vector([3,1,0]) A=matrix([x1,x2,x3]) [G,mu]=A.gram_schmidt() # 행에 대하여 직교기저를 찾아준다. A==mu*G print G B=matrix([G.row(i) / G.row(i).norm() for i in range(0, 3)]); B # 정규화한 직교기저를 행으로 하는 행렬 
       
[   1    2    1]
[ 2/3 -2/3  2/3]
[ 3/2    0 -3/2]
[1/6*sqrt(6) 1/3*sqrt(6) 1/6*sqrt(6)]
[  sqrt(1/3)  -sqrt(1/3)   sqrt(1/3)]
[  sqrt(1/2)           0  -sqrt(1/2)]
[   1    2    1]
[ 2/3 -2/3  2/3]
[ 3/2    0 -3/2]
[1/6*sqrt(6) 1/3*sqrt(6) 1/6*sqrt(6)]
[  sqrt(1/3)  -sqrt(1/3)   sqrt(1/3)]
[  sqrt(1/2)           0  -sqrt(1/2)]