ch.9 Problem.6

317 days ago by g1.kjiwon

#(1) var('u1,u2,v1,v2') u=matrix(2,1,[u1,u2]) v=matrix(2,1,[v1,v2]) A=matrix(2,2,[a,b,c,d]) print(v.transpose()*A*u) 
       
[(b*v1 + d*v2)*u2 + (a*v1 + c*v2)*u1]
[(b*v1 + d*v2)*u2 + (a*v1 + c*v2)*u1]
#(2) u0=vector([11,-11]) print u0.norm() 
       
11*sqrt(2)
11*sqrt(2)
#(3) v0=vector([44,33]) print v0.norm() 
       
55
55
#(4) print (v0).hermitian_inner_product(u0) #<u0,v0> print numerical_approx(1/5*sqrt(2)) print (numerical_approx(1/5*sqrt(2))).arccos() print (numerical_approx(1/5*sqrt(2))).arccos()*180/pari(pi) 
       
121
0.282842712474619
1.28403977458335
73.5700598105555
121
0.282842712474619
1.28403977458335
73.5700598105555