Loading

Instructions

These slides should work with any modern browser: IE 9+, Safari 5+, Firefox 9+, Chrome 16+.

If your browser or hardware does not support WebGL, interacting with models will be very slow (and in general models can get CPU-intensive). Navigate to a slide away from any running model to stop model animation.

Math 126

Lecture 3

Behind us

  • Vectors, equivalence, triangle rule
  • Components: addition and scaling
  • Application to collinearity of points

Questions?

Coming up

Dot products, projections, cross product

Read Sections 12.3 and 12.4 of the book. We will not cover everything in lecture or section, but you will need it all for the rest of your lives!

Warm up

Let's start with a few natural questions about vectors that arise in the world.

Warm up

Question : a light shines perpendicularly down onto the plane $x+y+z=0$. Can we calculate the shadow of the vector $\langle 3,4,5\rangle$ in the plane? (Natural question for computer graphics, architecture, etc. )

Warm up

Similar: a light shines perpendicularly down onto the plane $z=0$. How can we calculate the shadow of the vector $\langle 3,4,5\rangle$ in the plane?

Warm up

Similar: a light shines perpendicularly down onto the plane $z=0$. How can we calculate the shadow of the vector $\langle 3,4,5\rangle$ in the plane?

Can you draw a picture of this one?

Warm up

Similar: a light shines perpendicularly down onto the plane $z=0$. How can we calculate the shadow of the vector $\langle 3,4,5\rangle$ in the plane?

Can you draw a picture of this one?

Answer:

Warm up

Similar: a light shines perpendicularly down onto the plane $z=0$. How can we calculate the shadow of the vector $\langle 3,4,5\rangle$ in the plane?

Can you draw a picture of this one?

Answer: projecting into the $xy$-plane just forgets about the $z$-component!

Warm up

Question: given two vectors in $\mathbf R^3$, how can we compute the angle between them?

Today

We'll learn about a marvelous tool for answering these questions called the dot product .

As with components and addition of vectors, coordinates allow us to calculate the geometry.

As simple as they seem, the ideas we'll discuss here tap into one of the richest veins of ideas in mathematics.

Definition

The dot product of two vectors $$\mathbf a=\langle a_1,a_2,a_3\rangle\textrm{ }\mathbf b=\langle b_1,b_2,b_3\rangle$$ is the number $$\mathbf a\cdot\mathbf b=a_1b_1+a_2b_2+a_3b_3.$$

Definition

The dot product of two vectors $$\mathbf a=\langle a_1,a_2,a_3\rangle\textrm{ }\mathbf b=\langle b_1,b_2,b_3\rangle$$ is the number $$\mathbf a\cdot\mathbf b=a_1b_1+a_2b_2+a_3b_3.$$

Note: this is a number (scalar), not a vector!

Examples

  • $\langle 1, 2, 3\rangle\cdot\langle 3, 0, 1\rangle = 1\cdot 3+2\cdot 0+3\cdot 1=6$
  • $\langle 2, 5\rangle\cdot\langle 5, -2\rangle = 2\cdot 5 + 5\cdot(-2) = 0$

Practice

Compute these dot products (build a data set for your inner child!):

Observations

Sweet Theorem

Given two vectors $\mathbf a$ and $\mathbf b$, the angle $\theta$ between them satisfies

$$\mathbf a\cdot\mathbf b=|\mathbf a||\mathbf b|\cos(\theta).$$

Sweet Theorem

Given two vectors $\mathbf a$ and $\mathbf b$, the angle $\theta$ between them satisfies

$$\mathbf a\cdot\mathbf b=|\mathbf a||\mathbf b|\cos(\theta).$$

Since by convention we always take the angle between two vectors to lie between $0$ and $\pi$ radians, this determines $\theta$ uniquely .

This theorem shows how the dot product relates to both angle and length

Let's see how we can leverage this for both angles and lengths.

Angles: example

The angle $\theta$ between $\langle 1,3,5\rangle$ and $\langle -1,3,2\rangle$ satisfies

$$18=\sqrt{35}\sqrt{14}\cos(\theta).$$

Conclusion: $\theta=0.6212404....$ radians, or around $35.59$ degrees.

No picture necessary!

Angles: one to try

What is the angle between $\langle 1,0,0\rangle$ and $\langle 2,2,0\rangle$?

Angles: orthogonality

Two vectors $\mathbf a$ and $\mathbf b$ are perpendicular if and only if $\mathbf a\cdot\mathbf b=0$.

Geometry encoded with numbers.

Length: True or False?

For any vector $\mathbf a$, we have that $\mathbf a\cdot\mathbf a$ equals the length of $\mathbf a$.

Length: components

Suppose $\mathbf u$ is a unit vector (i.e., a vector of length $1$). Then for any vector $\mathbf a$, the new vector

$$\operatorname{proj}_{\mathbf u}(\mathbf a)=(\mathbf a\cdot\mathbf u)\mathbf u$$

gives the component of $\mathbf a$ in the direction of $\mathbf u$ . This is also called the projection of $\mathbf a$ onto the line spanned by $\mathbf u$ .

Example

Practice

More problems

Original question

How do we calculate the projection of a vector into a plane ?

What is the projection in human terms? "Walk along the plane from the origin of the vector until you are just underneath its tip."

So: if you look straight "up" (perpendicular to the plane) from the endpoint of the projection, you see the endpoint of the original vector.

How do we express "first go here, then go there" using vectors?

What if you project onto the line perpendicular to the plane and subtract that projection from the original vector?

Next time: cross product !

Powered by MathJax HTML5 Powered with CSS3 / Styling, Graphics, 3D & Effects, Multimedia, and Semantics

/