Imagine you are describing a location in a city. You say: "three blocks north, two blocks east." Those two directions — north and east — are orthogonal: they share nothing, they are independent, and together they span the whole plane. Most coordinate systems we use in practice share this pleasant property.
But raw data rarely arrives in such a tidy form. A dataset of measurements might give you vectors that point in similar directions, partially overlapping. To do geometry, solve equations, or train a machine-learning model, you almost always need a cleaner basis — one where the vectors are perpendicular to each other (orthogonal) and each has length one (normal). Together that is called an orthonormal basis.
The Gram-Schmidt process, developed independently by Jørgen Pedersen Gram (1883) and Erhard Schmidt (1907), is the classical recipe for building exactly that. The idea is beautifully simple: take each vector in turn, subtract the shadow it casts onto all previous vectors, and what remains is a new direction that is perpendicular to everything before it. Normalize it to length one, and you have your next basis vector.
The process always works for any set of linearly independent vectors, and it produces an orthonormal basis for the subspace they span. But there is a catch: when implemented on a computer, the classical version can lose accuracy due to floating-point errors. A small tweak — the modified Gram-Schmidt algorithm — fixes this without changing the mathematical result.
Comments
Loading comments...