The gramschmidt command uses the Gram-Schmidt procedure to find an orthonormal set of vectors with the same span as a given set.
normal(gramschmidt([[1,1,1],[0,0,1],[0,1,0]])) |
or:
normal(gramschmidt([[1,1,1],[0,0,1],[0,1,0]],dot)) |
|
Define a scalar product on the vector space of polynomials by P· Q=∫−11P(x) Q(x) dx. Then:
p_scal(p,q):=integrate(p*q,x,-1,1):; gramschmidt([1,1+x],p_scal) |
|