Drag an arrowhead to move that vector
v1 v2 projection (dashed) e1, e2 (, e3) orthonormal

Gram-Schmidt Orthogonalization in 2D

The Gram-Schmidt process is one of the most-used algorithms in linear algebra: given a set of linearly independent vectors, it builds an orthonormal basis — vectors that are mutually perpendicular and exactly unit length — by projecting out the overlap between each new vector and the ones already processed. This simulator works entirely in the 2D plane: drag the tips of two input vectors anywhere you like and watch the algorithm compute a real orthonormal frame from your exact coordinates, live, every frame. Toggle "Show projections" to see the projection arrow the formula subtracts and the residual it leaves behind, or press "Animate steps" to watch the projection, subtraction and normalization play out one real computed operation at a time. Add an optional third vector to see the process correctly recognize that any third vector in a 2D plane is linearly dependent on the first two — its orthogonal residual collapses toward zero exactly as the math predicts.