Gram-Schmidt Orthogonalization in 2D
Interactive 2D Gram-Schmidt process: drag vector tips on the plane and watch the real projection-subtraction algorithm build an orthonormal basis step by step, with live orthogonality and norm readouts.
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.
Drag vector tips on a 2D plane and watch the real Gram-Schmidt process build an orthonormal basis step by step, with live orthogonality and norm readouts and an optional third vector that demonstrates linear dependence in the plane.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install