Orthogonal Complements
Given a plane through the origin in three-dimensional space, there is a unique line through the origin. This line is perpendicular to every vector in that plane. This everyday picture splits space into a subspace and "everything perpendicular to it." It is the seed of one of the most useful constructions in linear algebra: the orthogonal complement. The question this article answers is precise. Given a subspace of an inner product space , what is the set of vectors orthogonal to all of ? How does it interact with itself? The answer turns out to be remarkably clean in finite dimensions. The orthogonal complement is not merely a subspace sitting somewhere in . It is a genuine complement, meaning every vector of splits uniquely. It splits into a piece in and a piece in . This is the direct sum decomposition . It is strictly stronger than the mere existence of some algebraic complement of . Such a complement always exists in any vector space. Here, though, the complement is canonical. It is determined entirely by the geometry of the inner product, with no arbitrary choices. This decomposition is the engine behind orthogonal projections and least-squares approximation. It also drives the study of self-adjoint and normal operators. It underlies the geometry of Hilbert spaces in analysis. Once we know , we get for free a projection map onto along . This projection is the best-approximation map. It sends any vector to the closest point of to . The complement construction also has a beautiful involutive property in finite dimensions. Taking the complement twice returns you to where you started: . This article gives the formal definition of . It builds geometric intuition with explicit pictures. It proves the direct sum decomposition theorem in full using orthonormal bases. It also proves the double-complement identity. Along the way we highlight exactly where finite-dimensionality is used. This matters because the double-complement identity famously fails in infinite dimensions without extra hypotheses.
- For a subspace of an inner product space , .
- is always a subspace of , regardless of whether is finite-dimensional.
- If is finite-dimensional, then : every decomposes uniquely as with , .
- Consequently .
- In finite dimensions, exactly — complementing twice recovers the original subspace.
- Key idea: orthogonal complements turn the algebraic notion of "complementary subspace" into a canonical, geometrically meaningful splitting of the whole space.
Where this lives today
Orthogonal complements are the backbone of orthogonal projection, which finds the closest point in a subspace to a given vector — this is exactly how Orthogonal Projections are constructed, by projecting along onto . This idea powers least-squares regression in statistics: fitting a line or hyperplane to noisy data amounts to projecting a data vector onto the column space of a design matrix, with the residual living in the orthogonal complement. In numerical linear algebra, the QR decomposition and Gram–Schmidt-based algorithms exploit the same complement structure to solve linear systems stably. In signal processing, decomposing a signal into a "signal subspace" and a "noise subspace" (as in principal component analysis) is literally an orthogonal complement decomposition. The identity and the complement construction also underlie the theory of the adjoint, since the adjoint's kernel and the range of the original map are orthogonal complements of one another — a fact central to the study of self-adjoint and normal operators in quantum mechanics, where observables are represented by operators whose eigenspaces decompose the Hilbert space via mutually orthogonal complements. In coding theory, the dual code of a linear code over a finite field is defined via an orthogonal-complement-style construction with respect to a bilinear form, echoing the same algebraic pattern.
:::quiz[In the counterexample with , what causes to fail?]
- The inner product used is not positive-definite
- is not a subspace
- is infinite-dimensional and is not closed ✓
- is not actually a subspace in this example
Ask the tutor: How does the direct sum give a formula for the orthogonal projection onto ?
Let be an inner product space over (where or ), and let be a subspace. The orthogonal complement of in is
Two vectors are called orthogonal, written , if . Two subspaces are called orthogonal if every vector of is orthogonal to every vector of . Thus is exactly the set of vectors orthogonal to every vector of .
Intuition
Picture with the standard dot product, and let be the -plane, spanned by and . A vector satisfies and ; for to be orthogonal to every vector of (every linear combination of ), we need . So is exactly the -axis. Notice that and together span all of , and they meet only at the origin — this is the direct sum decomposition in its simplest form. The key structural fact is that this splitting is not a coincidence of the plane-and-axis example: it happens for every subspace of every finite-dimensional inner product space. If is any subspace, no matter how tilted or oddly shaped its basis vectors look, there is always a complementary subspace , orthogonal to it, such that the two together reconstruct uniquely. The proof strategy exploits the one tool we already have: an orthonormal basis. Extend an orthonormal basis of to one of ; the added vectors span exactly . This is why Existence of Orthonormal Bases (via Gram–Schmidt) is the essential prerequisite — orthogonal complements are built by extending orthonormal bases, not by an independent argument. The double-complement fact says the relationship is symmetric: and are mutual complements, and there is no "bigger" orthogonal complement lurking outside waiting to be discovered by complementing twice. This symmetry is special to finite dimensions (or to closed subspaces of infinite-dimensional Hilbert spaces) — a fact the counterexample below makes precise.
Let be a finite-dimensional inner product space over , and let be a subspace of . Then: 1. is a subspace of . 2. . 3. , i.e. every can be written uniquely as with and . 4. . 5. .
We prove each part in order, using Existence of Orthonormal Bases as the key tool, together with basic properties of Inner Product Spaces.
(1) is a subspace. First, since for all . Next, suppose and . For any ,
using linearity of the inner product in its first argument. Hence , so is closed under addition and scalar multiplication, and is a subspace. (This part requires no finite-dimensionality.)
(2) . Let . Since and , and every vector of is orthogonal to every vector of , in particular is orthogonal to itself:
By positive-definiteness of the inner product, implies . Hence . (This also requires no finite-dimensionality, only positive-definiteness.)
(3) . Since is finite-dimensional, so is its subspace . By the existence of orthonormal bases (Gram–Schmidt applied to any basis of ), choose an orthonormal basis of , where . By the standard extension theorem for bases, extend to a basis of , where . Applying Gram–Schmidt to this basis of , and noting that Gram–Schmidt leaves already-orthonormal initial vectors unchanged, we obtain an orthonormal basis
of , where are obtained from (orthonormal, and each orthogonal to every by construction of Gram–Schmidt). Claim: . () Each is orthogonal to every by construction. Since is a basis of , any is a linear combination , so
(depending on convention for which argument is conjugate-linear; in either convention the sum vanishes because each ). Hence , and by part (1), . () Let . Since is a basis of , write
For each fixed , since the basis is orthonormal,
But and , so ; hence for every . Therefore . This proves , and combined with the reverse inclusion, . Now we verify and uniqueness of decomposition, i.e. the direct sum. Given any , expand it in the orthonormal basis:
This exhibits with , , so . For uniqueness: suppose with and . Then
The left side lies in (subspace, closed under subtraction) and the right side lies in (same reason); since they are equal, this common vector lies in by part (2). Hence and . This proves uniqueness, completing the proof that .
(4) Dimension formula. From the orthonormal basis constructed above, , (since is a basis of , being a spanning linearly independent set — linearly independent because it is part of the orthonormal, hence linearly independent, basis of ), and . Hence
(This also follows abstractly from together with the standard fact that dimensions add for direct sums, but the explicit count above is self-contained.)
(5) . First we show . Let . For every , by definition of we have , equivalently . Since this holds for all , we conclude . Hence . For the reverse inclusion, we compare dimensions. Applying part (4) to the subspace of (which is itself finite-dimensional, being a subspace of the finite-dimensional space ) gives
Applying part (4) to gives . Subtracting,
So and . A subspace of a finite-dimensional space that has the same dimension as the whole containing subspace must equal it (if properly, then , a contradiction, since a proper subspace of a finite-dimensional space has strictly smaller dimension). Hence .
∎Worked examples
Example 1: A tilted plane in . Let with the standard dot product, and let
These two vectors are linearly independent (neither is a scalar multiple of the other), so . Step 1: Find directly from the definition. A vector lies in iff it is orthogonal to and (orthogonality to all of reduces to orthogonality to a spanning set, by linearity):
From the first equation ; from the second . So . Hence
a one-dimensional subspace (a line), as predicted since . Step 2: Decompose an explicit vector. Take . We want with , . Write and . Then
This gives the system
From the second equation ; from the third . Substituting into the first:
Then and . So
Check: . ✓ Also ✓ and ✓, confirming . This concretely exhibits the direct sum decomposition for a non-axis-aligned subspace, with all arithmetic tracked exactly.
Example 2: A subspace of and the double-complement identity. Let with the standard Hermitian inner product , and let
So . Step 1: Compute . A vector iff , i.e.
So for arbitrary , giving
a -dimensional subspace, matching . Step 2: Verify directly, without invoking the theorem, as a sanity check. Let , span . A vector must satisfy and :
So . Hence , confirming the theorem's conclusion (5) by direct computation, with the conjugate-linearity of the second argument correctly tracked throughout (note the sign flip from ).
The double-complement identity genuinely requires the ambient space to be finite-dimensional (or, more generally, requires to be a closed subspace of a complete inner product space). Here is a concrete failure in infinite dimensions. Let , the space of all real polynomials, with inner product
This is a perfectly good (infinite-dimensional) inner product space. Let
the subspace of polynomials vanishing at . This is a genuine subspace: it is closed under addition and scalar multiples, since and . Claim: . Suppose , i.e. for every polynomial vanishing at . Fix any polynomial and consider ; then , so , and orthogonality gives
Since on and except at a single point, the vanishing of this integral of a continuous non-negative function forces for all , hence for all . A polynomial that vanishes on the infinite set must be the zero polynomial. Hence , proving . Now compute , since every vector is orthogonal to . But : for instance the constant polynomial satisfies , so , yet . Thus
directly violating conclusion (5) of the theorem. The culprit is that is infinite-dimensional, so the dimension-counting argument in the proof (which crucially used with all quantities finite) simply does not apply; indeed here is a dense subspace of the completion of (an space) but is not itself closed, and it is exactly this failure of closedness that breaks the identity.
Scope, edge cases & common traps
| Situation | What happens |
|---|---|
| entirely; decomposition is trivial, . | |
| ; decomposition is . | |
| finite-dimensional, any subspace | Theorem applies fully: , dimensions add, . |
| infinite-dimensional, a closed subspace of a complete space (Hilbert space) | Analogous decomposition and double-complement identity hold, but require completeness and closedness — genuinely different (analytic) machinery, not covered by this finite-dimensional theorem. |
| infinite-dimensional, not closed | Decomposition and can both fail, as in the counterexample above. |
| Complex vs. real inner product space | All parts of the theorem hold verbatim; only bookkeeping of conjugates in computing changes. |
The mathematician behind it
Origins · 1 minErhard Schmidt and how this was discovered
Erhard Schmidt, a student of David Hilbert, was central to turning Hilbert's spectral theory into the geometric language of inner product spaces that we use today. Schmidt's 1907 paper on integral equations introduced what we now call the Gram–Schmidt process in a rigorous, general form, and with it the systematic use of orthonormal bases and orthogonal complements as tools rather than incidental curiosities. His work, alongside Hilbert's, established and spaces as genuine geometric objects: spaces where notions like "perpendicular subspace" and "distance to a subspace" make literal, provable sense. The finite-dimensional theorem in this article is the algebraic skeleton of ideas Schmidt developed in the infinite-dimensional, analytic setting of Hilbert space, where closedness of takes the place of finite-dimensionality as the hypothesis making true.
Is always a subspace, even if is not finite-dimensional or not even a subspace?
Yes, is always a subspace of , for any subset , not just subspaces. The proof only uses linearity of the inner product in one argument: if are each orthogonal to every element of , so is any linear combination , by bilinearity/sesquilinearity. Finite-dimensionality is never needed for this part. What does require finite-dimensionality (or completeness plus closedness) is the stronger claim that is a genuine complement, i.e. , and the double-complement identity .
Does hold if is infinite-dimensional?
Not in general, but it does hold under an extra hypothesis. If is a complete inner product space (a Hilbert space) and is a closed subspace, the projection theorem in functional analysis guarantees exactly as in the finite-dimensional case. Without completeness of or closedness of , the decomposition can fail entirely, as shown in the counterexample with polynomials, where collapsed to and .
How do you actually compute in practice?
If , then by linearity of the inner product, a vector is orthogonal to all of if and only if it is orthogonal to each spanning vector individually — you do not need to check infinitely many linear combinations. This reduces computing to solving the linear system for , exactly as done in the worked examples above, where the unknowns are the coordinates of .
Is the direct sum the same as saying is an algebraic complement of ?
It implies that is an algebraic complement (meaning and ), but it is a much stronger statement, because algebraic complements are never unique unless or . What singles out among all possible complements is the orthogonality condition coming from the inner product. This extra structure is exactly what makes the associated projection map a distance-minimizing projection, a property purely algebraic complements do not have.
Why does fail to be "obvious" even though is easy?
The inclusion follows almost immediately from the definitions: every is orthogonal to every by definition of , so automatically lies in . The reverse inclusion is subtler, because a priori could contain vectors outside that happen to be orthogonal to everything in without lying in . Ruling this out requires the dimension-counting argument: both and have the same finite dimension, so the containment must in fact be equality. This is exactly where finite-dimensionality (or completeness) enters essentially.
Does the theorem require , or does it also work over ?
The theorem holds verbatim for complex inner product spaces. The only place complex conjugation matters is in verifying details like when showing , and in solving the linear systems that define (Example 2 above illustrates this with ). Positive-definiteness of the inner product, which is what makes work, holds identically in both the real and complex settings.
What goes wrong if the inner product is only positive semi-definite, i.e. is allowed for some ?
The proof of uses positive-definiteness essentially: from we concluded . If the form is only semi-definite, there could be a nonzero "null vector" with that lies in both and , breaking the direct sum entirely. This is why the definition of inner product space insists on positive-definiteness, and why orthogonal complement theory does not directly generalize to indefinite forms like the Minkowski metric in special relativity without substantial modification.