Tutorials › Linear Algebra › Projections Onto Orthogonal Complementary Subspaces

Orthogonal Complements and Projections · Tutorial 679 of 1000

Projections Onto Orthogonal Complementary Subspaces

See how complementary orthogonal projections decompose vectors and combine into the identity matrix.

Intermediate 10 min read

What You'll Learn

  • Define the orthogonal projections onto a subspace and its orthogonal complement.
  • Prove that every vector is the sum of its two orthogonal components.
  • Derive the matrix identities for complementary orthogonal projections.
  • Recognize when a symmetric idempotent matrix gives an orthogonal projection.
  • Compute and check complementary projections in concrete examples.

Splitting a Vector into Two Orthogonal Components

A projection onto a subspace keeps the component of a vector that lies in that subspace. The projection onto the subspace’s orthogonal complement keeps the part perpendicular to it. Together, these components recover the original vector: nothing is lost, and no component is counted twice. This gives a useful way to understand both the geometry of orthogonal projections and the matrix identities they satisfy.

Work first in a finite-dimensional real inner product space \(V\), and let \(W\) be a subspace of \(V\). Its orthogonal complement is \(W^\perp=\{\mathbf{z}\in V:\langle\mathbf{z},\mathbf{w}\rangle=0\text{ for every }\mathbf{w}\in W\}\). In \(\mathbb{R}^n\), the inner product is \(\langle\mathbf{x},\mathbf{y}\rangle=\mathbf{x}^{\top}\mathbf{y}\). A vector in \(W\) and a vector in \(W^\perp\) are orthogonal to one another.

Definition: The orthogonal projection of \(\mathbf{x}\in V\) onto \(W\), written \(\operatorname{proj}_W\mathbf{x}\), is the vector \(\mathbf{w}\in W\) for which \(\mathbf{x}-\mathbf{w}\in W^\perp\). The orthogonal projection onto \(W^\perp\) is defined in the same way, with \(W^\perp\) in place of \(W\). Thus each projection keeps the component in its target subspace and leaves a residual in the target’s orthogonal complement.

These projections are well-defined in finite-dimensional inner product spaces. For example, if \(\mathbf{e}_1,\dots,\mathbf{e}_k\) is an orthonormal basis of \(W\), then \(\operatorname{proj}_W\mathbf{x}=\sum_{i=1}^k\langle\mathbf{x},\mathbf{e}_i\rangle\mathbf{e}_i\). An orthonormal basis of \(W\) exists by applying Gram-Schmidt to a basis of \(W\). If \(W=\{\mathbf{0}\}\), the sum is empty and equals \(\mathbf{0}\). The defining property also makes the projection unique: two choices in \(W\) whose differences from \(\mathbf{x}\) lie in \(W^\perp\) would differ by a vector in both \(W\) and \(W^\perp\), and the only such vector is \(\mathbf{0}\).

Worked Example: Decomposing a Vector in R²

Let \(W=\operatorname{span}\{(1,1)^{\top}\}\) in \(\mathbb{R}^2\), and take \(\mathbf{x}=(3,1)^{\top}\). A unit vector spanning \(W\) is \(\mathbf{e}=(1,1)^{\top}/\sqrt{2}\). The projection formula gives

$$ \operatorname{proj}_W\mathbf{x} =(\mathbf{x}^{\top}\mathbf{e})\mathbf{e} =\left(\frac{4}{\sqrt{2}}\right)\frac{1}{\sqrt{2}} \begin{bmatrix}1\\1\end{bmatrix} =\begin{bmatrix}2\\2\end{bmatrix}. $$

The residual is \(\mathbf{x}-\operatorname{proj}_W\mathbf{x}=(1,-1)^{\top}\). Its dot product with \((1,1)^{\top}\) is \(1-1=0\), so it belongs to \(W^\perp\). Therefore \(\operatorname{proj}_{W^\perp}\mathbf{x}=(1,-1)^{\top}\), and the two parts sum to \((2,2)^{\top}+(1,-1)^{\top}=(3,1)^{\top}=\mathbf{x}\).

