The Orthogonal Decomposition Problem
Given a subspace \(W\) and a vector \(\mathbf{v}\), we want to separate the part of \(\mathbf{v}\) that belongs to \(W\) from the part that is perpendicular to \(W\). The Orthogonal Decomposition Theorem says this can always be done when the ambient inner product space is finite-dimensional. Its proof is constructive: choose an orthonormal basis for \(W\), use the inner products with those basis vectors to build a vector \(\mathbf{w}\in W\), and show that the remainder \(\mathbf{z}=\mathbf{v}-\mathbf{w}\) is orthogonal to all of \(W\).
Let \(V\) be a finite-dimensional inner product space over \(\mathbb{F}\), where \(\mathbb{F}=\mathbb{R}\) or \(\mathbb{C}\), and let \(W\) be a subspace of \(V\). The orthogonal complement of \(W\) is \(\displaystyle W^\perp=\{\mathbf{z}\in V:\langle\mathbf{z},\mathbf{x}\rangle=0\text{ for every }\mathbf{x}\in W\}\). The inner product is linear in its first slot and conjugate-linear in its second slot over \(\mathbb{C}\). Over \(\mathbb{R}\), the conjugation does not change scalars. A list \((\mathbf{q}_1,\dots,\mathbf{q_k})\) is an orthonormal basis of \(W\) if it is a basis of \(W\) and \(\langle\mathbf{q}_i,\mathbf{q}_j\rangle=1\) when \(i=j\), and \(0\) otherwise. A finite-dimensional subspace has such a basis, by applying Gram–Schmidt to a basis of the subspace. When \(W=\{\mathbf{0}\}\), its basis is the empty list.
Proof. First suppose \(W\ne\{\mathbf{0}\}\), and choose an orthonormal basis \((\mathbf{q}_1,\dots,\mathbf{q}_k)\). Define \(\mathbf{w}\) and \(\mathbf{z}\) by the displayed formulas. Each scalar \(\langle\mathbf{v},\mathbf{q}_i\rangle\) belongs to \(\mathbb{F}\), so \(\mathbf{w}\) is a linear combination of the basis vectors and hence belongs to \(W\). Also \(\mathbf{v}=\mathbf{w}+\mathbf{z}\) by the definition of \(\mathbf{z}\).
To show that \(\mathbf{z}\in W^\perp\), take any basis vector \(\mathbf{q}_j\), where \(1\le j\le k\). Linearity in the first slot and orthonormality give $$ \langle\mathbf{z},\mathbf{q}_j\rangle =\langle\mathbf{v},\mathbf{q}_j\rangle -\sum_{i=1}^{k}\langle\mathbf{v},\mathbf{q}_i\rangle \langle\mathbf{q}_i,\mathbf{q}_j\rangle =\langle\mathbf{v},\mathbf{q}_j\rangle-\langle\mathbf{v},\mathbf{q}_j\rangle =0. $$ Now let \(\mathbf{x}\) be any vector in \(W\). Since the \(\mathbf{q}_i\) form a basis, there are scalars \(a_1,\dots,a_k\) such that \(\mathbf{x}=\sum_{j=1}^{k}a_j\mathbf{q}_j\). Conjugate-linearity in the second slot yields \(\langle\mathbf{z},\mathbf{x}\rangle=\sum_{j=1}^{k}\overline{a_j}\langle\mathbf{z},\mathbf{q}_j\rangle=0\). Thus \(\mathbf{z}\in W^\perp\).
For uniqueness, suppose \(\mathbf{v}=\mathbf{w}_1+\mathbf{z}_1=\mathbf{w}_2+\mathbf{z}_2\), with \(\mathbf{w}_1,\mathbf{w}_2\in W\) and \(\mathbf{z}_1,\mathbf{z}_2\in W^\perp\). Subtracting gives \(\mathbf{w}_1-\mathbf{w}_2=\mathbf{z}_2-\mathbf{z}_1\). The left side belongs to \(W\), and the right side belongs to \(W^\perp\), so their common value \(\mathbf{d}\) belongs to both. Because \(\mathbf{d}\in W^\perp\) and \(\mathbf{d}\in W\), \(\langle\mathbf{d},\mathbf{d}\rangle=0\). Positive definiteness of the inner product implies \(\mathbf{d}=\mathbf{0}\), giving \(\mathbf{w}_1=\mathbf{w}_2\) and \(\mathbf{z}_1=\mathbf{z}_2\).
If \(W=\{\mathbf{0}\}\), choose \(\mathbf{w}=\mathbf{0}\) and \(\mathbf{z}=\mathbf{v}\). Every vector is orthogonal to \(\mathbf{0}\), so \(\mathbf{z}\in W^\perp\). Any decomposition with its first part in \(W\) must have first part \(\mathbf{0}\), and then its second part must be \(\mathbf{v}\). This proves existence and uniqueness in the remaining case. \(\square\)
Reading the Construction
Each term in the formula for \(\mathbf{w}\) is the contribution along one unit basis vector \(\mathbf{q}_i\). The scalar \(\langle\mathbf{v},\mathbf{q}_i\rangle\) measures the corresponding coefficient. Subtracting all of these contributions removes from \(\mathbf{v}\) the part represented by the basis of \(W\). The proof above checks the essential point: the remainder is orthogonal to each basis vector, and therefore to every linear combination of them.
Proof. Write \(\mathbf{w}=\sum_{j=1}^{k}c_j\mathbf{q}_j\). For each \(i\), orthonormality and linearity in the first slot give \(\langle\mathbf{w},\mathbf{q}_i\rangle=\sum_{j=1}^{k}c_j\langle\mathbf{q}_j,\mathbf{q}_i\rangle=c_i\). Since \(\mathbf{z}\in W^\perp\), \(\langle\mathbf{z},\mathbf{q}_i\rangle=0\). Therefore \(\langle\mathbf{v},\mathbf{q}_i\rangle=\langle\mathbf{w}+\mathbf{z},\mathbf{q}_i\rangle=c_i+0=c_i\). This determines each coefficient, as claimed. \(\square\)
Worked Example: A Plane in R³
Let \(W\) be spanned by \(\mathbf{q}_1=\frac{1}{\sqrt{2}}\begin{bmatrix}1\\1\\0\end{bmatrix}\) and \(\mathbf{q}_2=\frac{1}{\sqrt{6}}\begin{bmatrix}1\\-1\\2\end{bmatrix}\), and decompose \(\mathbf{v}=\begin{bmatrix}2\\1\\3\end{bmatrix}\).
First check that the given basis is orthonormal. The squared lengths are \((1^2+1^2+0^2)/2=1\) and \((1^2+(-1)^2+2^2)/6=1\). Their inner product is \((1-1+0)/\sqrt{12}=0\). The theorem therefore applies. The two coefficients are \(\langle\mathbf{v},\mathbf{q}_1\rangle=(2+1)/\sqrt{2}=3/\sqrt{2}\) and \(\langle\mathbf{v},\mathbf{q}_2\rangle=(2-1+6)/\sqrt{6}=7/\sqrt{6}\). Hence
Check: Adding the parts gives \(\begin{bmatrix}8/3\\1/3\\7/3\end{bmatrix}+\begin{bmatrix}-2/3\\2/3\\2/3\end{bmatrix}=\begin{bmatrix}2\\1\\3\end{bmatrix}=\mathbf{v}\). Also, \(\langle\mathbf{z},\mathbf{q}_1\rangle=(-2/3+2/3)/\sqrt{2}=0\), and \(\langle\mathbf{z},\mathbf{q}_2\rangle=(-2/3-2/3+4/3)/\sqrt{6}=0\). Since the two basis vectors span \(W\), these checks establish that \(\mathbf{z}\in W^\perp\).
Worked Example: Constants in a Polynomial Space
Consider \(V=P_1(\mathbb{R})\), the space of real polynomials of degree at most one, with inner product \(\langle f,g\rangle=\int_0^1 f(t)g(t)\,dt\). Let \(W\) be the subspace of constant polynomials and take \(v(t)=t\). The polynomial \(q(t)=1\) is a unit vector because \(\langle q,q\rangle=\int_0^1 1\,dt=1\), so it is an orthonormal basis of \(W\).
The coefficient along \(q\) is \(\langle v,q\rangle=\int_0^1 t\,dt=[t^2/2]_0^1=1/2\). Thus \(w(t)=1/2\) and \(z(t)=t-1/2\). The sum is \(w(t)+z(t)=1/2+t-1/2=t\), as required.
Check: For any constant polynomial \(c\), the inner product with the remainder is \(\langle z,c\rangle=\int_0^1(t-1/2)c\,dt =c[t^2/2-t/2]_0^1=c(1/2-1/2)=0\). Therefore \(z\) is orthogonal to every member of \(W\), not just to the chosen basis vector.
Consequences and a Useful Check
The theorem says that every vector in \(V\) is a sum of a vector in \(W\) and a vector in \(W^\perp\). The uniqueness proof also shows that the only vector shared by \(W\) and \(W^\perp\) is \(\mathbf{0}\). Together, these statements are expressed by \(V=W\oplus W^\perp\): every vector is a sum from the two subspaces, and that expression is unique.
Proof. By definition, \(\|\mathbf{v}\|^2=\langle\mathbf{v},\mathbf{v}\rangle\). Substitute \(\mathbf{v}=\mathbf{w}+\mathbf{z}\) and expand: \(\langle\mathbf{v},\mathbf{v}\rangle =\langle\mathbf{w},\mathbf{w}\rangle+\langle\mathbf{w},\mathbf{z}\rangle+\langle\mathbf{z},\mathbf{w}\rangle+\langle\mathbf{z},\mathbf{z}\rangle\). Because \(\mathbf{z}\in W^\perp\) and \(\mathbf{w}\in W\), \(\langle\mathbf{z},\mathbf{w}\rangle=0\). Conjugate symmetry of the inner product gives \(\langle\mathbf{w},\mathbf{z}\rangle=\overline{\langle\mathbf{z},\mathbf{w}\rangle}=0\) as well. The remaining terms are \(\|\mathbf{w}\|^2+\|\mathbf{z}\|^2\), proving the identity. \(\square\)
This identity is a check on a proposed decomposition: once the parts are known to be orthogonal, the squared length of the original vector must equal the sum of their squared lengths. It does not replace checking that \(\mathbf{w}\in W\) and \(\mathbf{z}\in W^\perp\); both membership conditions are part of the theorem.
Common Pitfall: The Order of the Inner Product Matters
Over \(\mathbb{R}\), \(\langle\mathbf{v},\mathbf{q}\rangle\) and \(\langle\mathbf{q},\mathbf{v}\rangle\) are equal. Over \(\mathbb{C}\), they are complex conjugates, so using the reversed order can change the coefficient in the construction. For example, let \(V=\mathbb{C}\), with \(\langle x,y\rangle=x\overline{y}\), let \(W=V\), and choose the orthonormal basis \(q=1\). For \(v=i\), the correct coefficient is \(\langle i,1\rangle=i\), giving \(w=i\) and \(z=0\).
A wrong calculation reverses the slots and uses \(\langle 1,i\rangle=1\cdot\overline{i}=-i\) as the coefficient. It would give \(w=-i\) and \(z=i-(-i)=2i\). But \(z\notin W^\perp\): indeed \(\langle 2i,1\rangle=2i\ne0\), since \(W=\mathbb{C}\). The correction is to use the coefficient \(\langle v,q\rangle\), in that order, for the convention that is linear in the first slot.
Check Your Understanding
For each question, use the theorem’s two membership conditions: the first part must lie in \(W\), and the remainder must lie in \(W^\perp\).
- For an orthonormal basis \((\mathbf{q}_1,\mathbf{q}_2)\) of \(W\), write the theorem’s formulas for \(\mathbf{w}\) and \(\mathbf{z}\).
- Explain why showing that \(\mathbf{z}\) is orthogonal to every basis vector of \(W\) proves \(\mathbf{z}\in W^\perp\).
- Prove that if a vector belongs to both \(W\) and \(W^\perp\), then it is \(\mathbf{0}\).
- In \(P_1(\mathbb{R})\) with \(\langle f,g\rangle=\int_0^1 f(t)g(t)\,dt\), decompose \(v(t)=2t\) relative to the subspace of constant polynomials.
- For a complex inner product linear in the first slot, why can \(\langle q,v\rangle\) fail to give the correct coefficient of \(q\) in the decomposition?