ch.9 problem.P3(new)

315 days ago by g1.kjiwon

t=vector([2*I,0,I]) u=vector([I,I,I]) v=vector([I,-1*I,I]) A = matrix(CDF, 3, 3, [t, u, v]) # t, u, v를 행벡터로 하는 행렬 생성 print "A=" print A 
       
A=
[ 2.0*I    0.0  1.0*I]
[ 1.0*I  1.0*I  1.0*I]
[ 1.0*I -1.0*I  1.0*I]
A=
[ 2.0*I    0.0  1.0*I]
[ 1.0*I  1.0*I  1.0*I]
[ 1.0*I -1.0*I  1.0*I]
[G, mu]=A.gram_schmidt() # 직교화과정 : 행에 대하여 직교기저를 찾는다. A=mu*G print "G=" print G 
       
G=
[                       -0.894427191*I                                  
0.0                       -0.4472135955*I]
[ 1.38777878078e-17 + 0.182574185835*I                    
-0.912870929175*I  -2.08166817117e-17 - 0.36514837167*I]
[-2.77555756156e-17 - 0.408248290464*I                    
-0.408248290464*I  4.16333634234e-17 + 0.816496580928*I]
G=
[                       -0.894427191*I                                   0.0                       -0.4472135955*I]
[ 1.38777878078e-17 + 0.182574185835*I                     -0.912870929175*I  -2.08166817117e-17 - 0.36514837167*I]
[-2.77555756156e-17 - 0.408248290464*I                     -0.408248290464*I  4.16333634234e-17 + 0.816496580928*I]
zz1 = G.row(0) / G.row(0).norm() zz2 = G.row(1) / G.row(1).norm() zz3 = G.row(2) / G.row(2).norm() N=matrix(CDF,3,3,[zz1,zz2,zz3]) print "N=" print N 
       
N=
[                       -0.894427191*I                                  
0.0                       -0.4472135955*I]
[ 1.38777878078e-17 + 0.182574185835*I                    
-0.912870929175*I  -2.08166817117e-17 - 0.36514837167*I]
[-2.77555756156e-17 - 0.408248290464*I                    
-0.408248290464*I  4.16333634234e-17 + 0.816496580928*I]
N=
[                       -0.894427191*I                                   0.0                       -0.4472135955*I]
[ 1.38777878078e-17 + 0.182574185835*I                     -0.912870929175*I  -2.08166817117e-17 - 0.36514837167*I]
[-2.77555756156e-17 - 0.408248290464*I                     -0.408248290464*I  4.16333634234e-17 + 0.816496580928*I]