Maple double check of problem #9 in 8.3
> with(linalg):
Warning, the protected names norm and trace have been redefined and unprotected
> A:=matrix([[-3,1,2],[1,-3,2],[2,2,0]]);
> eigenvalues(A);
> eigenvectors(A);
> GramSchmidt({vector([-1,1,0]),vector([-2,0,1])});
These are different than ours. Notice Maple used the second first as the first one in the G-S process. We switch them below.
> GramSchmidt({vector([-2,0,1]),vector([-1,1,0])});
We normalize the three eigenvectors, the two for eigenvalue -4 and the one for eigenvalue 2.
>
normalize(vector([1,1,2 ]));
normalize(vector([-1,1,0]));
normalize(vector([-1,-1,1]));
>
P:=transpose(matrix([[1/6*sqrt(6), 1/6*sqrt(6), 1/3*sqrt(6)],
[-1/2*sqrt(2), 1/2*sqrt(2), 0],[-1/3*sqrt(3), -1/3*sqrt(3), 1/3*sqrt(3)]]));
This is the same as the one we got by hand. Is in really orthogonal? Does in diagonalize A as the theory says it should?
> inverse(P);
Indeed P inverse equals P transpose.
> evalm(transpose(P)&*A&*P);
Check!
We use the jordon command to diagonialize A and construct P.
>
> jordan(A,'P');
> evalm(P);
jordan diagonalized A differently, and did not normalize P, nor is its P orthogonal.