Orthogonality
Orthogonality means two directions have zero dot product. It is the algebraic version of perpendicularity and is what lets projections, SVD, QR decomposition, and PCA separate variation into non-overlapping directions.
Defining math
Vectors are orthogonal when
Here is the dot product. A zero dot product means the signed component of in the direction of cancels out, so neither vector carries length along the other direction.
A matrix has orthonormal columns when
The columns of are the basis vectors, and is the identity matrix. Diagonal ones mean each column has unit length; off-diagonal zeros mean different columns are mutually orthogonal.
Then multiplication by preserves Euclidean lengths inside its column space:
That length preservation is why orthogonal bases are numerically convenient in matrix decompositions and why residuals in least squares are orthogonal to fitted directions.
Worked example
The vectors and are orthogonal because their dot product cancels:
Each has length , so normalizing gives the orthonormal pair and . Stacking them as columns of ,
where the unit diagonal comes from the normalization and the zero off-diagonal from orthogonality. A QR decomposition of any two independent columns produces exactly such an orthonormal basis automatically.
Caveats
Orthogonality depends on the inner product. Standard Euclidean orthogonality may be the wrong geometry when features have different units or correlated noise; then norms and distances or whitening need to define the metric first.
References
Nav