The dot product measures how aligned two vectors are with each other.

The definition of the dot product

We have already seen how to add vectors and how to multiply vectors by scalars.

In this section we will define a way to “multiply” two vectors called the dot product. The dot product measures how “aligned” two vectors are with each other.

The first thing you should notice about the the dot product is that

Compute.
Compute.
Let be nonzero vectors in . Which of the following expressions make sense?
Think about which terms/factors are vectors and which terms/factors are scalars.
Which of the following are vectors?

The dot product allows us to write some complicated formulas more simply.

Compute the magnitude of the vector .

The geometry of the dot product

Let’s see if we can figure out what the dot product tells us geometrically. As an appetizer, we give the next theorem: the Law of Cosines.

When what does the law of cosines say?
It is the Pythagorean theorem. It is the law of sines. It is undefined.

We can rephrase the Law of Cosines in the language of vectors. The vectors , , and form a triangle

so if is the angle between and we must have

The theorem above tells us some interesting things about the angle between two (nonzero) vectors.

We have a special buzz-word for when the dot product is zero.

From this we see that the dot product of two vectors is zero if those vectors are orthogonal. Moreover, if the dot product is not zero, using the formula allows us to compute the angle between these vectors via where .

Find the angle between the vectors.
Find all unit vectors orthogonal to both vectors and , given by Write your vectors in the order of increasing -components.

Projections and components

Projections

One of the major uses of the dot product is to let us project one vector in the direction of another. Conceptually, we are looking at the “shadow” of one vector projected onto another, sort of like in the case of a sundial.

In essence we imagine the “sun” directly over a vector, casting a shadow onto another vector.

While this is good starting point for understanding orthogonal projections, now we need the definition.

Consider the vector and the vector . Compute .
Draw a picture.
Let and . Compute .
Draw a picture.

To compute the projection of one vector along another, we use the dot product.

Find the projection of the vector in the direction of the vector .
Let and be nonzero vectors in . Let . Select all statements that must be true.

Components

Scalar components compute “how much” of a vector is pointing in a particular direction.

Let . Compute .
Compute .
Compute .
To compute the scalar component of a vector in the direction of another, you use the dot product.
Let and be nonzero vectors and let be the angle between them. Which of the following are true?

Orthogonal decomposition

Given any vector in , we can always write it as for some real numbers and . Here we’ve broken into the sum of two orthogonal vectors — in particular, vectors parallel to and . In fact, given a vector and another vector you can always break into a sum of two vectors, one of which is parallel to and another that is perpendicular to . Such a sum is called an orthogonal decomposition. Move the point around to see various orthogonal decompositions of vector .

Let and . What is the orthogonal decomposition of in terms of ?
Let and . What is the orthogonal decomposition of in terms of ?

Now we give an example where this decomposition is useful.

The algebra of the dot product

We summarize the arithmetic and algebraic properties of the dot product below.

Instead of defining the dot product by a formula, we could have defined it by the properties above! While this is common practice in mathematics, the process is a bit abstract and is perhaps beyond the scope of this course. Nevertheless, we know that you are an intrepid young mathematician, and we will not hold back. We will now show that there is only one formula which gives us all of these properties, and it will be our formula for the dot product.