Lecture notes (this page) available via link from Course Overview unit on Brightspace. Direct link: https://jdc.math.uwo.ca/l. (That's an "ell" at the end.)
Note taking: I will be using the board a few times today, and when I do that, I recommend that you take notes.
Today we start Section 1.2, which we will finish next class. Continue reading Section 1.2. Work through suggested exercises.
Homework 1 due Friday at 11:55pm. See course outline for flexibility in homework submission. Check that you can log into WeBWorK. Note that after registering it may take 24 hours before you can log in.
Next office hour: Friday, 2:30-3:30, MC130 (Middlesex College). Drop by with any questions! The Help Centre will probably start on Sept 16.
Questions: Please ask questions during class. For example, if you'd like me to go over an explanation again, or do an additional example, others probably would like this as well. I don't have time after class for questions like that, but you can also come to office hours and use the forum.
Definition: A vector $\vv$ is a linear combination of vectors $\vv_1, \vv_2, \ldots, \vv_k$ if there exist scalars $c_1, c_2, \ldots, c_k$ (called coefficients) such that $$ \vv = c_1 \vv_1 + \cdots + c_k \vv_k . $$ We also call the coefficients coordinates when we are thinking of the vectors $\vv_1, \vv_2, \ldots, \vv_k$ as defining a new coordinate system.
Example: $\coll 1 {-1}$ is a linear combination of $\coll 1 1,$ $\coll 2 {-1}$ and $\coll 0 1,$ since \[ \coll 1 {-1} = \red{1} \coll 1 1 + \red{0} \coll 2 {-1} + \red{(- 2)} \coll 0 1 \]
How to find the coefficients will be covered in Chapter 2.
Definition: The dot product of vectors $\vu$ and $\vv$ in $\R^n$ is the real number defined by $$ \vu \cdot \vv := u_1 v_1 + \cdots + u_n v_n . $$ Since $\vu \cdot \vv$ is a scalar, the dot product is sometimes called the scalar product, not to be confused with scalar multiplication $c \vv.$
The dot product will be used to define length, distance and angles in $\R^n.$
Example: For $\vu = [1, 0, 3]$ and $\vv = [2, 5, -1],$ we have $$ \vu \cdot \vv = \cyc{ex1-1}{1 \cdot 2 + 0 \cdot 5 + 3 \cdot (-1)} = \cyc{ex1-2}{2 + 0 - 3} = \cyc{ex1-3}{-1 .} $$ Exercise: Compute the dot product of $[1, 2, 3, 4, 5]$ and $[10, 0, 0, 0, -2].$
Theorem 1.2: For vectors $\vu, \vv, \vw$ in $\R^n$ and $c$ in $\R$:
(a) $\ \vu \cdot \vv = \vv \cdot \vu$
(b) $\ \vu \cdot (\vv + \vw) = \vu \cdot \vv + \vu \cdot \vw$
(c) $\ (c \vu) \cdot \vv = c(\vu \cdot \vv) = \vu \cdot (c \vv)$
(d) $\ \vu \cdot \vu \geq 0$
(e) $\ \vu \cdot \vu = 0$ if and only if $\vu = \vec 0$
Again, very similar to how multiplication and addition of numbers works.
Explain (b) and (d) on board. (a) and (c) are explained in text.
The length of a vector $\vv = [v_1, v_2]$ in $\R^2$ is $\sqrt{v_1^2 + v_2^2},$
using the Pythagorean theorem.
Notice that this is equal to $\red{\sqrt{\vv \cdot \vv}}.$
This motivates the following definition:
Definition: The length or norm of a vector $\vv$ in $\R^n$ is the scalar $\|\vv\|$ defined by $$ \|\vv\| := \sqrt{\vv \cdot \vv} = \sqrt{v_1^2 + \cdots + v_n^2} . $$
Example: The length of $[1, 2, 3, 4]$ is $\sqrt{1^2 + 2^2 + 3^2 + 4^2} = \sqrt{30}.$
Note 3-1: As expected, scaling a vector scales its length by $|c|$: $\|c \vv\| = |c| \|\vv\|.$ (Board.)
Definition: A vector of length 1 is called a unit vector.
The unit vectors in $\R^2$ form a circle.
Examples are $[ 1, 0 ],$ $[0, 1],$ $[\frac{-1}{\sqrt{2}},
\frac{1}{\sqrt{2}}],$ and lots more.
The first two are denoted $\ve_1$ and $\ve_2$ and are called
the standard unit vectors in $\R^2.$
The unit vectors in $\R^3$ form a sphere. The standard unit vectors in $\R^3$ are $\ve_1 = [1, 0, 0],$ $\ve_2 = [0, 1, 0]$ and $\ve_3 = [0, 0, 1].$
More generally, the standard unit vectors in $\R^n$ are $\ve_1, \ldots, \ve_n,$ where $\ve_i$ has a $1$ as its $i$th component and a $0$ for all other components: $$ \ve_i := [0, \ldots, 0, 1, 0, \ldots, 0] . $$
Given any non-zero vector $\vv,$ there is a unit vector in the same direction
as $\vv,$ namely
$$
\frac{1}{\|\vv\|} \svv
$$
This has length $1$ using Note 3-1:
$$
\left\| \frac{1}{\|\vv\|} \svv \right\|
= \left| \frac{1}{\|\vv\|} \right| \| \svv \|
= \frac{1}{\|\vv\|} \| \svv \|
= 1.
$$
This is called normalizing a vector.
Example: If $\vv = [3, 4]$ then $$\|\vv\| = \sqrt{3^2+4^2} = \sqrt{25} = 5 .$$ So $$\frac{1}{\|\vv\|} \svv = \frac{1}{5} [3, 4] = [3/5, 4/5] .$$ And you can check that $[3/5, 4/5]$ has length $1.$
Next an important theorem about lengths of vectors:
Theorem 1.5: The Triangle Inequality:
For all $\vu$ and $\vv$ in $\R^n,$
$$
\| \vu + \vv \| \leq \| \vu \| + \| \vv \| .
$$
Theorem 1.5 is geometrically plausible, at least in $\R^2$ and $\R^3.$ The book proves that it is true in $\R^n$ using Theorem 1.4, which we will discuss below.
Example: Let $\vu = [1,0]$ and $\vv = [3,4]$ in $\R^2.$ Then $\vu + \vv = [1,0] + [3,4] = [4,4].$ We compute $$ \kern-4ex \| \vu + \vv \| = \| [4,4] \| = \sqrt{4^2 + 4^2} = \sqrt{32} \simeq 5.657 $$ and $$ \kern-4ex \| \vu \| + \| \vv \| = \sqrt{1^2 + 0^2} + \sqrt{3^2 + 4^2} = \sqrt{1} + \sqrt{25} = 1 + 5 = 6 $$
Thinking of vectors $\vu$ and $\vv$ as starting from the origin, we define the distance between them by the formula $$ \kern-9ex d(\vu, \vv) := \| \vu - \vv \| = \sqrt{(u_1 - v_1)^2 + \cdots + (u_n - v_n)^2}, $$ generalizing the formula for the distance between points in the plane.
Example: The distance between $\vu = [10, 10, 10, 10]$ and $\vv = [11, 11, 11, 11]$ is $$\sqrt{(-1)^2 + (-1)^2 + (-1)^2 + (-1)^2} = \sqrt{4} = 2 .$$
The unit vector in $\R^2$ at angle $\theta$ from the $x$-axis is $\vu = [\cos \theta, \sin \theta].$
Notice that
$$
\kern-4ex
\vu \cdot \vec e_1 = [\cos \theta, \sin \theta] \cdot [1, 0] = 1 \cdot \cos \theta + 0 \cdot \sin \theta = \cos \theta .
$$
More generally, given vectors $\vu$ and $\vv$ in $\R^2,$ one can show using the law of cosines that
$$
\vu \cdot \vv = \| \vu \| \, \| \vv \| \, \cos \theta ,
$$
where $\theta$ is the angle between them (when drawn starting at the
same point).
In particular, $|\vu \cdot \vv| \leq \| \vu \| \, \| \vv \|,$ since $|\cos \theta| \leq 1.$
This holds in $\R^n$ as well, but we won't give the proof:
Theorem 1.4: The Cauchy-Schwarz Inequality: For all $\vu$ and $\vv$ in $\R^n,$ $$ | \vu \cdot \vv | \leq \| \vu \| \, \| \vv \| . $$
Definition: We can therefore use the dot product to define the angle between two vectors $\vu$ and $\vv$ in $\R^n$ by the formula $$ \cos \theta := \frac{\vu \cdot \vv}{\| \vu \| \, \| \vv \|}, \quad \text{i.e.,} \quad \theta := \arccos \left( \frac{\vu \cdot \vv}{\| \vu \| \, \| \vv \|} \right), $$ where we choose $0 \leq \theta \leq 180^\circ.$ This makes sense because the fraction is between -1 and 1.
To help remember the formula for $\cos \theta,$ note that the denominator normalizes the two vectors to be unit vectors.
Example 3-2: (Board.) Angle between $\vu = [1, 2, 1, 1, 1]$ and $\vv = [0, 3, 0, 0, 0].$
An applet illustrating the dot product. (Another one: javascript.)
For a random example, you'll need a calculator, but for hand calculations you can remember these cosines: $$ \small\kern-8ex \begin{aligned} \cos 0 = \cos 0^\circ &= \frac{\sqrt{4}}{2} = 1, & \cos (\pi/6) = \cos 30^\circ &= \frac{\sqrt{3}}{2} , \\ \cos (\pi/4) = \cos 45^\circ &= \frac{\sqrt{2}}{2} = \frac{1}{\sqrt{2}}, & \cos (\pi/3) = \cos 60^\circ &= \frac{\sqrt{1}}{2} = \frac{1}{2}, \\ \cos (\pi/2) = \cos 90^\circ &= \frac{\sqrt{0}}{2} = 0 , \end{aligned} $$ using the usual triangles.