The Decomposition Theorem

Theorem (Orthogonal decomposition): Let \(V\) be a finite-dimensional real inner product space and \(W\) a subspace. Every \(\mathbf{x}\in V\) has a unique expression \(\mathbf{x}=\mathbf{w}+\mathbf{z}\), where \(\mathbf{w}\in W\) and \(\mathbf{z}\in W^\perp\). In particular, \(\operatorname{proj}_W\mathbf{x}=\mathbf{w}\), \(\operatorname{proj}_{W^\perp}\mathbf{x}=\mathbf{z}\), and \(\operatorname{proj}_W\mathbf{x}+\operatorname{proj}_{W^\perp}\mathbf{x}=\mathbf{x}\).

Proof. Choose an orthonormal basis \(\mathbf{e}_1,\dots,\mathbf{e}_k\) of \(W\), allowing \(k=0\) when \(W=\{\mathbf{0}\}\), and set \(\mathbf{w}=\sum_{i=1}^k\langle\mathbf{x},\mathbf{e}_i\rangle\mathbf{e}_i\) and \(\mathbf{z}=\mathbf{x}-\mathbf{w}\). The vector \(\mathbf{w}\) is in \(W\). For each basis vector \(\mathbf{e}_j\), orthonormality gives \(\langle\mathbf{z},\mathbf{e}_j\rangle=\langle\mathbf{x},\mathbf{e}_j\rangle-\sum_{i=1}^k\langle\mathbf{x},\mathbf{e}_i\rangle\langle\mathbf{e}_i,\mathbf{e}_j\rangle=0\). Every vector of \(W\) is a linear combination of the basis vectors, so \(\mathbf{z}\in W^\perp\). This constructs the required expression, including \(W=\{\mathbf{0}\}\), where \(\mathbf{w}=\mathbf{0}\). For uniqueness, suppose \(\mathbf{x}=\mathbf{w}_1+\mathbf{z}_1=\mathbf{w}_2+\mathbf{z}_2\) with \(\mathbf{w}_i\in W\) and \(\mathbf{z}_i\in W^\perp\). Then \(\mathbf{w}_1-\mathbf{w}_2=\mathbf{z}_2-\mathbf{z}_1\) belongs to both \(W\) and \(W^\perp\). A vector \(\mathbf{u}\) in both satisfies \(\langle\mathbf{u},\mathbf{u}\rangle=0\), so \(\mathbf{u}=\mathbf{0}\). Hence \(\mathbf{w}_1=\mathbf{w}_2\) and \(\mathbf{z}_1=\mathbf{z}_2\). The defining property of each projection now identifies the two components and proves their sum is \(\mathbf{x}\). \(\square\)

The theorem includes the extreme cases. If \(W=V\), then \(W^\perp=\{\mathbf{0}\}\), so the first projection is the identity and the second is zero. If \(W=\{\mathbf{0}\}\), the roles are reversed. For any other subspace, each vector is split uniquely between the two orthogonal parts.

Worked Example: Projecting onto a Plane and Its Normal Line

In \(\mathbb{R}^3\), let \(W\) be the plane perpendicular to \(\mathbf{n}=(1,-1,1)^{\top}\). Since \(\mathbf{n}^{\top}\mathbf{n}=3\), projection onto the line \(W^\perp=\operatorname{span}\{\mathbf{n}\}\) has matrix \(\mathbf{Q}=\frac13\mathbf{n}\mathbf{n}^{\top}\). The projection onto \(W\) is the identity minus this matrix:

$$ \mathbf{Q}=\frac13 \begin{bmatrix}1&-1&1\\-1&1&-1\\1&-1&1\end{bmatrix}, \qquad \mathbf{P}=\mathbf{I}_3-\mathbf{Q} =\frac13\begin{bmatrix}2&1&-1\\1&2&1\\-1&1&2\end{bmatrix}. $$

