% Chapter 1, Section 2 _Linear Algebra_ Jim Hefferon % http://joshua.smcvt.edu/linalg.html % 2001-Jun-09 \section{Linear Geometry} \textit{If you have seen the elements of vectors before then this section is an optional review. However, later work will refer to this material so if this is not a review then it is not optional.} In the first section, we had to do a bit of work to show that there are only three types of solution sets\Dash singleton, empty, and infinite. But in the special case of systems with two equations and two unknowns this is easy to see with a picture. Draw each two-unknowns equation as a line in the plane and then the two lines could have a unique intersection, be parallel, or be the same line. \begin{center} \begin{minipage}[b]{1.45in} \raisebox{-2pt}[8pt][0pt]{\small \begin{tabular}{@{}l} \small \textit{Unique solution} \end{tabular}} \begin{center} \includegraphics{ch1.3} \\[.75ex] \small $\begin{linsys}{2} 3x &+ &2y &= &7 \\ x &- &y &= &-1 \end{linsys}$ \end{center} \end{minipage} \hspace*{0em} \begin{minipage}[b]{1.45in} \raisebox{-2pt}[8pt][0pt]{\small \begin{tabular}{@{}l} \small \textit{No solutions} \end{tabular}} \begin{center} \includegraphics{ch1.4} \\[.75ex] \small $\begin{linsys}{2} 3x &+ &2y &= &7 \\ 3x &+ &2y &= &4 \end{linsys}$ \end{center} \end{minipage} \hspace*{0em} \begin{minipage}[b]{1.45in} \raisebox{-2pt}[8pt][0pt]{\small \begin{tabular}[t]{@{}l} \textit{Infinitely many} \\ \textit{solutions} \end{tabular}} \begin{center} \includegraphics{ch1.5} \\[.75ex] \small $\begin{linsys}{2} 3x &+ &2y &= &7 \\ 6x &+ &4y &= &14 \end{linsys}$ \end{center} \end{minipage} \end{center} These pictures aren't a short way to prove the results from the prior section, because those apply to any number of linear equations and any number of unknowns. But they do help us understand those results. This section develops the ideas that we need to express our results geometrically. In particular, while the two-dimensional case is familiar, to extend to systems with more than two unknowns we shall need some higher-dimensional geometry. \subsection{Vectors in Space} Higher-dimensional geometry'' sounds exotic. It is exotic\Dash interesting and eye-opening. But it isn't distant or unreachable. We begin by defining one-dimensional space to be $$\Re^1$$. To see that the definition is reasonable, we picture a one-dimensional space \begin{center} \includegraphics{ch1.6} \end{center} and make a correspondence with $$\Re$$ by picking a point to label $0$ and another to label $1$. \begin{center} \includegraphics{ch1.7} \end{center} Now, with a scale and a direction, finding the point corresponding to, say, $$+2.17$$, is easy\Dash start at $$0$$ and head in the direction of $$1$$, but don't stop there, go $$2.17$$ times as far. The basic idea here, combining magnitude with direction, is the key to extending to higher dimensions. An object comprised of a magnitude and a direction is a \definend{vector\/}\index{vector} (we use the same word as in the prior section because we shall show below how to describe such an object with a column vector). We can draw a vector as having some length, and pointing somewhere. \begin{center} \includegraphics{ch1.8} \end{center} There is a subtlety here\Dash these vectors \begin{center} \includegraphics{ch1.9} \end{center} are equal, even though they start in different places, because they have equal lengths and equal directions. Again: those vectors are not just alike, they are equal. How can things that are in different places be equal? Think of a vector as representing a displacement (the word vector is Latin for carrier'' or traveler''). These two squares undergo equal displacements, despite that those displacements start in different places. \begin{center} \includegraphics{ch1.10} \end{center} Sometimes, to emphasize this property vectors have of not being anchored, we can refer to them as \definend{free}\index{vector!free} vectors. Thus, these free vectors are equal as each is a displacement of one over and two up. \begin{center} \includegraphics{ch1.12} \end{center} More generally, vectors in the plane are the same if and only if they have the same change in first components and the same change in second components:~the vector extending from $$(a_1,a_2)$$ to $$(b_1,b_2)$$ equals the vector from $$(c_1,c_2)$$ to $$(d_1,d_2)$$ if and only if $$b_1-a_1=d_1-c_1$$ and $$b_2-a_2=d_2-c_2$$. Saying the vector that, were it to start at $$(a_1,a_2)$$, would extend to $$(b_1,b_2)$$' would be unwieldy. We instead describe that vector as \begin{equation*} \colvec{b_1-a_1 \\ b_2-a_2} \end{equation*} so that the one over and two up' arrows shown above picture this vector. \begin{equation*} \colvec[r]{1 \\ 2} \end{equation*} We often draw the arrow as starting at the origin, and we then say it is in the \definend{canonical position}\index{vector!canonical position} (or \definend{natural position}\index{vector!natural position} or \definend{standard position}\index{vector!standard position}). When the vector \begin{equation*} \colvec{v_1 \\ v_2} \end{equation*} is in canonical position then it extends to the endpoint $(v_1,v_2)$. We typically just refer to the point \begin{equation*} \colvec[r]{1 \\ 2}\text{''} \end{equation*} rather than the endpoint of the canonical position of'' that vector. % That is, we shall find it convienent to blur the distinction between a point % in space and the vector that, if it starts at the origin, ends at that % point. Thus, we will call both of these sets $$\Re^2$$. \begin{equation*} \set{(x_1,x_2)\suchthat x_1,x_2\in\Re} \qquad \set{\colvec{x_1 \\ x_2}\suchthat x_1,x_2\in\Re} \end{equation*} In the prior section we defined vectors and vector operations with an algebraic motivation; \begin{equation*} r\cdot\colvec{v_1 \\ v_2} = \colvec{rv_1 \\ rv_2} \qquad \colvec{v_1 \\ v_2} + \colvec{w_1 \\ w_2} = \colvec{v_1+w_1 \\ v_2+w_2} \end{equation*} we can now understand those operations geometrically. \index{vector!sum}\index{vector!scalar multiple}\index{sum!vector} \index{scalar multiple!vector} For instance, if $$\vec{v}$$ represents a displacement then $$3\vec{v}\,$$ represents a displacement in the same direction but three times as far, and $$-1\vec{v}\,$$ represents a displacement of the same distance as $$\vec{v}\,$$ but in the opposite direction. \begin{center} \includegraphics{ch1.13} \end{center} And, where $$\vec{v}$$ and $$\vec{w}$$ represent displacements, $$\vec{v}+\vec{w}\/$$ represents those displacements combined. \begin{center} \includegraphics{ch1.14} \end{center} The long arrow is the combined displacement in this sense:~if, in one minute, a ship's motion gives it the displacement relative to the earth of $\vec{v}$ and a passenger's motion gives a displacement relative to the ship's deck of $\vec{w}$, then $\vec{v}+\vec{w}\/$ is the displacement of the passenger relative to the earth. Another way to understand the vector sum is with the \definend{parallelogram rule}.\index{parallelogram rule}% \index{vector!sum} Draw the parallelogram formed by the vectors $\vec{v}$ and $\vec{w}$. Then the sum $\vec{v}+\vec{w}$ extends along the diagonal to the far corner. \begin{center} \includegraphics{ch1.15} \end{center} The above drawings show how vectors and vector operations behave in $$\Re^2$$. We can extend to $\Re^3$, or to even higher-dimensional spaces where we have no pictures, with the obvious generalization:~the free vector that, if it starts at $$(a_1,\ldots,a_n)$$, ends at $$(b_1,\ldots,b_n)$$, is represented by this column. \begin{equation*} \colvec{b_1-a_1 \\ \vdotswithin{b_1-a_1} \\ b_n-a_n} \end{equation*} Vectors are equal if they have the same representation. We aren't too careful about distinguishing between a point and the vector whose canonical representation ends at that point. \begin{equation*} \Re^n= \set{\colvec{v_1 \\ \vdotswithin{v_1} \\ v_n}\suchthat v_1,\ldots,v_n\in\Re} \end{equation*} And, we do addition and scalar multiplication component-wise. Having considered points, we now turn to the lines. In $\Re^2$, the line through $$(1,2)$$ and $$(3,1)$$ is comprised of (the endpoints of) the vectors in this set. \begin{equation*} \set{ \colvec[r]{1 \\ 2}+t\colvec[r]{2 \\ -1}\suchthat t\in\Re} \end{equation*} That description expresses this picture. \begin{center} \includegraphics{ch1.16} \end{center} The vector associated with the parameter $$t$$ \begin{equation*} \colvec[r]{2 \\ -1}=\colvec[r]{3 \\ 1}-\colvec[r]{1 \\ 2} \end{equation*} has its whole body in the line\Dash it is a \definend{direction vector}\index{vector!direction}% \index{direction vector} for the line. Note that points on the line to the left of $$x=1$$ are described using negative values of $$t$$. % Note also that this description of lines generalizes the familiar % $y=b+mx$ form for lines in the plane. In $$\Re^3$$, the line through $$(1,2,1)$$ and $$(2,3,2)$$ is the set of (endpoints of) vectors of this form \begin{center} \includegraphics{ch1.17} \end{center} and lines in even higher-dimensional spaces work in the same way. In $\Re^3$, a line uses one parameter so that a particle on that line is free to move back and forth in one dimension, and a plane involves two parameters. For example, the plane through the points $$(1,0,5)$$, $$(2,1,-3)$$, and $$(-2,4,0.5)$$ consists of (endpoints of) the vectors in \begin{equation*} \set{ \colvec[r]{1 \\ 0 \\ 5} +t\colvec[r]{1 \\ 1 \\ -8} +s\colvec[r]{-3 \\ 4 \\ -4.5} \suchthat t,s\in\Re } \end{equation*} (the column vectors associated with the parameters \begin{equation*} \colvec[r]{1 \\ 1 \\ -8} = \colvec[r]{2 \\ 1 \\ -3} - \colvec[r]{1 \\ 0 \\ 5} \qquad \colvec[r]{-3 \\ 4 \\ -4.5} = \colvec[r]{-2 \\ 4 \\ 0.5} - \colvec[r]{1 \\ 0 \\ 5} \end{equation*} are two vectors whose whole bodies lie in the plane). As with the line, note that we describe some points in this plane with negative $t$'s or negative $s$'s or both. In algebra and calculus we often use a description of planes involving a single equation as the condition that describes the relationship among the first, second, and third coordinates of points in a plane. % \newsavebox{\jhscratchbox} % \savebox{\jhscratchbox}{\includegraphics{ch1.18}} % \newlength{\jhscratchlength}\newlength{\jhscratchheight} % \settowidth{\jhscratchlength}{\usebox{\jhscratchbox}} \begin{equation*} % \usebox{\jhscratchbox} \vcenteredhbox{\includegraphics{ch1.18}} \end{equation*} % \begin{equation*} % P=\set{\colvec{x \\ y \\ z}\suchthat 2x+3y-z=4} % \end{equation*} The translation from such a description to the vector description that we favor in this book is to think of the condition as a one-equation linear system and parametrize $$x=2-y/2-z/2$$. \begin{equation*} \vcenteredhbox{\includegraphics{ch1.19}} \end{equation*} % \begin{center} % \makebox[\jhscratchlength][l]{\includegraphics{ch1.20}} % \end{center} % \begin{equation*} % P=\set{\colvec[r]{2 \\ 0 \\ 0} % +y\cdot\colvec[r]{-1/2 \\ 1 \\ 0} % +z\cdot\colvec[r]{-1/2 \\ 0 \\ 1}\suchthat y,z\in\Re} % \end{equation*} Generalizing from lines and planes, we define a \definend{$$k$$-dimensional linear surface}\index{linear surface} (or \definend{$$k$$-flat}\index{flat}) in $\Re^n$ to be $\set{\vec{p}+t_1\vec{v}_1+t_2\vec{v}_2+\cdots+t_k\vec{v}_k \suchthat t_1,\ldots ,t_k\in\Re}$ where $$\vec{v}_1,\ldots,\vec{v}_k\in\Re^n$$. For example, in $\Re^4$, \begin{equation*} \set{\colvec[r]{2 \\ \pi \\ 3 \\ -0.5} +t\colvec[r]{1 \\ 0 \\ 0 \\ 0} \suchthat t\in\Re} \end{equation*} is a line, \begin{equation*} \set{ \colvec[r]{0 \\ 0 \\ 0 \\ 0} +t\colvec[r]{1 \\ 1 \\ 0 \\ -1} +s\colvec[r]{2 \\ 0 \\ 1 \\ 0} \suchthat t,s\in\Re} \end{equation*} is a plane, and \begin{equation*} \set{ \colvec[r]{3 \\ 1 \\ -2 \\ 0.5} +r\colvec[r]{0 \\ 0 \\ 0 \\ -1} +s\colvec[r]{1 \\ 0 \\ 1 \\ 0} +t\colvec[r]{2 \\ 0 \\ 1 \\ 0} \suchthat r,s,t\in\Re} \end{equation*} is a three-dimensional linear surface. Again, the intuition is that a line permits motion in one direction, a plane permits motion in combinations of two directions, etc. (When the dimension of the linear surface is one less than the dimension of the space, that is, when we have an $n-1$-flat in $\Re^n$, then the surface is called a \definend{hyperplane}.\index{hyperplane}) A description of a linear surface can be misleading about the dimension. For example, this \begin{equation*} L=\set{ \colvec[r]{1 \\ 0 \\ -1 \\ -2} +t\colvec[r]{1 \\ 1 \\ 0 \\ -1} +s\colvec[r]{2 \\ 2 \\ 0 \\ -2} \suchthat t,s\in\Re} \end{equation*} is a \definend{degenerate} plane because it is actually a line, since the vectors are multiples of each other so we can merge the two into one. \begin{equation*} L=\set{ \colvec[r]{1 \\ 0 \\ -1 \\ -2} +r\colvec[r]{1 \\ 1 \\ 0 \\ -1} \suchthat r\in\Re} \end{equation*} We shall see in the Linear Independence section of Chapter Two what relationships among vectors causes the linear surface they generate to be degenerate. We finish this subsection by restating our conclusions from earlier in geometric terms. First, the solution set of a linear system with $$n$$ unknowns is a linear surface in $$\Re^n$$. Specifically, it is a $$k$$-dimensional linear surface, where $$k$$ is the number of free variables in an echelon form version of the system. Second, the solution set of a homogeneous linear system is a linear surface passing through the origin. Finally, we can view the general solution set of any linear system as being the solution set of its associated homogeneous system offset from the origin by a vector, namely by any particular solution. \begin{exercises} \recommended \item Find the canonical name for each vector. \begin{exparts} \partsitem the vector from $$(2,1)$$ to $$(4,2)$$ in $$\Re^2$$ \partsitem the vector from $$(3,3)$$ to $$(2,5)$$ in $$\Re^2$$ \partsitem the vector from $$(1,0,6)$$ to $$(5,0,3)$$ in $$\Re^3$$ \partsitem the vector from $$(6,8,8)$$ to $$(6,8,8)$$ in $$\Re^3$$ \end{exparts} \begin{answer} \begin{exparts*} \partsitem $$\colvec[r]{2 \\ 1}$$ \partsitem $$\colvec[r]{-1 \\ 2}$$ \partsitem $$\colvec[r]{4 \\ 0 \\ -3}$$ \partsitem $$\colvec[r]{0 \\ 0 \\ 0}$$ \end{exparts*} \end{answer} \recommended \item Decide if the two vectors are equal. \begin{exparts} \partsitem the vector from $$(5,3)$$ to $$(6,2)$$ and the vector from $$(1,-2)$$ to $$(1,1)$$ \partsitem the vector from $$(2,1,1)$$ to $$(3,0,4)$$ and the vector from $$(5,1,4)$$ to $$(6,0,7)$$ \end{exparts} \begin{answer} \begin{exparts} \partsitem No, their canonical positions are different. \begin{equation*} \colvec[r]{1 \\ -1} \qquad \colvec[r]{0 \\ 3} \end{equation*} \partsitem Yes, their canonical positions are the same. \begin{equation*} \colvec[r]{1 \\ -1 \\ 3} \end{equation*} \end{exparts} \end{answer} \recommended \item Does $$(1,0,2,1)$$ lie on the line through $$(-2,1,1,0)$$ and $$(5,10,-1,4)$$? \begin{answer} That line is this set. \begin{equation*} \set{\colvec[r]{-2 \\ 1 \\ 1 \\ 0} +\colvec[r]{7 \\ 9 \\ -2 \\ 4}t \suchthat t\in\Re } \end{equation*} Note that this system \begin{equation*} \begin{linsys}{2} -2 &+ &7t &= &1 \\ 1 &+ &9t &= &0 \\ 1 &- &2t &= &2 \\ 0 &+ &4t &= &1 \end{linsys} \end{equation*} has no solution. Thus the given point is not in the line. \end{answer} \recommended \item \begin{exparts} \partsitem Describe the plane through $$(1,1,5,-1)$$, $$(2,2,2,0)$$, and $$(3,1,0,4)$$. \partsitem Is the origin in that plane? \end{exparts} \begin{answer} \begin{exparts} \partsitem Note that \begin{equation*} \colvec[r]{2 \\ 2 \\ 2 \\ 0} -\colvec[r]{1 \\ 1 \\ 5 \\ -1} =\colvec[r]{1 \\ 1 \\ -3 \\ 1} \qquad \colvec[r]{3 \\ 1 \\ 0 \\ 4} -\colvec[r]{1 \\ 1 \\ 5 \\ -1} =\colvec[r]{2 \\ 0 \\ -5 \\ 5} \end{equation*} and so the plane is this set. \begin{equation*} \set{\colvec[r]{1 \\ 1 \\ 5 \\ -1} +\colvec[r]{1 \\ 1 \\ -3 \\ 1}t +\colvec[r]{2 \\ 0 \\ -5 \\ 5}s \suchthat t,s\in\Re} \end{equation*} \partsitem No; this system \begin{equation*} \begin{linsys}{3} 1 &+ &1t &+ &2s &= &0 \\ 1 &+ &1t & & &= &0 \\ 5 &- &3t &- &5s &= &0 \\ -1 &+ &1t &+ &5s &= &0 \end{linsys} \end{equation*} has no solution. \end{exparts} \end{answer} \item Describe the plane that contains this point and line. \begin{equation*} \colvec[r]{2 \\ 0 \\ 3} \qquad \set{\colvec[r]{-1 \\ 0 \\ -4} +\colvec[r]{1 \\ 1 \\ 2}t \suchthat t\in\Re} \end{equation*} \begin{answer} The vector \begin{equation*} \colvec[r]{2 \\ 0 \\ 3} \end{equation*} is not in the line. Because \begin{equation*} \colvec[r]{2 \\ 0 \\ 3} -\colvec[r]{-1 \\ 0 \\ -4} =\colvec[r]{3 \\ 0 \\ 7} \end{equation*} we can describe that plane in this way. \begin{equation*} \set{\colvec[r]{-1 \\ 0 \\ -4} +m\colvec[r]{1 \\ 1 \\ 2} +n\colvec[r]{3 \\ 0 \\ 7} \suchthat m,n\in\Re} \end{equation*} \end{answer} \recommended \item Intersect these planes. \begin{equation*} \set{\colvec[r]{1 \\ 1 \\ 1}t+ \colvec[r]{0 \\ 1 \\ 3}s \suchthat t,s\in\Re} \qquad \set{\colvec[r]{1 \\ 1 \\ 0} +\colvec[r]{0 \\ 3 \\ 0}k+ \colvec[r]{2 \\ 0 \\ 4}m \suchthat k,m\in\Re} \end{equation*} \begin{answer} The points of coincidence are solutions of this system. \begin{equation*} \begin{linsys}{2} t & & &= &1+2m\hfill \\ t &+ &s &= &1+3k\hfill \\ t &+ &3s &= &4m\hfill \end{linsys} \end{equation*} Gauss' method \begin{equation*} \begin{amat}{4} 1 &0 &0 &-2 &1 \\ 1 &1 &-3 &0 &1 \\ 1 &3 &0 &-4 &0 \end{amat} \;\grstep[-\rho_1+\rho_3]{-\rho_1+\rho_2}\; \begin{amat}{4} 1 &0 &0 &-2 &1 \\ 0 &1 &-3 &2 &0 \\ 0 &3 &0 &-2 &-1 \end{amat} \;\grstep{-3\rho_2+\rho_3}\; \begin{amat}{4} 1 &0 &0 &-2 &1 \\ 0 &1 &-3 &2 &0 \\ 0 &0 &9 &-8 &-1 \end{amat} \end{equation*} gives $$k=-(1/9)+(8/9)m$$, so $$s=-(1/3)+(2/3)m$$ and $$t=1+2m$$. The intersection is this. \begin{equation*} \set{\colvec[r]{1 \\ 1 \\ 0}+ \colvec[r]{0 \\ 3 \\ 0}(-\frac{1}{9}+\frac{8}{9}m)+ \colvec[r]{2 \\ 0 \\ 4}m \suchthat m\in\Re} =\set{\colvec[r]{1 \\ 2/3 \\ 0} +\colvec[r]{2 \\ 8/3 \\ 4}m \suchthat m\in\Re} \end{equation*} \end{answer} \recommended \item Intersect each pair, if possible. \begin{exparts} \partsitem $$\set{\colvec[r]{1 \\ 1 \\ 2}+t\colvec[r]{0 \\ 1 \\ 1} \suchthat t\in\Re}$$, $$\set{\colvec[r]{1 \\ 3 \\ -2}+s\colvec[r]{0 \\ 1 \\ 2} \suchthat s\in\Re}$$ \partsitem $$\set{\colvec[r]{2 \\ 0 \\ 1}+t\colvec[r]{1 \\ 1 \\ -1} \suchthat t\in\Re}$$, $$\set{s\colvec[r]{0 \\ 1 \\ 2} +w\colvec[r]{0 \\ 4 \\ 1} \suchthat s,w\in\Re}$$ \end{exparts} \begin{answer} \begin{exparts} \partsitem The system \begin{equation*} \begin{linsys}{1} 1 &= &1\hfill \\ 1+t &= &3+s\hfill \\ 2+t &= &-2+2s\hfill \end{linsys} \end{equation*} gives $$s=6$$ and $$t=8$$, so this is the solution set. \begin{equation*} \set{\colvec[r]{1 \\ 9 \\ 10} } \end{equation*} \partsitem This system \begin{equation*} \begin{linsys}{1} 2+t &= &0 \hfill \\ t &= &s+4w\hfill \\ 1-t &= &2s+w\hfill \end{linsys} \end{equation*} gives $$t=-2$$, $$w=-1$$, and $$s=2$$ so their intersection is this point. \begin{equation*} \colvec[r]{0 \\ -2 \\ 3} \end{equation*} \end{exparts} \end{answer} \item When a plane does not pass through the origin, performing operations on vectors whose bodies lie in it is more complicated than when the plane passes through the origin. Consider the picture in this subsection of the plane \begin{equation*} \set{\colvec[r]{2 \\ 0 \\ 0} +\colvec[r]{-0.5 \\ 1 \\ 0} y +\colvec[r]{-0.5 \\ 0 \\ 1} z \suchthat y,z\in\Re} \end{equation*} and the three vectors with endpoints $(2,0,0)$, $(1.5,1,0)$, and $(1.5,0,1)$. \begin{exparts} \partsitem Redraw the picture, including the vector in the plane that is twice as long as the one with endpoint $(1.5,1,0)$. The endpoint of your vector is not $(3,2,0)$; what is it? \partsitem Redraw the picture, including the parallelogram in the plane that shows the sum of the vectors ending at $(1.5,0,1)$ and $(1.5,1,0)$. The endpoint of the sum, on the diagonal, is not $(3,1,1)$; what is it? \end{exparts} \begin{answer} \begin{exparts} \partsitem The vector shown \begin{center} \includegraphics{ch1.32} \end{center} is not the result of doubling \begin{equation*} \colvec[r]{2 \\ 0 \\ 0} +\colvec[r]{-0.5 \\ 1 \\ 0}\cdot 1 \end{equation*} instead it is \begin{equation*} \colvec[r]{2 \\ 0 \\ 0} +\colvec[r]{-0.5 \\ 1 \\ 0}\cdot 2 =\colvec[r]{1 \\ 2 \\ 0} \end{equation*} which has a parameter twice as large. \partsitem The vector \begin{center} \includegraphics{ch1.19} \end{center} is not the result of adding \begin{equation*} (\colvec[r]{2 \\ 0 \\ 0} +\colvec[r]{-0.5 \\ 1 \\ 0}\cdot 1) + (\colvec[r]{2 \\ 0 \\ 0} +\colvec[r]{-0.5 \\ 0 \\ 1}\cdot 1) \end{equation*} instead it is \begin{equation*} \colvec[r]{2 \\ 0 \\ 0} +\colvec[r]{-0.5 \\ 1 \\ 0}\cdot 1 +\colvec[r]{-0.5 \\ 0 \\ 1}\cdot 1 =\colvec[r]{1 \\ 1 \\ 1} \end{equation*} which adds the parameters. \end{exparts} \end{answer} \item Show that the line segments $$\overline{(a_1,a_2)(b_1,b_2)}$$ and $$\overline{(c_1,c_2)(d_1,d_2)}$$ have the same lengths and slopes if $$b_1-a_1=d_1-c_1$$ and $$b_2-a_2=d_2-c_2$$. Is that only if? \begin{answer} The if'' half is straightforward. If $$b_1-a_1=d_1-c_1$$ and $$b_2-a_2=d_2-c_2$$ then \begin{equation*} \sqrt{(b_1-a_1)^2+(b_2-a_2)^2} =\sqrt{(d_1-c_1)^2+(d_2-c_2)^2} \end{equation*} so they have the same lengths, and the slopes are just as easy: \begin{equation*} \frac{b_2-a_2}{b_1-a_1} =\frac{d_2-c_2}{d_1-a_1} \end{equation*} (if the denominators are $$0$$ they both have undefined slopes). For only if'', assume that the two segments have the same length and slope (the case of undefined slopes is easy; we will do the case where both segments have a slope $$m$$). Also assume, without loss of generality, that $a_1 0 \), is right if $$\vec{u}\dotprod\vec{v}=0$$, and is obtuse if $$\vec{u}\dotprod\vec{v}<0$$. That's because, in the formula for the angle, the denominator is never negative. \end{answer} \recommended \item Generalize to $$\Re^n$$ the converse of the Pythagorean Theorem, that if $$\vec{u}$$ and $$\vec{v}$$ are perpendicular then $$\norm{\vec{u}+\vec{v}\,}^2=\norm{\vec{u}\,}^2+\norm{\vec{v}\,}^2$$. \begin{answer} Suppose that $$\vec{u},\vec{v}\in\Re^n$$. If $$\vec{u}$$ and $$\vec{v}$$ are perpendicular then \begin{equation*} \norm{\vec{u}+\vec{v}\,}^2 =(\vec{u}+\vec{v})\dotprod(\vec{u}+\vec{v}) =\vec{u}\dotprod\vec{u}+2\,\vec{u}\dotprod\vec{v} +\vec{v}\dotprod\vec{v} =\vec{u}\dotprod\vec{u}+\vec{v}\dotprod\vec{v} =\norm{\vec{u}\,}^2+\norm{\vec{v}\,}^2 \end{equation*} (the third equality holds because $$\vec{u}\dotprod\vec{v}=0$$). \end{answer} \item Show that $$\norm{\vec{u}\,}=\norm{\vec{v}\,}$$ if and only if $$\vec{u}+\vec{v}$$ and $$\vec{u}-\vec{v}$$ are perpendicular. Give an example in $$\Re^2$$. \begin{answer} Where $$\vec{u},\vec{v}\in\Re^n$$, the vectors $$\vec{u}+\vec{v}$$ and $$\vec{u}-\vec{v}$$ are perpendicular if and only if$0=(\vec{u}+\vec{v})\dotprod(\vec{u}-\vec{v}) =\vec{u}\dotprod\vec{u}-\vec{v}\dotprod\vec{v}$, which shows that those two are perpendicular if and only if $$\vec{u}\dotprod\vec{u}=\vec{v}\dotprod\vec{v}$$. That holds if and only if $$\norm{\vec{u}\,}=\norm{\vec{v}\,}$$. \end{answer} \item Show that if a vector is perpendicular to each of two others then it is perpendicular to each vector in the plane they generate. (\textit{Remark.} They could generate a degenerate plane\Dash a line or a point\Dash but the statement remains true.) \begin{answer} Suppose $$\vec{u}\in\Re^n$$ is perpendicular to both $$\vec{v}\in\Re^n$$ and $$\vec{w}\in\Re^n$$. Then, for any $$k,m\in\Re$$ we have this. \begin{equation*} \vec{u}\dotprod(k\vec{v}+m\vec{w}) =k(\vec{u}\dotprod\vec{v})+m(\vec{u}\dotprod\vec{w}) =k(0)+m(0)=0 \end{equation*} \end{answer} \item Prove that, where $$\vec{u},\vec{v}\in\Re^n$$ are nonzero vectors, the vector \begin{equation*} \frac{\vec{u}}{\norm{\vec{u}\,} }+\frac{\vec{v}}{\norm{\vec{v}\,} } \end{equation*} bisects the angle between them. Illustrate in $$\Re^2$$. \begin{answer} We will show something more general:~if $$\norm{\vec{z}_1}=\norm{\vec{z}_2}$$ for $$\vec{z}_1,\vec{z}_2\in\Re^n$$, then $$\vec{z}_1+\vec{z}_2$$ bisects the angle between $$\vec{z}_1$$ and $$\vec{z}_2$$ \begin{center} \setlength{\unitlength}{4pt} % sum of equal length vectors. \begin{picture}(37,12)(0,0) \put(0,0){\begin{picture}(12,12)(0,0) \thicklines \put(0,0){\vector(2,1){8} } \put(0,0){\vector(1,2){4} } \put(0,0){\vector(1,1){12} } \thinlines \put(8,4){\line(1,2){4} } \put(4,8){\line(2,1){8} } \end{picture} } \put(18.5,7){\makebox(0,0){\small gives} } \put(25,0){\begin{picture}(12,12)(0,0) \thinlines \put(0,0){\line(2,1){8} } \put(0,0){\line(1,2){4} } \put(0,0){\line(1,1){12} } \put(8,4){\line(1,2){4} } \put(4,8){\line(2,1){8} } \put(2,3.8){$$\prime$$} \put(4.2,1.5){$$\prime$$} \multiput(5.7,5.2)(0.5,0.5){2}{$$\prime$$} \multiput(9.0,5.8)(0.5,1.0){3}{$$\prime$$} \multiput(6.6,8.7)(0.6,0.3){3}{$$\prime$$} \end{picture} } \end{picture} \end{center} (we ignore the case where $$\vec{z}_1$$ and $$\vec{z}_2$$ are the zero vector). The $$\vec{z}_1+\vec{z}_2=\zero$$ case is easy. For the rest, by the definition of angle, we will be finished if we show this. \begin{equation*} \frac{\vec{z}_1\dotprod(\vec{z}_1+\vec{z}_2)}{ \norm{\vec{z}_1}\,\norm{\vec{z}_1+\vec{z}_2} } = \frac{\vec{z}_2\dotprod(\vec{z}_1+\vec{z}_2)}{ \norm{\vec{z}_2}\,\norm{\vec{z}_1+\vec{z}_2} } \end{equation*} But distributing inside each expression gives \begin{equation*} \frac{\vec{z}_1\dotprod\vec{z}_1+\vec{z}_1\dotprod\vec{z}_2}{ \norm{\vec{z}_1}\,\norm{\vec{z}_1+\vec{z}_2} } \qquad \frac{\vec{z}_2\dotprod\vec{z}_1+\vec{z}_2\dotprod\vec{z}_2}{ \norm{\vec{z}_2}\,\norm{\vec{z}_1+\vec{z}_2} } \end{equation*} and $$\vec{z}_1\dotprod\vec{z}_1=\norm{\vec{z}_1}^2 =\norm{\vec{z}_2}^2=\vec{z}_2\dotprod\vec{z}_2$$, so the two are equal. \end{answer} \item Verify that the definition of angle is dimensionally correct: (1)~if $$k>0$$ then the cosine of the angle between $$k\vec{u}$$ and $$\vec{v}$$ equals the cosine of the angle between $$\vec{u}$$ and $$\vec{v}$$, and (2)~if $$k<0$$ then the cosine of the angle between $$k\vec{u}$$ and $$\vec{v}$$ is the negative of the cosine of the angle between $$\vec{u}$$ and $$\vec{v}$$. \begin{answer} We can show the two statements together. Let $$\vec{u}, \vec{v}\in\Re^n$$, write \begin{equation*} \vec{u}=\colvec{u_1 \\ \vdotswithin{u_1} \\ u_n} \qquad \vec{v}=\colvec{v_1 \\ \vdotswithin{v_1} \\ v_n} \end{equation*} and calculate. \begin{equation*} \cos\theta= \frac{ku_1v_1+\cdots+ku_nv_n}{ \sqrt{{(ku_1)}^2+\cdots+{(ku_n)}^2}\sqrt{{b_1}^2+\cdots+{b_n}^2} } =\frac{k}{\absval{k}} \frac{\vec{u}\cdot\vec{v}}{\norm{\vec{u}\,}\,\norm{\vec{v}\,} } =\pm \frac{\vec{u}\dotprod\vec{v}}{\norm{\vec{u}\,}\,\norm{\vec{v}\,} } \end{equation*} \end{answer} \recommended \item Show that the inner product operation is \definend{linear}:~for $$\vec{u},\vec{v},\vec{w}\in\Re^n$$ and $$k,m\in\Re$$,$\vec{u}\dotprod(k\vec{v}+m\vec{w})= k(\vec{u}\dotprod\vec{v})+m(\vec{u}\dotprod\vec{w}). \begin{answer} Let \begin{equation*} \vec{u}=\colvec{u_1 \\ \vdotswithin{u_1} \\ u_n}, \quad \vec{v}=\colvec{v_1 \\ \vdotswithin{v_1} \\ v_n} \quad \vec{w}=\colvec{w_1 \\ \vdotswithin{w_1} \\ w_n} \end{equation*} and then \begin{align*} \vec{u}\dotprod\bigl(k\vec{v}+m\vec{w}\bigr) &=\colvec{u_1 \\ \vdotswithin{u_1} \\ u_n}\dotprod \bigl( \colvec{kv_1 \\ \vdotswithin{kv_1} \\ kv_n} +\colvec{mw_1 \\ \vdotswithin{mw_1} \\ mw_n} \bigr) \\ &=\colvec{u_1 \\ \vdotswithin{u_1} \\ u_n}\dotprod \colvec{kv_1+mw_1 \\ \vdotswithin{kv_1+mw_1} \\ kv_n+mw_n} \\ &=u_1(kv_1+mw_1)+\cdots+u_n(kv_n+mw_n) \\ &=ku_1v_1+mu_1w_1+\cdots+ku_nv_n+mu_nw_n \\ &=(ku_1v_1+\cdots+ku_nv_n)+(mu_1w_1+\cdots+mu_nw_n) \\ &=k(\vec{u}\dotprod\vec{v})+m(\vec{u}\dotprod\vec{w}) \end{align*} as required. \end{answer} \recommended \item The \definend{geometric mean}\index{mean!geometric} of two positive reals $$x, y$$ is $$\sqrt{xy}$$. It is analogous to the \definend{arithmetic mean}\index{mean!arithmetic} $$(x+y)/2$$. Use the Cauchy-Schwartz inequality to show that the geometric mean of any $$x,y\in\Re$$ is less than or equal to the arithmetic mean. \begin{answer} For $$x,y\in\Re^+$$, set \begin{equation*} \vec{u}=\colvec{\sqrt{x} \\ \sqrt{y}} \qquad \vec{v}=\colvec{\sqrt{y} \\ \sqrt{x}} \end{equation*} so that the Cauchy-Schwartz inequality asserts that (after squaring) \begin{align*} (\sqrt{x}\sqrt{y}+\sqrt{y}\sqrt{x})^2 &\leq(\sqrt{x}\sqrt{x}+\sqrt{y}\sqrt{y})(\sqrt{y}\sqrt{y} +\sqrt{x}\sqrt{x}) \\ (2\sqrt{x}\sqrt{y})^2 &\leq(x+y)^2 \\ \sqrt{xy} &\leq\frac{x+y}{2} \end{align*} as desired. \end{answer} \puzzle \item \cite{Cleary} Astrologers claim to be able to recognize trends in personality and fortune that depend on an individual's birthday by somehow incorporating where the stars were2000$~years ago, during the Hellenistic period. Suppose that instead of star-gazers coming up with stuff, math teachers who like linear algebra (we'll call them vectologers) had come up with a similar system as follows:~Consider your birthday as a row vector$\rowvec{\text{month} &\text{day}}$. For instance, I was born on July~$12$so my vector would be$\rowvec{7 &12}$. Vectologers have made the rule that how well individuals get along with each other depends on the angle between vectors. The smaller the angle, the more harmonious the relationship. \begin{exparts} \item Compute the angle between your vector and mine, expressing the answer in radians. \item Would you get along better with me, or with a professor born on September~$19$? \item For maximum harmony in a relationship, when should the other person be born? \item Is there a person with whom you have a worst case'' relationship, i.e., your vector and theirs are orthogonal? If so, what are the birthdate(s) for such people? If not, explain why not. \end{exparts} \begin{answer} \begin{exparts} \item For instance, a birthday of October~$12$gives this. \begin{equation*} \theta = \arccos(\,\frac{\colvec[r]{7 \\ 12}\dotprod\colvec[r]{10 \\ 12}}{ \norm{\colvec[r]{7 \\ 12}\,}\cdot\norm{\colvec[r]{10 \\ 12}\,} }\,) =\arccos(\frac{214}{\sqrt{244}\sqrt{193}}) \approx \text{$0.17$~rad} \end{equation*} \item Applying the same equation to$\rowvec{9 &19}$gives about$0.09$~radians. \item The angle will measure$0$~radians if the other person is born on the same day. It will also measure$0$if one birthday is a scalar multiple of the other. For instance, a person born on Mar~$6$would be harmonious with a person born on Feb~$4$. Given a birthday, we can get Sage to plot the angle for other dates. This example shows the relationship of all dates with July~12. \begin{verbatim} sage: plot3d(lambda x, y: math.acos((x*7+y*12)/(math.sqrt(7**2+12**2)*math.sqrt(x**2+y**2))), (1,12),(1,31)) \end{verbatim} The result looks like this. \begin{center} \includegraphics[height=2in]{rcbday.jpg} \end{center} \item We want to maximize this. \begin{equation*} \theta = \arccos(\,\frac{\colvec[r]{7 \\ 12}\dotprod\colvec{m \\ d}}{ \norm{\colvec[r]{7 \\ 12}\,}\cdot\norm{\colvec{m \\ d}\,} }\,) \end{equation*} Of course, we cannot take$m$or$d$negative and so we cannot get a vector orthogonal to the given one. This Python script finds the largest angle by brute force. \begin{verbatim} import math days={1:31, # Jan 2:29, 3:31, 4:30, 5:31, 6:30, 7:31, 8:31, 9:30, 10:31, 11:30, 12:31} BDAY=(7,12) max_res=0 max_res_date=(-1,-1) for month in range(1,13): for day in range(1,days[month]+1): num=BDAY[0]*month+BDAY[1]*day denom=math.sqrt(BDAY[0]**2+BDAY[1]**2)*math.sqrt(month**2+day**2) if denom>0: res=math.acos(min(num*1.0/denom,1)) print "day:",str(month),str(day)," angle:",str(res) if res>max_res: max_res=res max_res_date=(month,day) print "For ",str(BDAY),"the worst case is",str(max_res),"radians on date",str(max_res_date) print " That is ",180*max_res/math.pi,"degrees" \end{verbatim} The result is \begin{verbatim} For (7, 12) the worst case is 0.95958064648 radians on date (12, 1) That is 54.9799211457 degrees \end{verbatim} A more conceptual approach is to consider the relation of all points$(\text{month},\text{day})$to the point$(7,12)$. The picture below makes clear that the answer is either Dec~$1$or Jan~$31$, depending on which is further from the birthdate. The dashed line bisects the angle between the line from the origin to Dec~$1$, and the line from the origin to Jan~$31$. Birthdays above the line are furthest from Dec~$1$and birthdays below the line are furthest from Jan~$31\$. \begin{center} \includegraphics{ch1.54} \end{center} \end{exparts} \end{answer} \puzzle \item \cite{Monthly33p118} A ship is sailing with speed and direction $$\vec{v}_1$$; the wind blows apparently (judging by the vane on the mast) in the direction of a vector $$\vec{a}$$; on changing the direction and speed of the ship from $$\vec{v}_1$$ to $$\vec{v}_2$$ the apparent wind is in the direction of a vector $$\vec{b}$$. Find the vector velocity of the wind. \begin{answer} \answerasgiven % The actual velocity $$\vec{v}$$ of the wind is the sum of the ship's velocity and the apparent velocity of the wind. Without loss of generality we may assume $$\vec{a}$$ and $$\vec{b}$$ to be unit vectors, and may write \begin{equation*} \vec{v}=\vec{v}_1+s\vec{a}=\vec{v}_2+t\vec{b} \end{equation*} where $$s$$ and $$t$$ are undetermined scalars. Take the dot product first by $$\vec{a}$$ and then by $$\vec{b}$$ to obtain \begin{align*} s-t\vec{a}\dotprod\vec{b} &=\vec{a}\dotprod(\vec{v}_2-\vec{v}_1) \\ s\vec{a}\dotprod\vec{b}-t &=\vec{b}\dotprod(\vec{v}_2-\vec{v}_1) \end{align*} Multiply the second by $$\vec{a}\dotprod\vec{b}$$, subtract the result from the first, and find \begin{equation*} s= \frac{[\vec{a}-(\vec{a}\dotprod\vec{b})\vec{b}] \dotprod(\vec{v}_2-\vec{v}_1) }{1-(\vec{a}\dotprod\vec{b})^2}. \end{equation*} Substituting in the original displayed equation, we get \begin{equation*} \vec{v}=\vec{v}_1+ \frac{[\vec{a}-(\vec{a}\dotprod\vec{b})\vec{b}] \dotprod(\vec{v}_2-\vec{v}_1) \vec{a}}{1-(\vec{a}\dotprod\vec{b})^2}. \end{equation*} \end{answer} \item Verify the Cauchy-Schwartz inequality by first proving Lagrange's identity: \begin{equation*} \left(\sum_{1\leq j\leq n} a_jb_j \right)^2 = \left(\sum_{1\leq j\leq n}a_j^2\right) \left(\sum_{1\leq j\leq n}b_j^2\right) - \sum_{1\leq k < j\leq n}(a_kb_j-a_jb_k)^2 \end{equation*} and then noting that the final term is positive. (Recall the meaning \begin{equation*} \sum_{1\leq j\leq n}a_jb_j= a_1b_1+a_2b_2+\cdots+a_nb_n \end{equation*} and \begin{equation*} \sum_{1\leq j\leq n}{a_j}^2= {a_1}^2+{a_2}^2+\cdots+{a_n}^2 \end{equation*} of the $$\Sigma$$ notation.) This result is an improvement over Cauchy-Schwartz because it gives a formula for the difference between the two sides. Interpret that difference in $$\Re^2$$. \begin{answer} We use induction on $$n$$. In the $$n=1$$ base case the identity reduces to \begin{equation*} (a_1b_1)^2=({a_1}^2)({b_1}^2)-0 \end{equation*} and clearly holds. For the inductive step assume that the formula holds for the $$0$$, \ldots, $$n$$ cases. We will show that it then holds in the $$n+1$$ case. Start with the right-hand side \begin{multline*} \bigl( \sum_{1\leq j\leq n+1}{a_j}^2\bigr) \bigl( \sum_{1\leq j\leq n+1}{b_j}^2\bigr) - \sum_{1\leq k