The Gram-Schmidt process turns three vectors v1,v2,v3 in
R3, generally not orthogonal to each other, into an orthonormal basisu1,u2,u3. The tips of the vectors can be dragged in “Edit v₁ v₂ v₃”
mode; the view rotates by dragging the background.
Step 1.
The first unit vector is obtained by normalizing v1, i.e. dividing it by its own norm:
u1=∥v1∥v1
Step 2.
The component of v2 along u1 (its projection onto u1) is subtracted,
leaving the orthogonal part w2; w2 is then normalized:
w2=v2−(v2⋅u1)u1,u2=∥w2∥w2
Step 3.Both projections are subtracted from v3, onto u1 and onto u2;
the remaining orthogonal part w3 is then normalized:
w3=v3−(v3⋅u1)u1−(v3⋅u2)u2,u3=∥w3∥w3
Pressing “Compute & keep” animates this sequence on the simulator, color by color, in the
same order described above. The “slow motion” slider allows following it at a gentler
pace, without changing the final result.
Below the simulator’s buttons, four numeric rows are always kept up to date:
the coordinates of the starting vectors v1,v2,v3 (also
editable by typing them directly, in “Edit v₁ v₂ v₃” mode);
the coordinates of the resulting unit vectors u1,u2,u3, which
appear one at a time during “Compute & keep”, in sync with the animation;
the norms∥u1∥,∥u2∥,∥u3∥, which
should stay at 1 (the resulting vectors are unit vectors);
the cross dot productsu1⋅u2,u1⋅u3,u2⋅u3, which should stay at 0 (the resulting vectors are pairwise
orthogonal).
Unit norms together with zero dot products are exactly the definition of an orthonormal
basis: those live numbers offer a way to check, for any linearly independent starting
triple, that the process worked correctly.