SUNY Geneseo Department of Mathematics

The Dot Product

Monday, September 12

Math 223 01
Fall 2022
Prof. Doug Baldwin

Return to Course Outline

Previous Lecture

Anything You Want to Talk About?

(No.)

Misc

McNair Program

The McNair Scholars Program is designed to help students get into Ph. D. programs, if they are first-generation and low-income, or from groups traditionally under-represented in Ph. D. programs.

It’s accepting applications.

Participants have a chance to do and get paid for research during the summer, and also get help preparing for and applying to graduate school.

The application deadline is November 14.

For more information, see geneseo.edu/mcnair, or email mcnair@geneseo.edu, or watch for the McNair program tabling in the Union on September 20 or October 13 between 1:00 and 3:00.

Problem Set 1 Grading

Remember that the deadline for grading problem set 1 is tomorrow, the 13th.

If you haven’t already made an appointment for grading it, please do.

The Dot Product

Based on (most of) section 1.3 in the textbook.

Questions?

(None.)

Key Ideas

The dot product is the sum of the products of the components of 2 vectors, i.e., ⟨u1, u2, u3⟩ • ⟨v1, v2, v3⟩ = u1v1 + u2v2 + u3v3.

There’s a relationship between the dot product and the angle between vectors u and v: cos Θ = uv / |u| |v|

Vectors are “orthogonal” when their dot product is 0. In most cases this means the vectors are geometrically perpendicular. (But vectors that don’t have a geometric interpretation can still be orthogonal, and 0v = 0 for all v, even though it doesn’t really make sense to say that the 0 vector is perpendicular to anything.)

Projection formulas:

Examples

Warm-Up

Find the dot product ⟨3, -2, 2⟩ • ⟨2, 4, -3⟩

Sum the products of components, i.e., 3×2 + (-2)×4 + 2×(-3) = 6 - 8 - 6 = -8

Angles

What’s the cosine of the angle between ⟨3, -2, 2⟩ and ⟨2, 4, -3⟩?

Use the formula for cosine in terms of dot product:

Vectors 3, negative 2, 2 and 2, 4, negative 3; dot product over product of lengths is cosine of angle between them

Dr. Whowhatwhenwherewhyandhow is driving his time machine along a 4-dimensional country road when he comes to a crossroads. If the road the doctor is on is parallel to ⟨1, 4, -2, 3⟩ and the other road is parallel to ⟨-3, 1, 5, 3⟩, do the roads meet at a 90 degree angle?

Use the idea that orthogonal vectors are perpendicular (even in more than 3 dimensions):

Time machine approaching crossroads; dot product of direction vectors is 0

Projections

Computer graphics programs that draw a 3-dimensional scene as viewed from somewhere inside that scene face a problem that the coordinate system relative to which the scene is defined is probably not the natural one for viewing it. The natural coordinate system for defining the scene has axes aligned with key features or directions of the scene itself; the natural one for viewing it has an x axis that points to the viewer’s right, a y axis that points away from them, and a z axis that points up.

Elephant and tree in one coordinate system, viewed by someone with their own coordinate system

These graphics programs therefore have to convert coordinates in the “world” coordinate system into coordinates in the “viewing” coordinate system in order to draw their pictures. One way to do this, assuming the origins are at the same place, is to project vectors from the origin to points in the world system onto vectors parallel to the viewer’s axes.

For example, suppose the tip of the elephant’s trunk in world coordinates is (4, 0, 1), and the viewer’s “right” vector in world coordinates is  ⟨1, 1, 0⟩. What is the viewer’s “right” coordinate for the tip of the trunk?

Use the formula for a vector projection to get an actual vector that points in the “right” direction, and the formula for the length of the projection to get the distance from the origin to the tip of the trunk in the “right” direction, i.e., the “right” coordinate of the trunk:

Calculating projection, and length of projection, of one vector onto another

Next

The dot product produces a scalar from 2 vectors; another kind of product that produces a vector also has lots of geometric uses. This second kind of product is the so-called “cross product,” and we’ll talk about it tomorrow.

Please read “The Cross Product and Its Properties” and “Determinants and the Cross Product” in section 1.4 of the textbook. (The second of these isn’t intrinsically super important for this course, but it’s the way the author likes to compute cross products, so you’ll see it in future readings.)

Next Lecture