Tutorials › Linear Algebra › Defining Orthogonal Complements

Orthogonal Complements and Projections · Tutorial 656 of 1000

Defining Orthogonal Complements

Learn to translate orthogonality to a subspace into equations and solve those equations to describe its orthogonal complement.

Intermediate 9 min read

What You'll Learn

  • Define the orthogonal complement of a subspace of real Euclidean space.
  • Reduce orthogonality to a span to dot products with its generators.
  • Compute the complement of a line in three-dimensional and four-dimensional space.
  • Compute the complement of planes in three-dimensional and four-dimensional space.
  • Check a proposed complement by substituting its vectors into the defining dot products.

Orthogonal to an Entire Subspace

Being orthogonal to one vector is a single dot-product condition. Being orthogonal to a subspace means meeting that condition for every vector in the subspace. The definition therefore appears to require checking many vectors, perhaps infinitely many. When the subspace is given by a finite spanning list, however, it is enough to check the vectors in that list. This turns the definition into a manageable system of equations.

Throughout, the scalar field is \(\mathbb{R}\), and the ambient space is \(\mathbb{R}^n\) with its standard dot product. For column vectors \(\mathbf{x}=(x_1,\dots,x_n)^\top\) and \(\mathbf{y}=(y_1,\dots,y_n)^\top\), this product is \(\mathbf{x}\cdot\mathbf{y}=x_1y_1+\cdots+x_ny_n\). Vectors are orthogonal when their dot product is zero. A subspace \(W\) is a subset of \(\mathbb{R}^n\) closed under vector addition and scalar multiplication; in particular, it contains \(\mathbf{0}\).

Definition: If \(W\) is a subspace of \(\mathbb{R}^n\), its orthogonal complement is the set $$ W^\perp=\{\mathbf{x}\in\mathbb{R}^n:\mathbf{x}\cdot\mathbf{w}=0\text{ for every }\mathbf{w}\in W\}. $$ Thus, membership in \(W^\perp\) requires orthogonality to every vector in \(W\), not just to one chosen vector.

A line through the origin is the span of one nonzero vector, and a plane through the origin in \(\mathbb{R}^n\) is the span of two linearly independent vectors. The phrase “through the origin” matters: these are subspaces, rather than shifted lines or planes. We will find their orthogonal complements by expressing the requirement in the definition as dot-product equations.

Checking Generators Is Enough

Theorem: Let \(W=\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_p\}\) be a subspace of \(\mathbb{R}^n\), where \(p\geq 1\). Then $$ W^\perp=\{\mathbf{x}\in\mathbb{R}^n:\mathbf{x}\cdot\mathbf{v}_j=0\text{ for }j=1,\dots,p\}. $$

Proof. Suppose first that \(\mathbf{x}\in W^\perp\). Each generator \(\mathbf{v}_j\) belongs to \(W\), so the definition of \(W^\perp\) gives \(\mathbf{x}\cdot\mathbf{v}_j=0\) for every \(j\). Conversely, suppose \(\mathbf{x}\cdot\mathbf{v}_j=0\) for every generator. An arbitrary \(\mathbf{w}\in W\) has the form \(\mathbf{w}=c_1\mathbf{v}_1+\cdots+c_p\mathbf{v}_p\) for real numbers \(c_1,\dots,c_p\). Distributivity of the dot product gives $$ \mathbf{x}\cdot\mathbf{w} =c_1(\mathbf{x}\cdot\mathbf{v}_1)+\cdots+c_p(\mathbf{x}\cdot\mathbf{v}_p)=0. $$ This holds for every \(\mathbf{w}\in W\), so \(\mathbf{x}\in W^\perp\). Both inclusions hold, proving the equality. \(\square\)

The theorem explains why a finite list of equations captures orthogonality to all of \(W\). It also gives the direct formulas for lines and planes: for a line, impose one dot-product equation; for a plane given by two generators, impose two. The equations may be dependent in some descriptions, so solve them rather than assuming that each equation contributes a new restriction.

Corollary: If \(W=\operatorname{span}\{\mathbf{u}\}\) for a nonzero \(\mathbf{u}\in\mathbb{R}^n\), then \(\mathbf{x}\in W^\perp\) exactly when \(\mathbf{x}\cdot\mathbf{u}=0\). If \(W=\operatorname{span}\{\mathbf{u},\mathbf{v}\}\), then \(\mathbf{x}\in W^\perp\) exactly when both \(\mathbf{x}\cdot\mathbf{u}=0\) and \(\mathbf{x}\cdot\mathbf{v}=0\).