For \(\mathbf{x}=(1,2,0)^{\top}\), the scalar \(\mathbf{n}^{\top}\mathbf{x}\) is \(1-2+0=-1\), so

$$ \mathbf{Q}\mathbf{x}=\frac{-1}{3}\begin{bmatrix}1\\-1\\1\end{bmatrix} =\begin{bmatrix}-1/3\\1/3\\-1/3\end{bmatrix}, \qquad \mathbf{P}\mathbf{x}=\begin{bmatrix}4/3\\5/3\\1/3\end{bmatrix}. $$

The plane component is perpendicular to \(\mathbf{n}\), since \(4/3-5/3+1/3=0\), and the other component is a multiple of \(\mathbf{n}\). Adding them gives \((1,2,0)^{\top}\), as required. The matrices also satisfy \(\mathbf{P}+\mathbf{Q}=\mathbf{I}_3\): their numerators add to \(3\mathbf{I}_3\).

Matrix Identities for Complementary Projections

In \(\mathbb{R}^n\), a linear map is represented by a matrix acting on column vectors. Write \(\mathbf{P}\) for the matrix of \(\operatorname{proj}_W\) and \(\mathbf{Q}\) for the matrix of \(\operatorname{proj}_{W^\perp}\). The decomposition theorem says that their sum acts as the identity on every vector. Orthogonality adds further identities: projecting twice onto the same subspace changes nothing, and projecting onto one subspace then the other gives zero.

Theorem (Complementary orthogonal projection matrices): Let \(W\) be a subspace of \(\mathbb{R}^n\), and let \(\mathbf{P}\) and \(\mathbf{Q}\) be the matrices of the orthogonal projections onto \(W\) and \(W^\perp\), respectively. Then \(\mathbf{P}+\mathbf{Q}=\mathbf{I}_n\), \(\mathbf{P}^2=\mathbf{P}\), \(\mathbf{Q}^2=\mathbf{Q}\), \(\mathbf{P}^{\top}=\mathbf{P}\), \(\mathbf{Q}^{\top}=\mathbf{Q}\), and \(\mathbf{P}\mathbf{Q}=\mathbf{Q}\mathbf{P}=\mathbf{O}\).

Proof. For every \(\mathbf{x}\in\mathbb{R}^n\), the decomposition theorem gives \(\mathbf{P}\mathbf{x}+\mathbf{Q}\mathbf{x}=\mathbf{x}\), so \((\mathbf{P}+\mathbf{Q})\mathbf{x}=\mathbf{I}_n\mathbf{x}\) for every \(\mathbf{x}\), which implies \(\mathbf{P}+\mathbf{Q}=\mathbf{I}_n\). Since \(\mathbf{P}\mathbf{x}\in W\), projecting it onto \(W\) again leaves it unchanged; thus \(\mathbf{P}^2\mathbf{x}=\mathbf{P}\mathbf{x}\) for every \(\mathbf{x}\), and \(\mathbf{P}^2=\mathbf{P}\). The same argument gives \(\mathbf{Q}^2=\mathbf{Q}\). For symmetry, choose an orthonormal basis \(\mathbf{e}_1,\dots,\mathbf{e}_k\) of \(W\). The projection formula gives \(\mathbf{P}=\sum_{i=1}^k\mathbf{e}_i\mathbf{e}_i^{\top}\), a sum of symmetric matrices, so \(\mathbf{P}^{\top}=\mathbf{P}\). An orthonormal basis of \(W^\perp\) gives \(\mathbf{Q}^{\top}=\mathbf{Q}\) by the same formula. Finally, \(\mathbf{Q}\mathbf{x}\in W^\perp\), and the projection of that vector onto \(W\) is zero, so \(\mathbf{P}\mathbf{Q}\mathbf{x}=\mathbf{0}\). Also \(\mathbf{P}\mathbf{x}\in W\), whose projection onto \(W^\perp\) is zero, so \(\mathbf{Q}\mathbf{P}\mathbf{x}=\mathbf{0}\). These hold for every \(\mathbf{x}\), proving both product identities. \(\square\)

