Linear Algebra Powertool
Quick Gram-Schmidt with Maple
Worksheet by Russell Blyth
> with(linalg);
Warning, the protected names norm and trace have been redefined and unprotected
After loading the linalg package, it is worthwhile to look at the help page for the GramSchmidt command that Maple provides.
> ?GramSchmidt
To demonstrate the command, I want to construct a series of 5 vectors in which the ith vector has a 1 in the first i positions and fills out with zeroes.
>
del := (x,y) -> piecewise(x<y,0,1);
for i from 1 to 5 do
vec[i] := vector(5,[seq(del(i,j),j=1..5)]); od;
Now we look at the results of Gram Schmidt on the set of vectors in the two obvious orders.
> GramSchmidt([seq(vec[k],k=1..5)]);
> GramSchmidt([seq(vec[6-k],k=1..5)]);
>
>