Proof. In the line case the theorem applied to the one-element spanning list gives precisely the single stated equation. In the plane case apply it to the two-element spanning list to obtain the two stated equations. In each case the theorem proves not only that every vector in the complement satisfies the equations, but also that every solution of the equations is orthogonal to the whole span. \(\square\)

Finding the Complement of a Line

Worked Example: A Line in R³

Let \(W=\operatorname{span}\{\mathbf{u}\}\subseteq\mathbb{R}^3\), where \(\mathbf{u}=(2,-1,2)^\top\). Find \(W^\perp\).

Write a general vector as \(\mathbf{x}=(x_1,x_2,x_3)^\top\). Since the line is spanned by \(\mathbf{u}\), the line formula says to impose one equation: $$ \mathbf{x}\cdot\mathbf{u}=2x_1-x_2+2x_3=0. $$ Solving for \(x_2\) gives \(x_2=2x_1+2x_3\). Let \(x_1=s\) and \(x_3=t\), where \(s,t\in\mathbb{R}\). Then every solution is $$ \mathbf{x}=(s,2s+2t,t)^\top =s(1,2,0)^\top+t(0,2,1)^\top. $$ Therefore $$ W^\perp=\{s(1,2,0)^\top+t(0,2,1)^\top:s,t\in\mathbb{R}\}. $$

Check: The two displayed direction vectors each satisfy the defining equation: \(2(1)-2+2(0)=0\), and \(2(0)-2+2(1)=0\). More generally, for the displayed \(\mathbf{x}\), $$ \mathbf{x}\cdot\mathbf{u}=2s-(2s+2t)+2t=0. $$ Thus every vector in the proposed set is orthogonal to the generator, and hence to every scalar multiple of it. Conversely, solving the equation showed that every vector satisfying the definition has the displayed form.

This calculation uses the definition in two stages: first translate orthogonality into an equation, then describe all solutions of that equation. The parameters matter because the answer is a set of vectors, not just one example that happens to be orthogonal to the line.

Finding the Complement of a Plane

Worked Example: A Plane in R³

Let \(W=\operatorname{span}\{\mathbf{a},\mathbf{b}\}\subseteq\mathbb{R}^3\), where \(\mathbf{a}=(1,1,0)^\top\) and \(\mathbf{b}=(0,1,1)^\top\). These vectors are independent: if \(c\mathbf{a}+d\mathbf{b}=\mathbf{0}\), the first coordinate gives \(c=0\), and the third gives \(d=0\). Thus their span is a plane. Find its orthogonal complement.

Let \(\mathbf{x}=(x_1,x_2,x_3)^\top\). Orthogonality to both generators requires $$ \mathbf{x}\cdot\mathbf{a}=x_1+x_2=0,\qquad \mathbf{x}\cdot\mathbf{b}=x_2+x_3=0. $$ The first equation gives \(x_1=-x_2\), and the second gives \(x_3=-x_2\). Setting \(x_2=t\), every solution is \((-t,t,-t)^\top=t(-1,1,-1)^\top\). Hence $$ W^\perp=\{t(-1,1,-1)^\top:t\in\mathbb{R}\}. $$

Check: The proposed direction vector has dot product \((-1)+1+0=0\) with \(\mathbf{a}\), and \(0+1-1=0\) with \(\mathbf{b}\). For any \(\mathbf{w}=c\mathbf{a}+d\mathbf{b}\in W\), its dot product with \(t(-1,1,-1)^\top\) is \(c(0)+d(0)=0\). The two equations also show that there are no other solutions.

For a plane in \(\mathbb{R}^3\), these two independent equations often leave a one-parameter family of solutions, as they do here. The defining test remains the pair of dot products; the geometric appearance of the result does not replace that test.

Worked Example: A Plane in R⁴

Let \(W=\operatorname{span}\{\mathbf{a},\mathbf{b}\}\subseteq\mathbb{R}^4\), where \(\mathbf{a}=(1,1,0,0)^\top\) and \(\mathbf{b}=(0,1,1,1)^\top\). They are independent: the first coordinate of \(c\mathbf{a}+d\mathbf{b}=\mathbf{0}\) forces \(c=0\), and then the second forces \(d=0\). Find \(W^\perp\).

