Processing math: 89%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

4.10: Orthogonal Projections

( \newcommand{\kernel}{\mathrm{null}\,}\)

Learning Objectives
  • Find the orthogonal projection of a vector onto a subspace.
  • Find the orthogonal complement of a subspace.

In this section, we compute orthogonal projections of vectors onto subspaces.

An important use of the Gram-Schmidt Process is in orthogonal projections, the focus of this section.

You may recall that a subspace of Rn is a set of vectors which contains the zero vector, and is closed under addition and scalar multiplication. Let’s call such a subspace W. In particular, a plane in Rn which contains the origin, (0,0,,0), is a subspace of Rn.

Suppose a point Y in Rn is not contained in W, then what point Z in W is closest to Y? Using the Gram-Schmidt Process, we can find such a point. Let y,z represent the position vectors of the points Y and Z respectively, with yz representing the vector connecting the two points Y and Z. It will follow that if Z is the point on W closest to Y, then yz will be perpendicular to W (can you see why?); in other words, yz is orthogonal to W (and to every vector contained in W) as in the following diagram.

This diagram illustrates the concept of orthogonal projection of a vector onto a subspace.
Figure 4.10.1 This diagram illustrates the concept of orthogonal projection of a vector onto a subspace. It shows a vector y, a subspace W, and the orthogonal projection of y onto W, denoted as z. The diagram helps visualize the relationship between the vector, the subspace, and the projection. ( CC BY-NC-SA 4.0; Kuttler via A First Course in LINEAR ALGEBRA)

The vector z is called the orthogonal projection of y on W. The definition is given as follows.

Definition 4.10.1: Orthogonal Projection

Let W be a subspace of Rn, and Y be any point in Rn. Then the orthogonal projection of Y onto W is given by z=projW(y)=(yw1w12)w1+(yw2w22)w2++(ywmwm2)wm where {w1,w2,,wm} is any orthogonal basis of W.

Therefore, in order to find the orthogonal projection, we must first find an orthogonal basis for the subspace. Note that one could use an orthonormal basis, but it is not necessary in this case since as you can see above the normalization of each vector is included in the formula for the projection.

Before we explore this further through an example, we show that the orthogonal projection does indeed yield a point Z (the point whose position vector is the vector z above) which is the point of W closest to Y.

Theorem 4.10.1: Approximation Theorem

Let W be a subspace of Rn and Y any point in Rn. Let Z be the point whose position vector is the orthogonal projection of Y onto W.

Then, Z is the point in W closest to Y.

Proof

First Z is certainly a point in W since it is in the span of a basis of W.

To show that Z is the point in W closest to Y, we wish to show that |yz1|>|yz| for all z1zW. We begin by writing yz1=(yz)+(zz1). Now, the vector yz is orthogonal to W, and zz1 is contained in W. Therefore these vectors are orthogonal to each other. By the Pythagorean Theorem, we have that yz12=yz2+zz12>yz2 This follows because zz1 so zz12>0.

Hence, yz12>yz2. Taking the square root of each side, we obtain the desired result.

Consider the following example.

Example 4.10.1: Orthogonal Projection

Let W be the plane through the origin given by the equation x2y+z=0.
Find the point in W closest to the point Y=(1,0,3).

Solution

We must first find an orthogonal basis for W. Notice that W is characterized by all points (a,b,c) where c=2ba. In other words, W=[ab2ba]=a[101]+b[012],a,bR

We can thus write W as W=span{u1,u2}=span{[101],[012]}

Notice that this span is a basis of W as it is linearly independent. We will use the Gram-Schmidt Process to convert this to an orthogonal basis, {w1,w2}. In this case, as we remarked it is only necessary to find an orthogonal basis, and it is not required that it be orthonormal.

w1=u1=[101] w2=u2(u2w1w12)w1=[012](22)[101]=[012]+[101]=[111]

Therefore an orthogonal basis of W is {w1,w2}={[101],[111]}

