How to use it
- Type the vectors, one group per vector, separated by semicolons:
1 1 0; 1 0 1; 0 1 1. - Choose whether the orthogonal vectors are shown as fractions or decimals.
- Read u₁, u₂, … (orthogonal), e₁, e₂, … (unit length) and the lengths.
How it works
The calculator keeps u₁ = v₁ and, for each next vector, subtracts its projection onto every earlier non-zero u:
uₖ = vₖ − Σ (vₖ·uⱼ / uⱼ·uⱼ) uⱼ
The projections use exact fractions, so the orthogonal vectors have no rounding error. Each orthonormal vector is eₖ = uₖ / ‖uₖ‖ with ‖uₖ‖ = √(uₖ·uₖ). If some uₖ comes out as the zero vector, vₖ was a combination of the earlier vectors; it is listed as dependent and skipped.
Worked example
Take v₁ = (1, 1, 0), v₂ = (1, 0, 1), v₃ = (0, 1, 1).
- u₁ = (1, 1, 0), u₁·u₁ = 2.
- v₂·u₁ = 1, so u₂ = v₂ − ½u₁ = (1/2, −1/2, 1), u₂·u₂ = 3/2.
- v₃·u₁ = 1 and v₃·u₂ = 1/2, so u₃ = v₃ − ½u₁ − ⅓u₂ = (−2/3, 2/3, 2/3).
The lengths are 1.41421, 1.22474 and 1.1547, and the orthonormal basis is e₁ = (0.707107, 0.707107, 0), e₂ = (0.408248, −0.408248, 0.816497), e₃ = (−0.57735, 0.57735, 0.57735).
Tips and common mistakes
- Check orthogonality yourself: every pair of u vectors should have dot product 0.
- Subtract the projection onto u (the new vectors), not onto the original v; that is the most common slip in hand calculations.
- To get an orthonormal basis of the column space of a matrix, enter its columns as the vectors.