SUNY Geneseo Department of Mathematics

Some Uses of the Dot Product

Wednesday, February 8

Math 223
Spring 2023
Prof. Doug Baldwin

Return to Course Outline

Previous Lecture

Anything You Want to Talk About?

(No.)

Dot Product

Based on “The Dot Product and Its Properties,” “Using the Dot Product to Find the Angle between Two Vectors,” and “Projections” in section 1.3 of the textbook.

Key Ideas

The dot product of two vectors is a scalar.

The formula: ⟨x1,y1,z1⟩• ⟨x2,y2,z2⟩ = x1x2 + y1y2 + z1z2. This formula can also be used with vectors expressed in terms of the standard unit vectors.

Dot products follow algebra laws similar to many for numbers, e.g, they are commutative, scalar multiplication associates with dot product, etc.

Some uses of dot products:

Vectors are “orthogonal” if they are perpendicular. The dot product of 2 orthogonal vectors is always 0.

Questions

How to do projection calculations?

An example that might arise in projecting a vector in “global” coordinates onto a “right” viewing direction in a computer game: project ⟨1, 2, -1⟩ onto ⟨1, -1, 0⟩

Face at origin of coordinate system with vectors 1 negative 1 0 and 1 2 negative 1

There are 2 parts to this: finding the actual projection (a vector), and finding the length of the projection (a number). The length of the projection is what would actually be useful as a “right” coordinate for ⟨1, 2, -1⟩ in the game scenario.

To find the projection, consider the book’s formula for projections:

Projection of V onto U is U dot V over magnitude of U squared all times U

Where does this come from? A good way to think about that is that the formula is actually a fraction of the dot product times a unit vector in the direction of u. And that fraction turns out to be the length of v’s projection onto u,  since the length of the projection is the length of v times the cosine of the angle between the vectors, and the dot product is the product of the magnitudes of the vectors times the cosine of the angle between them. Dividing the dot product by the magnitude of u thus leaves you with just the magnitude of v times the cosine of the angle, i.e., the length of the projection. That length times a unit vector in the direction of u gives you the projected vector.

U dot V over magnitude of U squared times U is length of projection of V onto U times unit vector in U direction

Plugging ⟨1, -1, 0⟩ into the formula in place of u and ⟨1, 2, -1⟩ in place of v gives…

Projection of vector 1 2 negative 1 onto vector 1 negative 1 0 is vector negative 1 half 1 half 0

The other piece of information, the length of the projection, turns out to be simpler. The formula for it is just the part of the projection formula that we’ve already identified as giving the length of the projection, which in turn means that we’ve done most of the calculation for finding it as part of finding the projection:

Component of vector 1 2 negative 1 in direction 1 negative 1 0 is negative 1 over root 2

What are direction cosines?

Definition: the cosines of the angles a vector makes with the x, y, and z axes.

The angles between the vector and the axes are called “direction angles”

X, Y, and Z axes with vector emerging from origin, arcs show angles between vector and each axis

Is there an example of orthogonality?

I claim that vectors ⟨1, 1, 0⟩ and ⟨1, -1, 3⟩ are orthogonal, but ⟨1, -1, 3⟩ and ⟨1, 2, -1⟩ are not. Visualizing the vectors in a 3-dimensional coordinate system suggests that there is indeed a 90 degree angle between the first two. Calculating dot products confirms that the dot product of the first pair of vectors is 0, while the dot product of the second pair is not.

Vector 1 1 0 dot vector 1 negative 1 3 is 0; vector 1 negative 1 3 dot vector 1 2 negative 1 is negative 4

But notice that the zero vector, ⟨0, 0, 0⟩ dotted with anything is 0, even though it doesn’t make sense to talk about the 0-length 0 vector being perpendicular to anything. Technically, we define “orthogonal” to mean having a 0 dot product, so “orthogonal” almost always means perpendicular, except when the 0 vector is involved. 

Next

Another kind of product that’s useful for, among other things, finding vectors orthogonal to a pair of known vectors.

Please read “The Cross Product and Its Properties,” “Determinants and the Cross Product,” and “Using the Cross Product” in section 1.4 of the textbook.

Next Lecture