Conversely, a symmetric idempotent matrix determines an orthogonal projection. This gives a useful test when a projection matrix is supplied algebraically, without first being described geometrically.

Theorem: If \(\mathbf{P}\in\mathbb{R}^{n\times n}\) satisfies \(\mathbf{P}^{\top}=\mathbf{P}\) and \(\mathbf{P}^2=\mathbf{P}\), then \(\mathbf{P}\) is the matrix of the orthogonal projection onto its column space \(\operatorname{Col}\mathbf{P}\). The matrix \(\mathbf{I}_n-\mathbf{P}\) is the orthogonal projection onto \((\operatorname{Col}\mathbf{P})^\perp\).

Proof. For any \(\mathbf{x}\), \(\mathbf{P}\mathbf{x}\in\operatorname{Col}\mathbf{P}\), and \(\mathbf{x}-\mathbf{P}\mathbf{x}\) is orthogonal to every vector \(\mathbf{P}\mathbf{y}\in\operatorname{Col}\mathbf{P}\), because \(\langle\mathbf{x}-\mathbf{P}\mathbf{x},\mathbf{P}\mathbf{y}\rangle=((\mathbf{I}_n-\mathbf{P})\mathbf{x})^{\top}\mathbf{P}\mathbf{y}=\mathbf{x}^{\top}(\mathbf{P}-\mathbf{P}^2)\mathbf{y}=0\). Here symmetry gives \((\mathbf{I}_n-\mathbf{P})^{\top}=\mathbf{I}_n-\mathbf{P}\), and idempotence gives \(\mathbf{P}-\mathbf{P}^2=\mathbf{O}\). Thus \(\mathbf{P}\mathbf{x}\) has precisely the defining property of the orthogonal projection onto \(\operatorname{Col}\mathbf{P}\). The matrix \(\mathbf{I}_n-\mathbf{P}\) is also symmetric and idempotent, since \((\mathbf{I}_n-\mathbf{P})^2=\mathbf{I}_n-2\mathbf{P}+\mathbf{P}^2=\mathbf{I}_n-\mathbf{P}\). Its column space is \((\operatorname{Col}\mathbf{P})^\perp\): if \(\mathbf{z}=(\mathbf{I}_n-\mathbf{P})\mathbf{x}\), then \(\mathbf{P}\mathbf{z}=\mathbf{P}\mathbf{x}-\mathbf{P}^2\mathbf{x}=\mathbf{0}\), and for every \(\mathbf{y}\), \(\langle\mathbf{z},\mathbf{P}\mathbf{y}\rangle=0\) by the calculation above. Conversely, if \(\mathbf{z}\) is orthogonal to \(\operatorname{Col}\mathbf{P}\), then \(\mathbf{P}\mathbf{z}\in\operatorname{Col}\mathbf{P}\) and \(\langle\mathbf{z},\mathbf{P}\mathbf{z}\rangle=0\); symmetry and idempotence give \(\|\mathbf{P}\mathbf{z}\|^2=\mathbf{z}^{\top}\mathbf{P}^{\top}\mathbf{P}\mathbf{z}=\mathbf{z}^{\top}\mathbf{P}\mathbf{z}=0\), so \(\mathbf{P}\mathbf{z}=\mathbf{0}\) and \((\mathbf{I}_n-\mathbf{P})\mathbf{z}=\mathbf{z}\). This proves the asserted column space and projection. \(\square\)

Worked Example: Finding the Complementary Matrix

Let \(\mathbf{P}=\frac15\begin{bmatrix}1&2\\2&4\end{bmatrix}\), and take \(\mathbf{x}=(5,0)^{\top}\). The matrix is symmetric. Its square is

