Lecture 02

The Products

APMA E2000

Drew Youngren dcy2@columbia.edu

$\gdef\RR{\mathbb{R}}$ $\gdef\vec{\mathbf}$ $\gdef\bv#1{\begin{bmatrix} #1 \end{bmatrix}}$ $\gdef\proj{\operatorname{proj}}$ $\gdef\comp{\operatorname{comp}}$

Announcements

  • HW 0 due Friday at noon.
  • HW 1 due Tuesday at 8am on Gradescope.
  • Recitations start today

1-minute review

Vector Operations

Operation Notation Formula
Magnitude $| \mathbf v |$ $\sqrt{\sum v_i^2}$
Scalar Multiplication $c \mathbf v$ $\left\langle c v_1, \ldots, c v_n \right\rangle$
Vector Addition $\mathbf v + \mathbf w$ $\left\langle v_1 + w_1, \ldots, v_n + w_n \right\rangle$
Convex Combinations

How do you turn a frog into a prince?

\[(1-t)\text{frog} + t \text{ Prince}\]

A frog A prince

t = 0

Odds and ends

  • $|\mathbf x - \mathbf y|$ is the distance formula.
  • Generally, dimension of solution drops by 1 with each equation.
  • Special basis vectors in $\mathbb{R}^3$: \[\mathbf i = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} \qquad \mathbf j = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \qquad \mathbf k = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}\]
    \[ \left\langle a, b, c \right\rangle = a\,\mathbf i + b\,\mathbf j + c\,\mathbf k \]

The Dot Product

Definition

Let $\mathbf v = \left\langle v_1, \ldots, v_n \right\rangle$ and $\mathbf w = \left\langle w_1, \ldots, w_n \right\rangle$. The dot product (or scalar product or inner product ) is:

\[ \vec v \cdot \vec w = \sum_{i=1}^n v_i w_i \]
Examples

$\langle 4,2, -1 \rangle \cdot \langle -2,6, 0 \rangle = -8 + 12 + 0 = 4 $

$\begin{bmatrix} 4 \\ 2 \\ -1 \end{bmatrix} \cdot \begin{bmatrix} -2 \\ 6 \\ 0 \end{bmatrix} = \begin{matrix} -8 \\ +12 \\ \, \end{matrix} = 4 $

$\vec i\cdot \vec i = \vec j\cdot \vec j = \vec k\cdot \vec k = 1$

$\vec i\cdot \vec j = \vec j\cdot \vec k = \vec k\cdot \vec i = 0$

: $\text{Subtotal} = \text{Qty} \cdot \text{Price}$

Properties

  • positive definite: \[\vec v \cdot \vec v = |\vec v|^2\]
  • symmetric: \[\vec v \cdot \vec w = \vec w \cdot\vec v\]
  • bilinear: \[ \vec u \cdot (c\vec v + d\vec w) = c \vec u \cdot \vec v + d \vec u \cdot \vec w\]

Pitfall Warning

\[ \vec v \cdot \vec a = \vec v \cdot \vec b \]

does NOT mean

\[\vec a = \vec b \]

Meaning

What does $\vec v \cdot \vec w$ measure?

When is this large?

\[\vec v \cdot \vec w = v_1 w_1 + v_2 w_2 + v_3 w_3 + v_4 w_4 \]

$\vec v \cdot \vec w =$

Geometric formula

\[ \vec v \cdot \vec w = |\vec v ||\vec w | \cos \theta \]

Example

What is the angle between $ \langle 2, 2 , 1 \rangle$ and $\langle -3, 2, 6 \rangle$ ?

\[ \theta = \cos^{-1} \left( \frac{4}{21}\right) \approx 79^\circ \]

Projection

Question

Which multiple of $\vec w$ gets closest to $\vec v$?

Formulas

\[ \text{proj}_{\mathbf w} \mathbf v = \frac{\mathbf v \cdot \mathbf w}{\mathbf w \cdot \mathbf w} \mathbf w \] \[ \text{comp}_{\mathbf w} \mathbf v = \frac{\mathbf v \cdot \mathbf w}{|\mathbf w| } \]
Examples
  • $\proj_{\vec w}(c \vec w) = $ $c\vec w$
  • $\comp_{\vec j}\left\langle 2, -13, 5 \right\rangle = $ $-13 $
  • $\proj_{\vec w}(c\vec u + d\vec v)= $ $c\proj_{\vec w}\vec u + d\proj_{\vec w}\vec v$
Example

Show that for every $\vec w \neq \vec 0$, $\vec v - \proj_{\vec w} \vec v$ is orthogonal to the base $\vec w$.

\[ \begin{align*} (\vec v - \proj_{\vec w} \vec v)\cdot \vec w &= (\vec v - \frac{\vec v \cdot \vec w}{\vec w \cdot \vec w} \vec w)\cdot \vec w \\ &= \vec v \cdot \vec w - \frac{\vec v \cdot \vec w}{\vec w \cdot \vec w} (\vec w\cdot \vec w) \end{align*} \]

Exercise

Suppose one wants to walk to another town that is a mile east and 3 miles north from their current location but can only walk exactly northeast or northwest. How long is the most efficient walk?

The Cross Product

There is a special vector product, or cross product in $\RR^3$ only. \[\vec v \times \vec w = \vec u\] "A vector cross a vector is a vector."

Defining properties

  • bilinearity: $ \vec u \times (c\vec v + d\vec w) = c \vec u \times \vec v + d \vec u \times \vec w$
  • skew-symmetry: $\vec v \times \vec w = - \vec w \times \vec v$
  • $\vec i \times \vec j = \vec k, \qquad \vec j \times \vec k = \vec i, \qquad \vec k \times \vec i = \vec j$

Formula

\[\langle a,b,c \rangle\times \langle d,e,f \rangle = (a\vec i + b\vec j + c \vec k)\times(d\vec i + e\vec j + f \vec k) \]
\[ = (bf - ce) \vec i + (cd - af) \vec j + (ae - bc) \vec k \]
$ = \begin{vmatrix} \vec i & \vec j & \vec k \\a &b &c \\ d & e & f \\ \end{vmatrix} $ $ \begin{matrix} \vec i & \vec j \\a &b \\ d & e \\ \end{matrix} $

Properties

  • $\vec v \times \vec w \cdot \vec v = \vec v \times \vec w \cdot \vec w = \vec 0$
  • The direction of $\vec v \times \vec w$ follow the Right Hand Rule (RHR).
  • $|\vec v \times \vec w| = |\vec v ||\vec w| \sin \theta$

3Demos

Learning Outcomes

You should be able to...
  • Exploit the algebraic and geometric formulas of the dot product to:
    • compute said product.
    • calculate angles.
    • identify orthogonal vectors.
  • Relate scalar and vector projection to one another and interpret visually.
  • Use the formulas to determine if projection identities hold or have cournterexamples.