The orthogonal complement of a subset of a vector space equipped with an inner product is the set of all vectors orthogonal to every member of that subset. Written , it describes the directions perpendicular to within a specified ambient space. The concept connects geometric perpendicularity with subspace decomposition in linear algebra and extends to infinite-dimensional spaces in functional analysis. (ocw.mit.edu)
Definition and elementary properties
Let be an inner product space over the real numbers or complex numbers, and let . Its orthogonal complement is
In complex spaces, conjugate symmetry makes the condition independent of which argument is written first. The ambient space and inner product are essential: changing either can change the orthogonal complement. (people.math.harvard.edu)
Even when is not a subspace, is a linear subspace. Indeed, the inner product conditions are preserved under addition and scalar multiplication. Orthogonality to all members of also implies orthogonality to every linear combination of those members, so
where denotes the linear span. (people.math.harvard.edu)
For subspaces , the defining equations give
Thus taking an orthogonal complement reverses inclusion. Moreover,
because a vector in the intersection satisfies , which forces . These identities follow directly from the definition and positive definiteness of the inner product. (people.math.harvard.edu)
Finite-dimensional geometry and decomposition
If has finite dimension , and has dimension , then
The last expression is an orthogonal direct sum: every vector has a unique decomposition into a component in and a component in . Orthogonality alone does not make two subspaces complementary; together they must also span the ambient space. (ocw.mit.edu)
In three-dimensional Euclidean space, for example, consider the line
Applying the definition gives
Its orthogonal complement is therefore a plane through the origin. Conversely, that plane’s orthogonal complement is the original line. More generally, a nonzero vector determines a perpendicular hyperplane through the origin. This example illustrates the line–plane relationship described by the dimension formula. (ocw.mit.edu)
An orthogonal complement is not a set-theoretic complement. It contains the zero vector, as does every subspace, and usually contains only some of the vectors outside . (people.math.harvard.edu)
Matrix characterization and computation
Suppose the columns of a matrix span a subspace . A vector is perpendicular to every column exactly when
Consequently,
where is the transpose and the kernel is its null space. Computing therefore reduces to solving a homogeneous system of linear equations. A basis of its solutions can be found by Gaussian elimination. (ericdarve.github.io)
For a real matrix , the four fundamental subspaces form two complementary pairs:
The first pair lies in , the second in . If has rank , their dimensions are respectively and , consistent with the rank–nullity theorem. (ericdarve.github.io)
Alternatively, extend an orthonormal basis of to one of ; the added vectors form an orthonormal basis of . In finite dimensions this can be carried out using the Gram–Schmidt process. (github.com)
Orthogonal projection and least squares
The decomposition , with and , defines the orthogonal projection . The residual lies in , and is the unique vector of nearest to . The complementary projection satisfies
These statements hold in finite-dimensional inner product spaces and for closed subspaces of Hilbert spaces. (people.math.harvard.edu)
For a real matrix whose columns form a basis of ,
If those columns are orthonormal, this simplifies to . In ordinary least squares, minimizing requires the residual to belong to . This yields the normal equations
The fitted vector is unique even when its coefficient representation is not. (github.com)
Infinite-dimensional spaces
In any inner product space, an orthogonal complement is a closed set in the topology induced by the inner-product norm. Each orthogonality condition is preserved under limits, and intersecting all such conditions produces a closed subspace. (people.math.harvard.edu)
For a subspace of a Hilbert space , completeness gives
where is the closure of . Hence holds precisely when is closed. A proper dense subspace has orthogonal complement , demonstrating why the finite-dimensional double-complement identity needs a closure in infinite dimensions. Without completeness, the Hilbert-space decomposition theorem cannot generally be assumed. (ocw.mit.edu)