InClass6.5-QuadForms2.mws

6.5 Quadratic Forms; Orthogonal Diagonalization - Part 2

In-class demo by Russell Blyth

> restart: with(linalg): with(plots): with(plottools):

Warning, the protected names norm and trace have been redefined and unprotected

Warning, the name changecoords has been redefined

Warning, the name arrow has been redefined

Example 3: The quadric surface 2xy + z = 0

C is the matrix of the quadratic form

> C := matrix(3,3,[[0,1,0],[1,0,0],[0,0,0]]);

C := matrix([[0, 1, 0], [1, 0, 0], [0, 0, 0]])

Find the eigenvalues and eigenvectors of B

> evC := [eigenvectors(C)];

evC := [[0, 1, {vector([0, 0, 1])}], [1, 1, {vector...

Normalize the eigenvectors:

> u1 := normalize(evC[1][3][1]);
u2 := normalize(evC[2][3][1]);
u3 := normalize(evC[3][3][1]);

u1 := vector([0, 0, 1])

u2 := vector([1/2*sqrt(2), 1/2*sqrt(2), 0])

u3 := vector([-1/2*sqrt(2), 1/2*sqrt(2), 0])

Construct a matrix P which orthogonally diagonalizes A

> PC := augment(u1,u2,u3);

PC := matrix([[0, 1/2*sqrt(2), -1/2*sqrt(2)], [0, 1...

Compute the diagonal matrix (since A = PD P^t , we have D = P^t AP)

> DC := evalm(transpose(PC) &* C &* PC);

DC := matrix([[0, 0, 0], [0, 1, 0], [0, 0, -1]])

Make Maple compute the equation of the rotated conic:

> LHSC := evalm(transpose([X,Y,Z]) &* DC &* [X,Y,Z]) + evalm(transpose([0,0,1]) &* PC &* [X,Y,Z]);

LHSC := Y^2-Z^2+X

>

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]);

[Maple Plot]

And then relative to the original axes: (the eigenspace basis vectors have been stretched to make them long enough to see clearly)

> u15 := evalm(5*u1); u25 := evalm(5*u2); u35 := evalm(5*u3);

u15 := vector([0, 0, 5])

u25 := vector([5/2*sqrt(2), 5/2*sqrt(2), 0])

u35 := vector([-5/2*sqrt(2), 5/2*sqrt(2), 0])

> 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);

[Maple Plot]

>

>