This applies the Gram-Schmidt procedure to the given list of three-dimensional vectors.
{w1, w2, w3} = GramSchmidt[{{1,2,1}, {2,8,3}, {3,-2,-1}}] The result is an orthonormal basis, so the dot product of each pair of vectors is zero and each vector has unit length.
{w1.w2,w2.w3,w1.w3,w1.w1,w2.w2,w3.w3}
QRDecomposition[m] yields the QR decomposition for a numerical matrix m. The result is a list
q, r
, where q is an orthogonal matrix and r is an upper triangular matrix.
{q, r} = QRDecomposition[Transpose[{{4,0,3},{25,0,-25},{0,-2,0}}]];
{q, r} = QRDecomposition[Transpose[{{2,0,0},{3,4,0},{5,6,7}}]];
{q, r} = QRDecomposition[Transpose[{{2,2,1},{-2,1,2},{18,0,0}}]];
| Back to MTH 1230, | Created: May 17, 1999. |
| or back to my Home page. | http://www.math.neu.edu/~suciu/mth1230/gram-schmidt/g-s.html |