From Orthogonality to Equations
In \(\mathbb{R}^n\), a vector belongs to the orthogonal complement of a subspace \(W\) precisely when its dot product with every vector in \(W\) is zero. If \(W\) is given by a spanning list, it is enough to test the vectors in that list: dot products with all their linear combinations then vanish as well. This turns the problem into a homogeneous system of linear equations, which we can solve by row reduction.
Throughout this tutorial the scalars are real, vectors in \(\mathbb{R}^n\) are columns, and the inner product is the standard dot product \(\mathbf{u}\cdot\mathbf{v}=\mathbf{u}^{\top}\mathbf{v}\). A spanning list may contain redundant vectors; that affects the number of equations we begin with, but not the subspace they describe.
Suppose \(W=\operatorname{span}\{\mathbf{w}_1,\dots,\mathbf{w}_m\}\), where each \(\mathbf{w}_i\) is a column in \(\mathbb{R}^n\). To make each dot product an equation in the unknown column \(\mathbf{x}\), place the transposes of the spanning vectors in the rows of a matrix:
Then row \(i\) of \(\mathbf{A}\mathbf{x}\) is \(\mathbf{w}_i^{\top}\mathbf{x}=\mathbf{w}_i\cdot\mathbf{x}\). Equivalently, if the spanning vectors are placed as columns of a matrix \(\mathbf{B}\), then \(\mathbf{A}=\mathbf{B}^{\top}\), so the relevant null space is \(\operatorname{Nul}(\mathbf{B}^{\top})\), not generally \(\operatorname{Nul}\mathbf{B}\).
Proof. Let \(\mathbf{x}\in\mathbb{R}^n\). If \(\mathbf{x}\in W^{\perp}\), then \(\mathbf{x}\cdot\mathbf{w}_i=0\) for every generator \(\mathbf{w}_i\), since each generator belongs to \(W\). Thus every entry of \(\mathbf{A}\mathbf{x}\) is zero, so \(\mathbf{x}\in\operatorname{Nul}\mathbf{A}\). Conversely, suppose \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Then \(\mathbf{x}\cdot\mathbf{w}_i=0\) for each \(i\). Every \(\mathbf{w}\in W\) has the form \(\mathbf{w}=c_1\mathbf{w}_1+\cdots+c_m\mathbf{w}_m\) for real scalars \(c_i\). By linearity of the dot product in the second vector, \(\mathbf{x}\cdot\mathbf{w}=\sum_{i=1}^{m}c_i(\mathbf{x}\cdot\mathbf{w}_i)=0\). Therefore \(\mathbf{x}\in W^{\perp}\). Both inclusions hold, proving the equality. \(\square\)
How to Compute the Null Space
The theorem gives a direct procedure: create one equation for each spanning vector, row-reduce the coefficient matrix, and solve the resulting homogeneous system. Row operations are valid because each elementary row operation replaces the equations by an equivalent system. Swapping two rows only changes their order; multiplying a row by a nonzero scalar preserves its zero equation; and adding a multiple of one row to another replaces an equation by a combination that is reversible by subtracting the same multiple. Thus each operation preserves exactly the same solutions \(\mathbf{x}\).
If the vectors are columns \(\mathbf{w}_1,\dots,\mathbf{w}_m\), use the matrix with rows \(\mathbf{w}_i^{\top}\).
Use row operations to expose the independent equations and any free variables.
Express the solutions using free parameters, then verify that the resulting vectors have zero dot product with the generators.
Worked Example: A Plane in R³
Find the orthogonal complement of \(W=\operatorname{span}\{(1,2,0),(0,1,1)\}\subseteq\mathbb{R}^3\).
Use the two spanning vectors as rows and solve the associated homogeneous system:
Writing \(\mathbf{x}=(x,y,z)^{\top}\), the reduced system is \(x-2z=0\) and \(y+z=0\). Set the free variable \(z=t\). Then \(x=2t\) and \(y=-t\), so every solution is \(\mathbf{x}=t(2,-1,1)^{\top}\). Therefore \(W^{\perp}=\{t(2,-1,1)^{\top}:t\in\mathbb{R}\}\).
Check: \((2,-1,1)\cdot(1,2,0)=2-2+0=0\), and \((2,-1,1)\cdot(0,1,1)=0-1+1=0\). Every scalar multiple also has zero dot product with both generators.
Redundant Generators Give Redundant Equations
A spanning list need not be linearly independent. If one listed vector is a linear combination of the others, its row in the matrix gives an equation that follows from the other equations. Row reduction can reveal this as a zero row. The null space still describes the orthogonal complement because the theorem depends on the subspace spanned by the list, not on the number of listed vectors.
Proof. Let \(\mathbf{A}\) and \(\mathbf{C}\) be the row matrices formed from the two lists. Each list spans \(W\), so the theorem gives \(\operatorname{Nul}\mathbf{A}=W^{\perp}\) and \(\operatorname{Nul}\mathbf{C}=W^{\perp}\). Hence \(\operatorname{Nul}\mathbf{A}=\operatorname{Nul}\mathbf{C}\). More directly, a vector annihilated by the rows of either matrix is orthogonal to the listed generators, and therefore to every linear combination in \(W\). \(\square\)
Worked Example: A Redundant Spanning List
Find \(W^{\perp}\) when \(W\) is spanned by \((1,0,1)\), \((0,1,1)\), and \((1,1,2)\) in \(\mathbb{R}^3\). The third vector is the sum of the first two, so the list is redundant.
Form the row matrix. Subtract row 1 from row 3, then subtract row 2 from the new row 3:
The equations are \(x+z=0\) and \(y+z=0\). Set \(z=t\), which gives \(x=-t\) and \(y=-t\). Thus \(W^{\perp}=\{t(-1,-1,1)^{\top}:t\in\mathbb{R}\}\). The zero row records that the third equation added no new restriction.
Check: \((-1,-1,1)\cdot(1,0,1)=-1+1=0\), \((-1,-1,1)\cdot(0,1,1)=-1+1=0\), and \((-1,-1,1)\cdot(1,1,2)=-1-1+2=0\).
More Equations Than Independent Restrictions
When the matrix has more rows than its rank, the additional rows may reduce to zeros. Do not interpret the number of starting equations as the number of independent conditions. The free variables are determined by the reduced system, and each free variable supplies a parameter in the description of the null space.
Worked Example: A Complement in R⁴ with Two Parameters
Let \(W\subseteq\mathbb{R}^4\) be spanned by \((1,1,0,1)\), \((0,1,1,-1)\), and their sum \((1,2,1,0)\). Find \(W^{\perp}\).
Write the spanning vectors as rows. Subtract row 1 from row 3, then subtract row 2 from row 3. Finally, subtract row 2 from row 1 to clear the entry above the second pivot:
The equations are \(x-z+2w=0\) and \(y+z-w=0\). Let \(z=s\) and \(w=t\). Then \(x=s-2t\) and \(y=-s+t\), so all solutions are
Thus the orthogonal complement consists of all these linear combinations. The third listed generator creates no extra equation because it is the sum of the first two.
Check: The vector \((1,-1,1,0)\) has dot products \(1-1+0+0=0\) and \(0-1+1+0=0\) with the first two generators. The vector \((-2,1,0,1)\) has dot products \(-2+1+0+1=0\) and \(0+1+0-1=0\). Both are therefore orthogonal to the third generator as well, since it is their sum.
Common Mistakes and Boundary Cases
Putting the generators in columns and taking the wrong null space. For the first worked example, the matrix with generators as columns is \(\mathbf{B}=\begin{bmatrix}1&0\\2&1\\0&1\end{bmatrix}\). A tempting but wrong calculation is to ask for \(\operatorname{Nul}\mathbf{B}\); that solves \(\mathbf{B}\mathbf{c}=\mathbf{0}\) for coefficients on the generators, not for vectors orthogonal to them. The correction is to transpose: \(\mathbf{B}^{\top}\mathbf{x}=\mathbf{0}\), which is exactly the row system \(\mathbf{A}\mathbf{x}=\mathbf{0}\) used above.
The zero subspace is included. If \(W=\{\mathbf{0}\}\), then every vector is orthogonal to every element of \(W\), so \(W^{\perp}=\mathbb{R}^n\). One may represent this subspace by a list containing only the zero vector; its row in the matrix is a zero row, and the equation \(0=0\) imposes no restriction. At the other extreme, if a spanning list generates all of \(\mathbb{R}^n\), being orthogonal to every standard basis vector forces every coordinate of \(\mathbf{x}\) to be zero. In that case the complement is \(\{\mathbf{0}\}\).
For a practical check, substitute the parametrized solution into the original dot-product equations, not just the final reduced equations. That confirms both that the row setup matches the stated spanning vectors and that no sign error entered during row reduction.
Check Your Understanding
For each problem, form the row matrix, solve its homogeneous system, and check the result with dot products.
- Find the orthogonal complement of the subspace of \(\mathbb{R}^3\) spanned by \((1,1,0)\) and \((0,1,1)\).
- Find the orthogonal complement in \(\mathbb{R}^3\) of the span of \((1,2,1)\), \((2,4,2)\).
- Why does a zero row after row reduction indicate a redundant equation rather than an extra restriction on the solution?
- If the spanning vectors are columns of \(\mathbf{B}\), which null space should be computed to obtain the orthogonal complement, and why?
- Describe the orthogonal complement of \(W=\{\mathbf{0}\}\subseteq\mathbb{R}^n\).