We can now use this basis to find the orthogonal projection of the point Y=(1,0,3) on the subspace W. We will write the position vector y of Y as y=[103]. We compute the projection as follows: z=projW(y)=(yw1w12)w1+(yw2w22)w2=(22)[101]+(43)[111]=[134373]

Therefore the point Z on W closest to the point (1,0,3) is (13,43,73).

Recall that the vector yz is perpendicular (orthogonal) to all the vectors contained in the plane W. Using a basis for W, we can in fact find all such vectors which are perpendicular to W. We call this set of vectors the orthogonal complement of W and denote it W.

Definition 4.10.2: Orthogonal Complement

Let W be a subspace of Rn. Then the orthogonal complement of W, written W, is the set of all vectors x such that xz=0 for all vectors z in W. W={xRnsuch thatxz=0for allzW}

The orthogonal complement is defined as the set of all vectors which are orthogonal to all vectors in the original subspace. It turns out that it is sufficient that the vectors in the orthogonal complement be orthogonal to a spanning set of the original space.

Proposition 4.10.1: Orthogonal to Spanning Set

Let W be a subspace of Rn such that W=span{w1,w2,,wm}. Then W is the set of all vectors which are orthogonal to each wi in the spanning set.

The following proposition demonstrates that the orthogonal complement of a subspace is itself a subspace.

Proposition 4.10.2: The Orthogonal Complement

Let W be a subspace of Rn. Then the orthogonal complement W is also a subspace of Rn.

Consider the following proposition.

Proposition 4.10.3: Orthogonal Complement of Rn

The complement of Rn is the set containing the zero vector: (Rn)={0} Similarly, {0}=(Rn).

Proof

Here, 0 is the zero vector of Rn. Since x0=0 for all xRn, Rn{0}. Since {0}Rn, the equality follows, i.e., {0}=Rn.

Again, since x0=0 for all xRn, 0(Rn), so {0}(Rn). Suppose xRn, x0. Since xx=||x||2 and x0, xx0, so x(Rn). Therefore (Rn){0}, and thus (Rn)={0}.

In the next example, we will look at how to find W.

Example 4.10.2: Orthogonal Complement

Let W be the plane through the origin given by the equation x2y+z=0. Find a basis for the orthogonal complement of W.

Solution

From Example 4.10.1 we know that we can write W as W=span{u1,u2}=span{[101],[012]}

In order to find W, we need to find all x which are orthogonal to every vector in this span.

Let x=[x1x2x3]. In order to satisfy xu1=0, the following equation must hold. x1x3=0

In order to satisfy xu2=0, the following equation must hold. x2+2x3=0

Both of these equations must be satisfied, so we have the following system of equations. x1x3=0x2+2x3=0

To solve, set up the augmented matrix.

[10100120]

Using Gaussian Elimination, we find that W=span{[121]}, and hence {[121]} is a basis for W.

The following results summarize the important properties of the orthogonal projection.

Theorem 4.10.2: Orthogonal Projection

Let W be a subspace of Rn, Y be any point in Rn, and let Z be the point in W closest to Y. Then,

  1. The position vector z of the point Z is given by z=projW(y)
  2. zW and yzW
  3. |YZ|<|YZ1| for all Z1ZW

Consider the following example of this concept.

Example 4.10.3: Find a Vector Closest to a Given Vector

Let x1=[1010],x2=[1011],x3=[1100], and v=[4325]. We want to find the vector in W=span{x1,x2,x3} closest to y.

Solution

We will first use the Gram-Schmidt Process to construct the orthogonal basis, B, of W: B={[1010],[0001],[1210]}.

By Theorem 4.10.2, projU(v)=22[1010]+51[0001]+126[1210]=[3415] is the vector in U closest to y.

Consider the next example.

Example 4.10.4: Vector Written as a Sum of Two Vectors

Let W be a subspace given by W=span{[1010],[0102]}, and Y=(1,2,3,4).
Find the point Z in W closest to Y, and moreover write y as the sum of a vector in W and a vector in W.

Solution

From Theorem 4.10.3 the point Z in W closest to Y is given by z=projW(y).

Notice that since the above vectors already give an orthogonal basis for W, we have:

z=projW(y)=(yw1w12)w1+(yw2w22)w2=(42)[1010]+(105)[0102]=[2224]

Therefore the point in W closest to Y is Z=(2,2,2,4).
Now, we need to write y as the sum of a vector in W and a vector in W. This can easily be done as follows: y=z+(yz) since z is in W and as we have seen yz is in W.
The vector yz is given by yz=[1234][2224]=[1010] Therefore, we can write y as \left[ \begin{array}{c} 1 \\ 2 \\ 3 \\ 4 \end{array} \right] = \left[ \begin{array}{c} 2 \\ 2 \\ 2 \\ 4 \end{array} \right] + \left[ \begin{array}{r} -1 \\ 0 \\ 1 \\ 0 \end{array} \right]\nonumber

Example \PageIndex{5}: Point in a Plane Closest to a Given Point

Find the point Z in the plane 3x+y-2z=0 that is closest to the point Y=(1,1,1).

Solution

The solution will proceed as follows.

  1. Find a basis X of the subspace W of \mathbb{R}^3 defined by the equation 3x+y-2z=0.
  2. Orthogonalize the basis X to get an orthogonal basis B of W.
  3. Find the projection on W of the position vector of the point Y.

We now begin the solution.

  1. 3x+y-2z=0 is a system of one equation in three variables. Putting the augmented matrix in reduced row-echelon form: \left[\begin{array}{rrr|r} 3 & 1 & -2 & 0 \end{array}\right] \rightarrow \left[\begin{array}{rrr|r} 1 & \frac{1}{3} & -\frac{2}{3} & 0 \end{array}\right]\nonumber gives general solution x=\frac{1}{3}s+\frac{2}{3}t, y=s, z=t for any s,t\in\mathbb{R}. Then W=\mathrm{span} \left\{ \left[\begin{array}{r} -\frac{1}{3} \\ 1 \\ 0 \end{array}\right], \left[\begin{array}{r} \frac{2}{3} \\ 0 \\ 1 \end{array}\right]\right\}\nonumber Let X=\left\{ \left[\begin{array}{r} -1 \\ 3 \\ 0 \end{array}\right], \left[\begin{array}{r} 2 \\ 0 \\ 3 \end{array}\right]\right\}. Then X is linearly independent and \mathrm{span}(X)=W, so X is a basis of W.
  2. Use the Gram-Schmidt Process to get an orthogonal basis of W: \vec{f}_1=\left[\begin{array}{r} -1\\3\\0\end{array}\right]\mbox{ and }\vec{f}_2=\left[\begin{array}{r}2\\0\\3\end{array}\right]-\frac{-2}{10}\left[\begin{array}{r}-1\\3\\0\end{array}\right]=\frac{1}{5}\left[\begin{array}{r}9\\3\\15\end{array}\right].\nonumber Therefore B=\left\{\left[\begin{array}{r}-1\\3\\0\end{array}\right], \left[\begin{array}{r}3\\1\\5 \end{array}\right]\right\} is an orthogonal basis of W.
  3. To find the point Z on W closest to Y=(1,1,1), compute \begin{aligned} \mathrm{proj}_{W}\left[\begin{array}{r} 1 \\ 1 \\ 1 \end{array}\right] & = \frac{2}{10} \left[\begin{array}{r} -1 \\ 3 \\ 0 \end{array}\right] + \frac{9}{35}\left[\begin{array}{r} 3 \\ 1 \\ 5 \end{array}\right]\\ & = \frac{1}{7}\left[\begin{array}{r} 4 \\ 6 \\ 9 \end{array}\right].\end{aligned} Therefore, Z=\left( \frac{4}{7}, \frac{6}{7}, \frac{9}{7}\right).

4.10: Orthogonal Projections is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by LibreTexts.

Support Center

How can we help?