The gramschmidt command uses the Gram-Schmidt procedure to find an orthonormal set of vectors with the same span as a given set.
Examples.
| ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |
| P· Q= | ∫ |
| P(x) Q(x)dx |
| p_scal(p,q):=integrate(p*q,x,-1,1) |
| gramschmidt([1,1+x],p_scal) |
| ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| , |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |