ch8.9_noh

333 days ago by kyunganoh

var('x','y','z') a=3; b=1; c=2; d=2; e=0; f=2 A=matrix(3,3,[a,d/2,e/2,d/2,b,f/2,e/2,f/2,c]) X=matrix(3,1,[x,y,z]) print expand(X.transpose() * A * X) 
       
[3*x^2 + 2*x*y + y^2 + 2*y*z + 2*z^2]
[3*x^2 + 2*x*y + y^2 + 2*y*z + 2*z^2]