$$ \mathbf{P}^2 =\frac1{25}\begin{bmatrix}1&2\\2&4\end{bmatrix} \begin{bmatrix}1&2\\2&4\end{bmatrix} =\frac1{25}\begin{bmatrix}5&10\\10&20\end{bmatrix} =\mathbf{P}. $$

So \(\mathbf{P}\) is an orthogonal projection, and its complement is \(\mathbf{Q}=\mathbf{I}_2-\mathbf{P}=\frac15\begin{bmatrix}4&-2\\-2&1\end{bmatrix}\). The matrices add to the identity. Applying them to \(\mathbf{x}\) gives \(\mathbf{P}\mathbf{x}=(1,2)^{\top}\) and \(\mathbf{Q}\mathbf{x}=(4,-2)^{\top}\); these add to \((5,0)^{\top}\). Their product is zero, as direct multiplication confirms:

$$ \mathbf{P}\mathbf{Q} =\frac1{25}\begin{bmatrix}1&2\\2&4\end{bmatrix} \begin{bmatrix}4&-2\\-2&1\end{bmatrix} =\frac1{25}\begin{bmatrix}0&0\\0&0\end{bmatrix} =\mathbf{O}. $$

Also, \(\mathbf{Q}^2=\frac1{25}\begin{bmatrix}20&-10\\-10&5\end{bmatrix}=\mathbf{Q}\), so the complementary matrix is idempotent as well.

Common Mistake: The Complement Is Not the Transpose

For an orthogonal projection, the transpose is the matrix itself: \(\mathbf{P}^{\top}=\mathbf{P}\). A tempting but incorrect conclusion is that the projection onto the orthogonal complement is therefore \(\mathbf{P}^{\top}\). In the last example, this would set \(\mathbf{Q}=\mathbf{P}^{\top}=\mathbf{P}\). Then \(\mathbf{P}+\mathbf{Q}=2\mathbf{P}=\frac25\begin{bmatrix}1&2\\2&4\end{bmatrix}\), which is not \(\mathbf{I}_2\). Applied to \((5,0)^{\top}\), this incorrect choice gives \(\mathbf{P}\mathbf{x}+\mathbf{Q}\mathbf{x}=(2,4)^{\top}\), not \((5,0)^{\top}\). The correction is \(\mathbf{Q}=\mathbf{I}_2-\mathbf{P}\). The transpose identity describes symmetry of each orthogonal projection matrix; subtraction from the identity constructs the complementary projection.

The identities are useful checks in computations. If two proposed matrices are complementary orthogonal projections, each should be symmetric and idempotent, their sum should be the identity, and their products in either order should be zero. A failed check points to a mistake in a formula or in the proposed subspaces. Conversely, the symmetric-idempotent criterion lets a matrix identify its projected subspace as its column space.

Check Your Understanding

Use the decomposition theorem and matrix identities to justify each answer.

  1. If \(W=\{\mathbf{0}\}\) in \(\mathbb{R}^n\), what are the matrices of the projections onto \(W\) and \(W^\perp\)?
  2. For the plane perpendicular to \((1,-1,1)^{\top}\) in \(\mathbb{R}^3\), explain why \(\mathbf{P}+\mathbf{Q}=\mathbf{I}_3\).
  3. Suppose \(\mathbf{P}\) is symmetric and idempotent. Which subspace does it project onto?
  4. Show that if \(\mathbf{P}\) and \(\mathbf{Q}\) project onto orthogonal complementary subspaces, then \(\mathbf{P}\mathbf{Q}=\mathbf{O}\).
  5. For \(\mathbf{P}=\frac15\begin{bmatrix}1&2\\2&4\end{bmatrix}\), find \((\mathbf{I}_2-\mathbf{P})(1,2)^{\top}\) and check that it is orthogonal to \(\operatorname{Col}\mathbf{P}\).

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