For \(\mathbf{x}=(x_1,x_2,x_3,x_4)^\top\), the two generator conditions are $$ \mathbf{x}\cdot\mathbf{a}=x_1+x_2=0,\qquad \mathbf{x}\cdot\mathbf{b}=x_2+x_3+x_4=0. $$ Set \(x_2=s\) and \(x_3=t\). The first equation gives \(x_1=-s\); the second gives \(x_4=-s-t\). Therefore $$ \mathbf{x}=(-s,s,t,-s-t)^\top =s(-1,1,0,-1)^\top+t(0,0,1,-1)^\top, $$ and $$ W^\perp=\{s(-1,1,0,-1)^\top+t(0,0,1,-1)^\top:s,t\in\mathbb{R}\}. $$

Check: The first direction vector has dot products \(-1+1=0\) with \(\mathbf{a}\) and \(1-1=0\) with \(\mathbf{b}\). The second has dot products \(0\) with \(\mathbf{a}\) and \(1-1=0\) with \(\mathbf{b}\). Therefore each of their linear combinations is orthogonal to both generators and to their span. The equations solved above show that every vector orthogonal to both generators has this form.

The same method works in any \(\mathbb{R}^n\). The number of coordinates determines the number of unknowns, while the chosen spanning vectors determine the dot-product equations. Keep the variables and equations visible: the solution description is justified only if it accounts for every solution.

Common Pitfall: Testing Only One Plane Generator

A vector orthogonal to one generator of a plane need not be orthogonal to the plane. For the plane spanned by \(\mathbf{a}=(1,1,0)^\top\) and \(\mathbf{b}=(0,1,1)^\top\), consider the tempting choice \(\mathbf{x}=(1,-1,0)^\top\). It passes the first test: $$ \mathbf{x}\cdot\mathbf{a}=1-1+0=0. $$ But it fails the second: $$ \mathbf{x}\cdot\mathbf{b}=0-1+0=-1\ne0. $$ So \(\mathbf{x}\notin W^\perp\). The correction is to impose both equations, not just the one that happens to hold. Solving both gives \(\mathbf{x}=t(-1,1,-1)^\top\), and substitution into each dot product verifies the corrected answer.

A second point to check is that a proposed plane description really uses two independent generators. If the two vectors are dependent, their span is a line (or, if both are zero, the zero subspace), not a plane. In either case the dot-product test with the listed generators still describes vectors orthogonal to their span, but the geometric label “plane” would be incorrect. State and check the spanning vectors before interpreting the result geometrically.

How to Organize a Calculation

1
Write the subspace as a span.
Record the vector or vectors that generate the line or plane, and confirm that two proposed plane generators are independent.
2
Translate orthogonality into equations.
Take the dot product of a general vector \(\mathbf{x}\in\mathbb{R}^n\) with each generator and set every result equal to zero.
3
Solve and parameterize.
Express the dependent coordinates in terms of free variables, then write the complete solution set.
4
Check against every generator.
Substitute the proposed vectors into all defining dot products. By the generator theorem, passing every test guarantees orthogonality to the whole span.

This approach matters because it connects a geometric condition—being perpendicular to a subspace—to explicit equations that can be solved and checked. It is also important to keep the scope of the definition exact: a vector belongs to \(W^\perp\) only if it is orthogonal to every vector in \(W\). Testing a spanning list is sufficient precisely because every vector in the subspace is a linear combination of that list.

Check Your Understanding

For each question, write the dot-product conditions before describing the solution set.

  1. If \(W=\operatorname{span}\{(1,0,2)^\top\}\subseteq\mathbb{R}^3\), what equation characterizes \(W^\perp\)?
  2. Find the orthogonal complement of the line spanned by \((1,1,1,1)^\top\) in \(\mathbb{R}^4\).
  3. For \(W=\operatorname{span}\{(1,0,1)^\top,(0,1,1)^\top\}\subseteq\mathbb{R}^3\), solve the two equations that characterize \(W^\perp\).
  4. Why is it sufficient to check dot products with a spanning list instead of checking every vector in the subspace?
  5. Give a vector orthogonal to \((1,1,0)^\top\) that is not orthogonal to the plane spanned by \((1,1,0)^\top\) and \((0,1,1)^\top\), and verify both dot products.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon