|
| 1 | +\documentclass{ximera} |
| 2 | +\input{../preamble.tex} |
| 3 | +\title{Orthogonal Projections} \license{CC BY-NC-SA 4.0} |
| 4 | + |
| 5 | +\begin{document} |
| 6 | +\begin{abstract} |
| 7 | + \end{abstract} |
| 8 | +\maketitle |
| 9 | + |
| 10 | +\begin{onlineOnly} |
| 11 | +\section*{Orthogonal Projections} |
| 12 | +\end{onlineOnly} |
| 13 | + |
| 14 | +Given a line $l$ and a vector $\vec{v}$ emanating from a point on $l$, it is sometimes convenient to express $\vec{v}$ as the sum of a vector $\vec{v}_{\parallel}$, parallel to $l$, and a vector $\vec{v}_{\perp}$, perpendicular to $l$. If you have taken a physics course, you may have seen a force vector decomposed into the sum of two components: one parallel and one perpendicular to the direction of motion. |
| 15 | + |
| 16 | +\begin{center} |
| 17 | + \begin{tikzpicture}[scale=.8] |
| 18 | + \draw[line width=2pt,red,-stealth](3.6, 0.8)--(2,4); |
| 19 | + \node[red] at (3.5, 2.2) (a) {$\vec{v}_{\perp}$}; |
| 20 | + \node[red] at (1.5, -0.95) (b) {$\vec{v}_{\parallel}$}; |
| 21 | + \node[] at (5, 1) (c) {$l$}; |
| 22 | + \node[blue] at (-0.8, 1.9) (d) {$\vec{v}=\vec{v}_{\perp}+\vec{v}_{\parallel}$}; |
| 23 | + \draw [-,line width=1pt] (-3,-2.5)--(5, 1.5); |
| 24 | +\draw[line width=2pt,blue,-stealth](-2, -2)--(2,4); |
| 25 | +\draw[line width=2pt,red,-stealth](-2, -2)--(3.6, 0.8); |
| 26 | +\end{tikzpicture} |
| 27 | + |
| 28 | +\end{center} |
| 29 | + |
| 30 | +Suppose $\vec{d}$ is a direction vector for $l$. Then $\vec{v}_ |
| 31 | +{\parallel}=k\vec{d}$ for some scalar $k$. Our goal is to find $k$. |
| 32 | +\begin{align*}\vec{v}\dotp\vec{d}&=(\vec{v}_{\parallel}+\vec{v}_{\perp})\dotp\vec{d}\\ |
| 33 | +&=(k\vec{d}+\vec{v}_{\perp})\dotp\vec{d}\\ |
| 34 | +&=k\vec{d}\dotp\vec{d}+\vec{v}_{\perp}\dotp\vec{d}\\ |
| 35 | +&=k\norm{\vec{d}}^2+0\\ |
| 36 | +&=k\norm{\vec{d}}^2 |
| 37 | +\end{align*} |
| 38 | +We conclude that $$k=\frac{\vec{v}\dotp\vec{d}}{\norm{\vec{d}}^2}$$ |
| 39 | +and $$\vec{v}_{\parallel}=k\vec{d}=\left(\frac{\vec{v}\dotp\vec{d}}{\norm{\vec{d}}^2}\right)\vec{d}$$ |
| 40 | + |
| 41 | +The vector $\vec{v}_{\parallel}=\left(\frac{\vec{v}\dotp\vec{d}}{\norm{\vec{d}}^2}\right)\vec{d}$ is called the \dfn{projection of $\vec{v}$ onto $\vec{d}$}. In our discussion, $\vec{d}$ is a direction vector for line $l$. So, we can also say that $\vec{v}_{\parallel}$ is the \dfn{projection of $\vec{v}$ onto $l$}. |
| 42 | + |
| 43 | +To find $\vec{v}_{\perp}$, observe that $\vec{v}_{\perp}=\vec{v}-\vec{v}_{\parallel}$. |
| 44 | + |
| 45 | + |
| 46 | +\begin{definition}\label{def:projection} |
| 47 | +Let $\vec{v}$ be a vector, and let $\vec{d}$ be a non-zero vector. The \dfn{projection of $\vec{v}$ onto $\vec{d}$} is given by |
| 48 | +$$\mbox{proj}_{\vec{d}}\vec{v}=\left(\frac{\vec{v}\dotp\vec{d}}{\norm{\vec{d}}^2}\right)\vec{d}$$ |
| 49 | +\end{definition} |
| 50 | + |
| 51 | +\begin{example}\label{ex:projection1} |
| 52 | +Find the projection of $\vec{v}$, shown below, onto the line given by $y=\frac{1}{2}x-1$. |
| 53 | + |
| 54 | +\begin{center} |
| 55 | +\begin{tikzpicture}[scale=.7] |
| 56 | + |
| 57 | +\draw[thin,gray!40] (-3,-3) grid (5,5); |
| 58 | + \draw[<->] (-3,0)--(5,0); |
| 59 | + \draw[<->] (0,-3)--(0,5); |
| 60 | + \draw[red, dashed] (2,4)--(3.6, 0.8); |
| 61 | + \draw [-,line width=1pt] (-3,-2.5)--(5, 1.5); |
| 62 | +\draw[line width=2pt,blue,-stealth](-2, -2)--(2,4); |
| 63 | +\draw[line width=2pt,red,-stealth](-2, -2)--(3.6, 0.8); |
| 64 | +\node[blue] at (-0.5, 1.5) (a) {$\vec{v}$}; |
| 65 | +\node[red] at (1.9, -0.9) (b) {$\vec{v}_{\parallel}$}; |
| 66 | +\end{tikzpicture} |
| 67 | +\end{center} |
| 68 | + |
| 69 | +\begin{explanation} |
| 70 | +We begin by finding vectors $\vec{v}$ and $\vec{d}$. The tail of $\vec{v}$ is located at $(-2, -2)$, and the head of $\vec{v}$ is at $(2, 4)$. Using the ``head-tail" formula we get |
| 71 | +$$\vec{v}=\begin{bmatrix}2-(-2)\\4-(-2)\end{bmatrix}=\begin{bmatrix}4\\6\end{bmatrix}$$ The direction vector for the line $y=\frac{1}{2}x-1$ is $$\vec{d}=\begin{bmatrix}2\\1\end{bmatrix}$$ |
| 72 | +We find that $\vec{v}\dotp\vec{d}=14$ and $\norm{\vec{d}}^2=5$. |
| 73 | +Thus $$\mbox{proj}_{\vec{d}}\vec{v}=\left(\frac{\vec{v}\dotp\vec{d}}{\norm{\vec{d}}^2}\right)\vec{d}=\frac{14}{5}\begin{bmatrix}2\\1\end{bmatrix}=\begin{bmatrix}28/5\\14/5\end{bmatrix}$$ |
| 74 | +\end{explanation} |
| 75 | +\end{example} |
| 76 | + |
| 77 | +\subsection*{A Visual Guide to Creating an Orthogonal Basis} |
| 78 | +Given an arbitrary basis $\{\vec{v}_1, \vec{v}_2\}$ of $\RR^2$, let's start building our orthogonal basis, $\{\vec{f}_1, \vec{f}_2\}$, by setting $\vec{f}_1 = \vec{v}_1$. To find the next element of our orthogonal basis, consider the orthogonal projection of $\vec{v}_2$ onto $\vec{f}_1$. (See the figure below.) |
| 79 | +\begin{center} |
| 80 | +\begin{tikzpicture}[scale=1.2] |
| 81 | + \draw[<->] (-1,0)--(5,0); |
| 82 | + \draw[<->] (0,-1)--(0,5); |
| 83 | + \draw[line width=6pt,-stealth, black!20!white](0,0)--(2,4); |
| 84 | +\draw[line width=2pt,red,-stealth](0,0)--(1,2); |
| 85 | +\draw[line width=2pt,blue,-stealth](0,0)--(4,3); |
| 86 | +\draw[line width=2pt,-stealth](2,4)--(4,3); |
| 87 | +\node[] at (0.7, 2.8) (p2) {$\mbox{proj}_{\vec{f}_1}\vec{v}_2$}; |
| 88 | +\node[] at (3.9, 3.8) (p2) {$\vec{f}_2=\vec{v}_2-\mbox{proj}_{\vec{f}_1}\vec{v}_2$}; |
| 89 | +\node[red] at (-0.1, 1) (p2) {$\vec{v}_1=\vec{f}_1$}; |
| 90 | +\node[blue] at (2, 1.2) (p2) {$\vec{v}_2$}; |
| 91 | +%\draw[line width=2pt,-stealth](0,0)--(2,-1); |
| 92 | +%\node[] at (1.1, -0.3) (p2) {$\vec{f}_2$}; |
| 93 | + \end{tikzpicture} |
| 94 | + \quad\quad |
| 95 | +\begin{tikzpicture}[scale=1.2] |
| 96 | + \draw[<->] (-1,0)--(5,0); |
| 97 | + \draw[<->] (0,-1)--(0,5); |
| 98 | +% \draw[line width=6pt,-stealth, black!20!white](0,0)--(2,4); |
| 99 | +\draw[line width=2pt,red,-stealth](0,0)--(1,2); |
| 100 | +%\draw[line width=2pt,blue,-stealth](0,0)--(4,3); |
| 101 | +%\draw[line width=2pt,-stealth](2,4)--(4,3); |
| 102 | +%\node[] at (0.7, 2.8) (p2) {$\mbox{proj}_{\vec{v}_1}\vec{v}_2$}; |
| 103 | +%\node[] at (3.9, 3.8) (p2) {$\vec{f}_2=\vec{v}_2-\mbox{proj}_{\vec{f}_1}\vec{v}_2$}; |
| 104 | +\node[red] at (0.2, 1) (p2) {$\vec{f}_1$}; |
| 105 | +%\node[blue] at (2, 1.2) (p2) {$\vec{v}_2$}; |
| 106 | +\draw[line width=2pt,-stealth](0,0)--(2,-1); |
| 107 | +\node[] at (1.1, -0.3) (p2) {$\vec{f}_2$}; |
| 108 | + \end{tikzpicture} |
| 109 | +\end{center} |
| 110 | +Next, let $\vec{f}_2=\vec{v}_2-\mbox{proj}_{\vec{f}_1}\vec{v}_2$. Observe that $\vec{f}_2$ is orthogonal to $\vec{f}_1$ (See Theorem \ref{th:orthDecompX} of \href{https://ximera.osu.edu/linearalgebradzv3/LinearAlgebraInteractiveIntro/RTH-0010/main}{Orthogonality and Projections}). This gives us an orthogonal collection $\mathcal{B}=\{\vec{f}_1,\vec{f}_2\}$. It is intuitively clear that $\vec{f}_1$ and $\vec{f}_2$ are linearly independent. Therefore $\mathcal{B}$ is an orthogonal basis of $\RR^2$. |
| 111 | + |
| 112 | +The following exploration illustrates this process dynamically. |
| 113 | + |
| 114 | +\begin{exploration}\label{exp:orth1} |
| 115 | +Choose an arbitrary basis $\{\vec{v}_1, \vec{v}_2\}$ of $\RR^2$ by dragging the tips of vectors $\vec{v}_1$ and $\vec{v}_2$ to desired positions. Use the navigation bar at the bottom of the interactive window to go through the steps of constructing an orthogonal basis of $\RR^2$. |
| 116 | + |
| 117 | +\pdfOnly{ |
| 118 | +Access GeoGebra interactives through the online version of this text at |
| 119 | + |
| 120 | +\href{https://ximera.osu.edu/linearalgebradzv3/LinearAlgebraInteractiveIntro}{https://ximera.osu.edu/linearalgebradzv3/LinearAlgebraInteractiveIntro}. |
| 121 | +} |
| 122 | + |
| 123 | +\begin{onlineOnly} |
| 124 | +\begin{center} |
| 125 | +\geogebra{xtqppyav}{800}{600} |
| 126 | +\end{center} |
| 127 | +\end{onlineOnly} |
| 128 | +\end{exploration} |
| 129 | + |
| 130 | +We can apply this process to any two-dimensional subset of $\RR^n$. The following exploration will guide you through the process of constructing an orthogonal basis for a plane spanned by two arbitrary vectors in $\RR^3$. |
| 131 | + |
| 132 | +\begin{exploration}\label{exp:orth2} |
| 133 | +Let $W =\mbox{span}\left({\bf v}_1,{\bf v}_2\right)$. $W$ is a plane through the origin in $\RR^3$. Use the navigation bar at the bottom of the interactive window to go through the steps of constructing an orthogonal basis for $W$. RIGHT-CLICK and DRAG to rotate the image for a better view. |
| 134 | + |
| 135 | +\pdfOnly{ |
| 136 | +Access GeoGebra interactives through the online version of this text at |
| 137 | + |
| 138 | +\href{https://ximera.osu.edu/linearalgebradzv3/LinearAlgebraInteractiveIntro}{https://ximera.osu.edu/linearalgebradzv3/LinearAlgebraInteractiveIntro}. |
| 139 | +} |
| 140 | + |
| 141 | +\begin{onlineOnly} |
| 142 | + \begin{center} |
| 143 | +\geogebra{zghsfkym}{900}{600} |
| 144 | +\end{center} |
| 145 | +\end{onlineOnly} |
| 146 | +\end{exploration} |
| 147 | + |
| 148 | +In the next exploration, we take the process of constructing an orthogonal basis to the edge of the visual realm and construct an orthogonal basis for $\RR^3$. |
| 149 | + |
| 150 | +\begin{exploration}\label{exp:orth3} |
| 151 | +In the GeoGebra interactive below $\{\vec{v}_1, \vec{v}_2, \vec{v}_3\}$ is a basis of $\RR^3$. Use check boxes to go through the steps for constructing an orthogonal basis starting with the given basis. RIGHT-CLICK and DRAG to rotate the image for a better view. |
| 152 | + |
| 153 | +\pdfOnly{ |
| 154 | +Access GeoGebra interactives through the online version of this text at |
| 155 | + |
| 156 | +\href{https://ximera.osu.edu/linearalgebradzv3/LinearAlgebraInteractiveIntro}{https://ximera.osu.edu/linearalgebradzv3/LinearAlgebraInteractiveIntro}. |
| 157 | +} |
| 158 | + |
| 159 | +\begin{onlineOnly} |
| 160 | +\begin{center} |
| 161 | +\geogebra{qjpvmsws}{900}{800} |
| 162 | +\end{center} |
| 163 | +\end{onlineOnly} |
| 164 | +\end{exploration} |
| 165 | + |
| 166 | +What we saw above are low-dimension examples of what is known as \dfn{Gram Schmidt Orthogonalization}. |
| 167 | + |
| 168 | + |
| 169 | +\section*{Practice Problems} |
| 170 | + |
| 171 | + \begin{problem}\label{prob:proj1a} |
| 172 | + Find $\mbox{proj}_{\vec{d}}\vec{v}$ if $\vec{d}=\begin{bmatrix}-1\\3\end{bmatrix}$ and $\vec{v}=\begin{bmatrix}1\\4\end{bmatrix}$. |
| 173 | + $$\mbox{proj}_{\vec{d}}\vec{v}=\begin{bmatrix}\answer{-1.1}\\\answer{3.3}\end{bmatrix}$$ |
| 174 | + \end{problem} |
| 175 | + |
| 176 | + \begin{problem}\label{prob:proj1b} |
| 177 | + Find $\mbox{proj}_{\vec{d}}\vec{v}$ if $\vec{d}=\begin{bmatrix}0\\2\\1\end{bmatrix}$ and $\vec{v}=\begin{bmatrix}-1\\-4\\2\end{bmatrix}$. |
| 178 | + $$\mbox{proj}_{\vec{d}}\vec{v}=\begin{bmatrix}\answer{0}\\\answer{-2.4}\\\answer{-1.2}\end{bmatrix}$$ |
| 179 | + \end{problem} |
| 180 | + |
| 181 | + \begin{problem}\label{prob:proj3} |
| 182 | +Show that $\mbox{proj}_{\vec{d}}\vec{v}$ does not depend on the length of $\vec{d}$ by proving that $\mbox{proj}_{\vec{d}}\vec{v}=\mbox{proj}_{k\vec{d}}\vec{v}$ for $k\neq 0$. What does this result mean geometrically? Illustrate your response with a diagram. |
| 183 | +\end{problem} |
| 184 | + |
| 185 | +\begin{problem}\label{prob:proj2} |
| 186 | +Find the projection of vector $\vec{v}$ onto line $l$. (If entering answers in decimal form, round to the nearest one hundredth.) |
| 187 | + |
| 188 | +\begin{center} |
| 189 | +\begin{tikzpicture}[scale=.6] |
| 190 | +\draw[thin,gray!40] (-2,-2) grid (9,4); |
| 191 | + \draw[<->] (-2,0)--(9,0); |
| 192 | + \draw[<->] (0,-2)--(0,4); |
| 193 | + \node[blue] at (6, 1) (a) {$\vec{v}$}; |
| 194 | + \node[] at (-2.4, 1) (b) {$l$}; |
| 195 | + \draw [-,line width=1pt] (-2,0.8)--(9, -1.4); |
| 196 | +\draw[line width=2pt,blue,-stealth](7, -1)--(4,3); |
| 197 | +\end{tikzpicture} |
| 198 | +\end{center} |
| 199 | + |
| 200 | +Answer: |
| 201 | +$$\begin{bmatrix}\answer[tolerance=0.005]{-95/26}\\\answer[tolerance=0.005]{19/26}\end{bmatrix}$$ |
| 202 | +\end{problem} |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | +\begin{problem}\label{GS1} |
| 207 | +Convert the given basis $\mathcal{B}$ of $\RR^2$ to an orthogonal basis by following the procedure described in this section with $\vec{v}_1=\begin{bmatrix}2\\ 1\end{bmatrix}$. |
| 208 | +$$\mathcal{B} = \left\{ \begin{bmatrix}2\\ 1\end{bmatrix}, \begin{bmatrix}1\\ -1\end{bmatrix}\right\}$$ |
| 209 | + |
| 210 | + $$\left\{\begin{bmatrix}2\\1\end{bmatrix},\begin{bmatrix}\answer{-3/5}\\\answer{6/5}\end{bmatrix}\right\}$$ |
| 211 | + |
| 212 | +\end{problem} |
| 213 | + |
| 214 | +% \begin{problem}\label{GS2} |
| 215 | +% Convert the given basis $\mathcal{B}$ of $\RR^2$ to an orthogonal basis by projecting the first vector onto the second. |
| 216 | +% $$\mathcal{B} = \left\{\begin{bmatrix}2\\ 1\end{bmatrix}, \begin{bmatrix}1\\ 2\end{bmatrix}\right\}$$ |
| 217 | +% \end{problem} |
| 218 | + |
| 219 | +\end{document} |
0 commit comments