Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 5

Angle Between Two Vectors: Dot Product Application

Recommended resources

Welcome to our next lesson. In our previous explorations, we established a crucial connection between the algebraic dot product and the geometric concept of a vector's length, or magnitude. We saw that for any vector , its length can be found using the formula . This showed us that the dot product is more than just a computational trick; it's a fundamental tool for measuring geometric properties.

Today, we will unlock another, even more powerful geometric insight provided by the dot product. We will see how it allows us to determine the angle between any two vectors. This ability to measure angles is foundational to understanding the spatial relationships between vectors, a core theme in linear algebra. By the end of this lesson, you will be able to calculate the precise angle between two vectors in any n-dimensional space.

The Dot Product's Geometric Definition

So far, we have only worked with the algebraic definition of the dot product:

There is, however, an entirely equivalent geometric definition that relates the dot product to the angle between the vectors. This relationship is one of the most important theorems in this early stage of our course. It states that the dot product of two vectors is also equal to the product of their magnitudes multiplied by the cosine of the angle between them.

The video below introduces this key theorem.

The Vector Dot Product

This segment from Professor Dave Explains' "The Vector Dot Product" presents the geometric definition of the dot product and shows how to rearrange it to find the angle.

Watch the clip from the beginning. The main takeaway is the formula that connects the dot product, vector lengths, and the cosine of the angle.

As the video explains, the geometric definition of the dot product for two non-zero vectors and is:

where is the angle between and .

The power of this formula comes from the fact that we now have two different ways to calculate the same quantity. We can equate the algebraic and geometric definitions:

Since we already know how to compute everything in this equation except for , we can simply rearrange it to solve for the angle. By dividing by the magnitudes, we get:

To find the angle itself, we just need to take the inverse cosine (or arccosine) of this value:

This remarkable formula gives us a complete recipe for finding the angle between any two vectors using operations we've already mastered.


Calculating the Angle: Step-by-Step

Let's break down the calculation process. To find the angle between two vectors, you need to:

  1. Calculate the algebraic dot product of the two vectors.
  2. Calculate the magnitude (length) of the first vector.
  3. Calculate the magnitude of the second vector.
  4. Substitute these three numbers into the formula for .
  5. Use a calculator's inverse cosine function ( or ) to find the angle .

The following video provides a very clear, step-by-step walkthrough of this process for two vectors in a 2D plane.

Finding The Angle Between Two Vectors - Calculus 3

This video, "Finding The Angle Between Two Vectors," provides a detailed example of the full calculation.

Please watch the segment from this example. Notice how the narrator methodically calculates the three required components (dot product and two magnitudes) before plugging them into the final formula.

As you saw, the process is a straightforward application of the formula. Let's try another example, this time in 3D, to solidify the concept. The procedure is exactly the same, just with one extra component to account for in our calculations.

The next video demonstrates this with 3D vectors.

The Vector Dot Product

Let's return to the video from Professor Dave Explains for a 3D example.

Watch this segment from the start of the example. He follows the exact same steps: find the length of each vector, compute their dot product, and then use the formula to find the angle.

This method is powerful because it works regardless of the dimension. Whether the vectors are in 2D, 3D, or even 100D space, the formula holds true.


A Special Case: Orthogonal Vectors

Let's consider a fascinating special case. What happens if the dot product of two non-zero vectors is zero?
If , our formula becomes:

The angle for which is (or radians). This means the vectors are perpendicular to each other. In linear algebra, we use the term orthogonal to describe this.

This gives us an incredibly simple and powerful test for perpendicularity:

Two non-zero vectors are orthogonal if and only if their dot product is zero.

The next short clip summarizes this crucial point.

The Vector Dot Product

The final part of the Professor Dave video discusses this important consequence.

Watch this concluding segment from this timestamp. It directly links a dot product of zero to orthogonality.

We don't need to do any complex geometric reasoning. A single algebraic calculation—the dot product—tells us instantly if two vectors are at a right angle to one another. This is a perfect example of the synergy between algebra and geometry that makes linear algebra so effective.


Conclusion

In this lesson, we've added a significant new tool to our vector toolkit. By introducing the geometric definition of the dot product, we've unlocked the ability to measure the angle between vectors.

Here are the key takeaways:

  • The dot product has both an algebraic definition () and a geometric one ().
  • By equating these two definitions, we derive the formula to find the angle between two vectors: .
  • The calculation is a multi-step process: compute the dot product, compute both magnitudes, and then use the inverse cosine function.
  • A dot product of zero implies that two non-zero vectors are orthogonal (perpendicular), as .

We've just had a glimpse of the concept of orthogonality. In our next lesson, we will explore this idea in much greater detail, as it is one of the most important concepts in all of linear algebra, with applications ranging from computer graphics to data science.