Gram-Schmidt Orthogonalization — Stepwise Visualization in 2D and 3D
Gram-Schmidt orthogonalization transforms a set of independent columns into an orthogonal, then orthonormal, basis.
The process can be viewed not only as a symbolic algorithm, but also as a sequence of geometric changes in space.
The visualizations below show the algorithm step by step in two and three dimensions, together with a structural summary of what gradual orthogonalization reveals.
Overview
One useful way to view Gram-Schmidt is as a sequence of right-side updates that change one active column at a time.
In this interpretation, scale and shear are removed step by step from the original matrix, producing the orthonormal matrix Q, while the removed transformations accumulate into the upper-triangular factor R.
Stepwise orthogonalization in 2D
In two dimensions, the first column is normalized, then the second is orthogonalized against it and normalized.
The static diagram shows the sequence as a chain of intermediate matrices, while the animation shows the same process unfolding continuously.
Animated 2D process
The geometric changes correspond to the symbolic updates that normalize the first column and then remove the component of the second column in that direction.
This makes the construction of the orthonormal basis visible as a continuous motion.
Stepwise orthogonalization in 3D
In three dimensions, the same logic continues one column at a time.
After the first normalization, the second column is made orthogonal to the first, then normalized, and finally the third is corrected against the first two and normalized.
Animated 3D process
Each new direction is corrected against the previously established orthogonal directions, making the construction of the orthonormal basis visible step by step.
This is the process viewpoint behind the factorization.
Concept
Gram-Schmidt converts independent columns into orthonormal columns.
In matrix form, this produces the factor Q of QR decomposition, while the coefficients used during the process are recorded in the upper-triangular factor R.
These images emphasize the process viewpoint:
the columns are not replaced all at once, but are corrected and normalized in a definite order, with each step acting on one active column.