This repository has been archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 172
/
vectors.xml
396 lines (353 loc) · 16.7 KB
/
vectors.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
<?xml version="1.0" encoding="UTF-8"?>
<!--********************************************************************
Copyright 2017 Georgia Institute of Technology
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation. A copy of
the license is included in gfdl.xml.
*********************************************************************-->
<section xml:id="vectors">
<title>Vectors</title>
<objectives>
<ol>
<li>Learn how to add and scale vectors in <m>\R^n</m>, both algebraically and geometrically.</li>
<li>Understand linear combinations geometrically.</li>
<li><em>Pictures:</em> vector addition, vector subtraction, linear combinations.</li>
<li><em>Vocabulary words:</em> <term>vector</term>, <term>linear combination</term>.</li>
</ol>
</objectives>
<subsection>
<title>Vectors in <m>\R^n</m></title>
<p>We have been drawing points in <m>\R^n</m> as dots in the line, plane, space, etc. We can also draw them as <em>arrows</em>. Since we have two geometric interpretations in mind, we now discuss the relationship between the two points of view.</p>
<definition hide-type="true">
<title>Points and Vectors</title>
<idx><h>Point</h></idx>
<idx><h>Vector</h><h>definition of</h></idx>
<statement>
<p>Again, a <term>point</term> in <m>\R^n</m> is drawn as a dot.
<latex-code>
<![CDATA[
\begin{tikzpicture}[scale=1, every pin/.style={whitebg, thin border}]
\draw[grid lines] (-1,-1) grid (4, 4);
\draw[->, thick] (-1,0) -- (4,0);
\draw[->, thick] (0,-1) -- (0,4);
\point[seq-blue, pin={
[pin edge={seq-blue}, text=seq-blue]
-85:the point $(1,3)$}] (x) at (1,3);
\end{tikzpicture}
]]>
</latex-code>
A <term>vector</term> is a point in <m>\R^n</m>, drawn as an arrow.
<latex-code>
<![CDATA[
\begin{tikzpicture}[scale=1, every pin/.style={whitebg, thin border}]
\draw[grid lines] (-1,-1) grid (4, 4);
\draw[thick vector, green!50!black] (0,0)
-- node[midway, pin={[right]-10:the vector $1\choose3$}] {} (1,3);
\end{tikzpicture}
]]>
</latex-code>
</p>
</statement>
</definition>
<p>The difference is purely psychological: <em>points and vectors are both just lists of numbers</em>.</p>
<example hide-type="true">
<title>Interactive: A vector in <m>\R^3</m>, by coordinates</title>
<figure>
<caption>A vector in <m>\R^3</m>, and its coordinates. Drag the arrow head and tail.</caption>
<mathbox source="demos/vector.html" height="400px"/>
</figure>
</example>
<p>When we think of a point in <m>\R^n</m> as a vector, we will usually write it vertically, like a matrix with one column:
<me>v = \vec{1 3}.</me>
We will also write <m>0</m> for the zero vector.
<notation><usage>{1\choose 2}</usage><description>A vector</description></notation>
<notation><usage>0</usage><description>The zero vector</description></notation>
</p>
<p>Why make the distinction between points and vectors? A vector need not start at the origin: <em>it can be located anywhere</em>! In other words, an arrow is determined by its length and its direction, not by its location. For instance, these arrows all represent the vector <m>\color{seq-green}\vec{1 2}</m>.
<latex-code>
<![CDATA[
\begin{tikzpicture}
\draw[help lines] (-1,-1) grid (4, 4);
\draw[thick vector, seq-green] (0,1) -- (1,3);
\draw[thick vector, seq-green] (1,1) -- (2,3);
\draw[thick vector, seq-green] (2,0) -- (3,2);
\end{tikzpicture}
]]>
</latex-code></p>
<bluebox>
<p>Unless otherwise specified, we will assume that all vectors start at the origin.
</p>
</bluebox>
<p>Vectors makes sense in the real world: many physical quantities, such as velocity, are represented as vectors. But it makes more sense to think of the velocity of a car as being located at the car.</p>
<remark>
<p>Some authors use boldface letters to represent vectors, as in <q><m>\mathbf v</m></q>, or use arrows, as in <q><m>\oldvec v</m></q>. As it is usually clear from context if a letter represents a vector, we do not decorate vectors in this way.</p>
</remark>
<note xml:id="vectors-diff-pts">
<p>
Another way to think about a vector is as a <em>difference</em> between two
points, or the arrow from one point to another. For instance, <m>{1\choose 2}</m> is the arrow from <m>(1,1)</m> to <m>(2,3)</m>.
<latex-code>
<![CDATA[
\begin{tikzpicture}[whitebg nodes, thin border nodes]
\draw[help lines] (0,0) grid (4,4);
\draw[->] (0,0) -- (4,0);
\draw[->] (0,0) -- (0,4);
\point["${(1,1)}$" {left, text=seq-red}, seq-red] (x) at (1,1);
\point["${(2,3)}$" {right, text=seq-green}, seq-green] (y) at (2,3);
\draw[vector, seq-blue] (x)
-- node[below right=1pt] {${1\choose 2}$} (y);
\end{tikzpicture}
]]>
</latex-code></p></note>
</subsection>
<subsection>
<title>Vector Algebra and Geometry</title>
<p>Here we learn how to add vectors together and how to multiply vectors by numbers, both algebraically and geometrically.</p>
<definition hide-type="true">
<title>Vector addition and scalar multiplication</title>
<statement>
<p><ul>
<li>We can add two vectors together:
<me>\vec{ a b c} + \vec{ x y z} = \vec{ a+x b+y c+z}.</me>
<idx><h>Vector</h><h>addition</h></idx>
</li>
<li>We can multiply, or <term>scale</term>, a vector by a real number <m>c</m>:
<idx><h>Vector</h><h>scalar multiplication</h></idx>
<me>\def\r{\textcolor{red}}
\r c\vec{ x y z} = \vec{ \r c\cdot x \r c\cdot y \r c\cdot z}.</me>
We call <m>c</m> a <term>scalar</term> to distinguish it from a vector. If <m>v</m> is a vector and <m>c</m> is a scalar, then <m>cv</m> is called a <term>scalar multiple</term> of <m>v</m>.
</li>
</ul>
Addition and scalar multiplication work in the same way for vectors of length <m>n</m>.</p>
</statement>
</definition>
<example>
<p><me>
\vec{ 1 2 3} + \vec{ 4 5 6} = \vec{ 5 7 9} \sptxt{and}
-2\vec{ 1 2 3} = \vec{-2 -4 -6}.
</me></p>
</example>
<paragraphs>
<title>The Parallelogram Law for Vector Addition</title>
<p>
Geometrically, the sum of two vectors <m>v,w</m> is obtained as follows: place the tail of <m>w</m> at the head of <m>v</m>. Then <m>v+w</m> is the vector whose tail is the tail of <m>v</m> and whose head is the head of <m>w</m>. Doing this both ways creates a parallelogram. For example,
<me> \textcolor{seq-blue}{\vec{1 3}}
+ \textcolor{seq-green}{\vec{4 2}}
= \vec{5 5}.
</me>
<idx><h>Vector</h><h>addition</h><h>parallelogram law</h></idx>
</p>
<p>Why? The width of <m>v+w</m> is the sum of the widths, and likewise with
the heights.
<latex-code>
<![CDATA[
\begin{tikzpicture}
\draw[grid lines] (0,0) grid (5,5);
\fill[red!30, nearly transparent] (0,0) -- (1,3) -- (5,5) -- (4,2) -- cycle;
\begin{scope}[thin border nodes]
\draw[vector, seq-blue] (0,0) to["$v$"] (1,3);
\draw[vector, seq-green] (1,3) to["$w$"] (5,5);
\draw[vector, seq-green] (0,0) to["$w$"'] (4,2);
\draw[vector, seq-blue] (4,2) to["$v$"'] (5,5);
\draw[vector] (0,0) to["$v+w$" {sloped, pos=.6}] (5,5);
\end{scope}
\draw[|<->|] (0,5.5) -- (1,5.5);
\draw[|<->|] (1,5.5) -- (5,5.5);
\draw[|<->|] (0,-.5) -- (4,-.5);
\draw[|<->|] (4,-.5) -- (5,-.5);
\path (0,-.5) -- (5,-.5)
node[pos=.5, font=\small, below=1mm] {$5 = 1 + 4 = 4+1$};
\draw[|<->|] (5.5,0) -- (5.5,2);
\draw[|<->|] (5.5,2) -- (5.5,5);
\draw[|<->|] (-.5,0) -- (-.5,3);
\draw[|<->|] (-.5,3) -- (-.5,5);
\path (-.5, 0) -- (-.5, 5)
node[pos=.5, font=\small, above, rotate=90] {$5 = 2 + 3 = 3 + 2$};
\end{tikzpicture}
]]>
</latex-code></p>
<example hide-type="true">
<title>Interactive: The parallelogram law for vector addition</title>
<figure>
<caption>The parallelogram law for vector addition. Click and drag the heads of <m></m> and <m>w</m>.</caption>
<mathbox source="demos/vector-add.html" height="400px"/>
</figure>
</example>
</paragraphs>
<paragraphs>
<title>Vector Subtraction</title>
<idx><h>Vector</h><h>subtraction</h><h>picture of</h></idx>
<p>Geometrically, the difference of two vectors <m>v,w</m> is obtained as follows: place the tail of <m>v</m> and <m>w</m> at the same point. Then <m>v-w</m> is the vector from the head of <m>w</m> to the head of <m>v</m>. For example,
<me> \textcolor{seq-blue}{\vec{1 4}}
- \textcolor{seq-green}{\vec{4 2}}
= \vec{-3 2}.
</me>
</p>
<p>Why? If you add <m>v-w</m> to <m>w</m>, you get <m>v</m>.
<latex-code>
<![CDATA[
\begin{tikzpicture}
\draw[grid lines] (0,0) grid (5,5);
\begin{scope}[thin border nodes]
\draw[vector, seq-blue] (0,0) to["$v$"] (1,4);
\draw[vector, seq-green] (0,0) to["$w$"] (4,2);
\draw[vector] (4,2) to["$v-w$"' {sloped, pos=.7}] (1,4);
\end{scope}
\end{tikzpicture}
]]>
</latex-code></p>
<example hide-type="true">
<title>Interactive: Vector subtraction</title>
<figure>
<caption>Vector subtraction. Click and drag the heads of <m>v</m> and <m>w</m>.</caption>
<mathbox source="demos/vector-sub.html" height="400px"/>
</figure>
</example>
</paragraphs>
<paragraphs>
<title>Scalar Multiplication</title>
<p>A scalar multiple of a vector <m>v</m> has the same (or opposite) direction, but a different length. For instance, <m>2v</m> is the vector in the direction of <m>v</m> but twice as long, and <m>-\frac 12v</m> is the vector in the opposite direction of <m>v</m>, but half as long. Note that the set of all scalar multiples of a (nonzero) vector <m>v</m> is a <em>line</em>.
<idx><h>Vector</h><h>scalar multiplication</h><h>picture of</h></idx>
<latex-code>
<![CDATA[
\begin{tikzpicture}
\draw[grid lines] (-2,-2) grid (3,5);
\node[anchor=south] at (.5,5) {Some multiples of $v$.};
\draw[vector] (0,0) -- (1,2) node[below right, whitebg] {$v$};
\draw[vector] (0,0) -- (2,4) node[below right, whitebg] {$2v$};
\draw[vector] (0,0) -- (-.5,-1) node[left, whitebg] {$-\frac 12v$};
\point["$0v$" below right] at (0,0);
\begin{scope}[xshift=6cm]
\node[anchor=south] at (.5,5) {All multiples of $v$.};
\draw[help lines] (-2,-2) grid (3,5);
\draw[thick, seq-blue, <->] (-1,-2) -- (2.5, 5);
\point at (0,0);
\end{scope}
\end{tikzpicture}
]]>
</latex-code></p>
<example hide-type="true">
<title>Interactive: Scalar multiplication</title>
<figure>
<caption>Scalar multiplication. Drag the slider to change the scalar.</caption>
<mathbox source="demos/vector-mul.html" height="400px"/>
</figure>
</example>
</paragraphs>
</subsection>
<subsection>
<title>Linear Combinations</title>
<p>We can add and scale vectors in the same equation.</p>
<definition>
<idx><h>Linear combination</h><h>definition of</h></idx>
<idx><h>Vector</h><h>linear combination of</h><see>Linear combination</see></idx>
<statement>
<p>Let <m>c_1,c_2,\ldots,c_k</m> be scalars, and let <m>v_1,v_2,\ldots,v_k</m> be vectors in <m>\R^n</m>. The vector in <m>\R^n</m>
<me>c_1v_1 + c_2v_2 + \cdots + c_kv_k
</me>
is called a <term>linear combination</term> of the vectors <m>v_1,v_2,\ldots,v_k</m>, with <term>weights</term> or <term>coefficients</term> <m>c_1,c_2,\ldots,c_k</m>.
</p>
</statement>
</definition>
<p>Geometrically, a linear combination is obtained by stretching / shrinking the vectors <m>v_1,v_2,\ldots,v_k</m> according to the coefficients, then adding them together using the parallelogram law.
</p>
<example xml:id="vectors-eg-lincombo-plane">
<p>Let <m>v_1 = {1\choose 2}</m> and <m>v_2 = {1\choose 0}</m>. Here are some linear combinations of <m>v_1</m> and <m>v_2</m>, drawn as points.
<latex-code>
<![CDATA[
\begin{tikzpicture}[thin border nodes]
\draw[help lines] (-3,-3) grid (4, 4);
\draw[->] (-3,0) -- (4,0);
\draw[->] (0,-3) -- (0,4);
\draw[vector, seq1] (0,0) to["$v_1$"] (1,2);
\draw[vector, seq2] (0,0) to["\strut$v_2$"'] (1,0);
\point at (0,0);
\point[seq3] at (2,2);
\point[seq4] at (0,2);
\point[seq5] at (2,4);
\point[seq8] at (2,0);
\point[seq7] at (-1,-2);
\node[anchor=west, overlay] at (5, .75)
{
\begin{minipage}{0.6\linewidth}
\begin{itemize}
\color{seq3}
\item $v_1+v_2$
\color{seq4}
\item $v_1-v_2$
\color{seq5}
\item $2v_1\color{gray}+0v_2$
\color{seq8}
\item $2v_2$
\color{seq7}
\item $-v_1$
\end{itemize}
\end{minipage}
};
\end{tikzpicture}
]]>
</latex-code>
<idx><h>Linear combination</h><h>two vectors, picture of</h></idx>
The locations of these points are found using the parallelogram law for vector addition. Any vector on the plane is a linear combination of <m>v_1</m> and <m>v_2</m>, with suitable coefficients.</p>
</example>
<figure>
<caption>Linear combinations of two vectors in <m>\R^2</m>: move the sliders to change the coefficients of <m>v_1</m> and <m>v_2</m>. Note that any vector on the plane can be obtained as a linear combination of <m>v_1,v_2</m> with suitable coefficients.</caption>
<mathbox source="demos/spans.html?v1=1,2&v2=1,0&range=5&captions=combo" height="400px"/>
</figure>
<example hide-type="true">
<title>Interactive: Linear combinations of three vectors</title>
<figure>
<caption>Linear combinations of three vectors: move the sliders to change the coefficients of <m>v_1,v_2,v_3</m>. Note how the parallelogram law for addition of three vectors is more of a <q>parallepiped law</q>.</caption>
<mathbox source="demos/spans.html?v1=2,-1,1&v2=1,1,-1&v3=-1,1,4&range=5&captions=combo" height="500px"/>
</figure>
</example>
<specialcase>
<title>Linear Combinations of a Single Vector</title>
<idx><h>Linear combination</h><h>single vector, picture of</h></idx>
<p>A linear combination of a single vector <m>v = {1\choose 2}</m> is just a scalar multiple of <m>v</m>. So some examples include
<me>v=\vec{1 2},\quad \frac 32v=\vec{3/2 3},\quad -\frac12v = \vec{-1/2 -1},\quad\ldots
</me>
The set of all linear combinations is the <em>line through <m>v</m></em>. (Unless <m>v=0</m>, in which case any scalar multiple of <m>v</m> is again <m>0</m>.)
<latex-code>
<![CDATA[
\begin{tikzpicture}
\draw[grid lines] (-3,-3) grid (4, 4);
\clip (-3,-3) rectangle (4, 4);
\draw[thin, seq4] ($-2*(2,1)$) -- ($2*(2,1)$);
\draw[vector, seq1] (0,0) to["$v$" thin border] (2,1);
\point at (0,0);
\end{tikzpicture}
]]>
</latex-code></p>
</specialcase>
<specialcase>
<title>Linear Combinations of Collinear Vectors</title>
<idx><h>Linear combination</h><h>collinear vectors, picture of</h></idx>
<p>The set of all linear combinations of the vectors
<me>v_1 = \vec{2 2} \sptxt{and} v_2 = \vec{-1 -1}</me>
is the <em>line</em> containing both vectors.
<latex-code>
<![CDATA[
\begin{tikzpicture}
\draw[grid lines] (-3,-3) grid (4, 4);
\path[clip] (-3,-3) rectangle (4, 4);
\draw[thin, seq4] ($-2*(2,2)$) -- ($2*(2,2)$);
\draw[vector, seq1] (0,0) to["$v_1$" thin border] (2,2);
\draw[vector, seq2] (0,0) to["$v_2$"' thin border] (-1,-1);
\point at (0,0);
\end{tikzpicture}
]]>
</latex-code>
The difference between this and a previous <xref ref="vectors-eg-lincombo-plane">example</xref> is that both vectors lie on the same line. Hence any scalar multiples of <m>v_1,v_2</m> lie on that line, as does their sum.
</p>
</specialcase>
<example hide-type="true">
<title>Interactive: Linear combinations of two collinear vectors</title>
<figure>
<caption>Linear combinations of two collinear vectors in <m>\R^2</m>. Move the sliders to change the coefficients of <m>v_1,v_2</m>. Note that there is no way to <q>escape</q> the line.</caption>
<mathbox source="demos/spans.html?v1=2,2&v2=-1,-1&range=5&captions=combo&grid=disabled" height="400px"/>
</figure>
</example>
</subsection>
</section>