In-class Demonstration: Quadratic Forms; Orthogonal Diagonalization - Part 2By Russell Blyth, modified by Mike May, S.J.restart: with(LinearAlgebra): with(plots): with(plottools):Example 3: The quadric surface 2xy + z = 0C is the matrix of the quadratic formC := Matrix(3,3,[[0,1,0],[1,0,0],[0,0,0]]); Find the eigenvalues and eigenvectors of BevC := [Eigenvectors(C)];Normalize the eigenvectors:u1 := Normalize(Column(evC[2],1),Euclidean); u2 := Normalize(Column(evC[2],2),Euclidean); u3 := Normalize(Column(evC[2],3),Euclidean);Construct a matrix P which orthogonally diagonalizes APC := <u1|u2|u3>;Compute the diagonal matrix (since A = PDNiMpJSJQRyUidEc=, we have D = NiMpJSJQRyUidEc=AP)DC := Transpose(PC) . C . PC;Make Maple compute the equation of the rotated conic:LHSC := Transpose(<X,Y,Z>) . DC . <X,Y,Z> + Transpose(<0,0,1>) . PC . <X,Y,Z>;The equation is LHSC = 0, which is the equation of a hyperboloid of one sheet.Let's graph, first the quadric surface relative to the new axes:implicitplot3d(x^2-z^2+y=0,x=-10..10,y=-10..10,z=-10..10,axes=normal,scaling=constrained,grid=[20,20,20]);And then relative to the original axes: (the eigenspace basis vectors have been stretched to make them long enough to see clearly)u15 := 5*u1; u25 := 5*u2; u35 := 5*u3;u1g := line([0,0,0],convert(u15,list),color=red,thickness=4): u2g := line([0,0,0],convert(u25,list),color=red,thickness=4): u3g := line([0,0,0],convert(u35,list),color=red,thickness=4): conicB := implicitplot3d(2*x*y + z = 0, x=-10..10,y=-10..10,z=-10..10,axes=normal,grid=[20,20,20]): display([u1g,u2g,u3g,conicB],scaling=constrained);