v₁ = (1, 1), v₂ = (1, 0)
coefficient v₂·u₁/u₁·u₁
0.5.
The Gram–Schmidt process turns independent vectors into perpendicular vectors by subtracting projections: , , and so on. Divide each by its length for an orthonormal set.
This page is easier if you are comfortable with:
Each new vector has its components along the earlier ones removed, using the orthogonal projection. What is left is perpendicular to everything before it, which you can confirm with dot products.
Dividing by the magnitude gives unit vectors. Placing them as columns gives an orthogonal matrix , and recording the projections gives the triangular matrix in QR factorisation.
The process builds a convenient basis for any subspace, useful for changing basis and for least-squares problems.
The Gram–Schmidt process builds a set of perpendicular vectors that span the same space as a given set. It is a standard route to orthonormal bases.
Removing the part of v₂ along u₁ leaves a vector perpendicular to u₁.
These examples are worked by hand, step by step, so you can compare your own working.
Apply Gram–Schmidt to , .
Apply Gram–Schmidt to , .
Normalise .
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
coefficient v₂·u₁/u₁·u₁
0.5.
u₂ = (1, 0) − 0.5(1, 1) x
0.5.
u₂ y
−0.5.
|u₂|
1.2247.
u₁ = v₁, u₂ = v₂ − ((v₂·u₁)/(u₁·u₁))u₁, and so on. The uᵢ are mutually perpendicular; divide by lengths to get an orthonormal set.
v₂·u₁ = 1, u₁·u₁ = 2.
1 − 0.5.
0 − 0.5.
u₂ = (0.5, 1, −0.5).
v₁ ✗
u₁ ✓
Use the orthogonalised vector.
v₂ − u₁ ✗
v₂ − (coef)u₁ ✓
Projection.
same ✗
divide by length for unit ✓
Normalise.
ignored ✗
u becomes 0 ✓
Needs independence.
Try each one on paper, then open the answer. Use the solver above to see the full working.
2
3
1
2
-1
5
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
Turns independent vectors into orthogonal vectors.
v₂ − ((v₂·u₁)/(u₁·u₁))u₁.
Divide each by its length.
Yes, results differ.
orthogonal projection.
QR and Cholesky factorisations.
More in Vectors and matrices and the formula sheets.