1. Vectors and Geometry

Dot Product

Explores the dot product, its geometric interpretation, and applications in projections and angles.

Dot Product

Welcome to today’s lesson, students! 🎉 We’re diving into an essential concept in Calculus 3: the dot product. By the end of this lesson, you’ll understand what the dot product is, how to compute it, and how it’s used to find angles between vectors and projections. We’ll explore the geometry behind it and connect it to real-world applications. Let’s get started and see how this powerful tool can help you in fields like physics, engineering, and computer graphics! 🚀

What is the Dot Product?

Before we jump into formulas, let’s break down what the dot product actually is. The dot product (also called the scalar product or inner product) is a way to multiply two vectors and get a scalar (a single number) as a result.

Let’s say we have two vectors:

  • $\mathbf{a} = \langle a_1, a_2, a_3 \rangle$
  • $\mathbf{b} = \langle b_1, b_2, b_3 \rangle$

The dot product of these two vectors is defined as:

$\mathbf{a}$ $\cdot$ $\mathbf{b}$ = a_1 b_1 + a_2 b_2 + a_3 b_3

This is the algebraic definition. It’s simply the sum of the products of the corresponding components. But there’s also a geometric definition, which we’ll get to in a bit.

Example: Calculating a Dot Product

Say we have two vectors:

  • $\mathbf{a} = \langle 3, -2, 5 \rangle$
  • $\mathbf{b} = \langle 4, 6, -1 \rangle$

The dot product is:

$\mathbf{a}$ $\cdot$ $\mathbf{b}$ = (3)(4) + (-2)(6) + (5)(-1) = 12 - 12 - 5 = -5

So the dot product of $\mathbf{a}$ and $\mathbf{b}$ is $-5$. That’s the scalar result.

Geometric Interpretation of the Dot Product

Now, let’s talk about what this number means. The dot product also tells us something about the angle between two vectors.

There’s a second formula for the dot product that relates it to the angle $\theta$ between two vectors:

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

Here:

  • $|\mathbf{a}|$ is the magnitude (length) of vector $\mathbf{a}$.
  • $|\mathbf{b}|$ is the magnitude of vector $\mathbf{b}$.
  • $\theta$ is the angle between the two vectors.

So, the dot product is the product of the magnitudes of the two vectors and the cosine of the angle between them. This is the geometric definition of the dot product.

Let’s break it down with an example.

Example: Finding the Angle Between Two Vectors

Suppose we have:

  • $\mathbf{a} = \langle 1, 0, 0 \rangle$
  • $\mathbf{b} = \langle 0, 1, 0 \rangle$

We know right away that these two vectors are perpendicular (they form a 90° angle).

Let’s confirm this using the dot product.

First, calculate the dot product:

$\mathbf{a}$ $\cdot$ $\mathbf{b}$ = (1)(0) + (0)(1) + (0)(0) = 0

The dot product is $0$. Now, let’s look at the magnitudes of the vectors:

  • $|\mathbf{a}| = \sqrt{1^2 + 0^2 + 0^2} = 1$
  • $|\mathbf{b}| = \sqrt{0^2 + 1^2 + 0^2} = 1$

So we have:

$\mathbf{a}$ $\cdot$ $\mathbf{b}$ = |$\mathbf{a}$| |$\mathbf{b}$| $\cos($$\theta)$ = (1)(1) $\cos($$\theta)$ = $\cos($$\theta)$

We know the dot product is $0$, so:

$0 = \cos(\theta)$

This gives us $\theta = 90^\circ$. Perfect! The vectors are indeed perpendicular.

Key Insight: Zero Dot Product

Whenever the dot product of two vectors is zero, the vectors are perpendicular (also called orthogonal). This is a super useful property and shows up everywhere in physics and engineering. For example, force vectors acting at right angles don’t affect each other’s work. We’ll see more applications later.

Magnitudes and Angles

Let’s dig deeper into the magnitude part of the formula.

The magnitude of a vector $\mathbf{a} = \langle a_1, a_2, a_3 \rangle$ is:

|$\mathbf{a}$| = $\sqrt{a_1^2 + a_2^2 + a_3^2}$

The same applies for $\mathbf{b}$. Once you know the magnitudes, you can find the angle between the vectors using the dot product formula:

$\theta$ = $\arccos$$\left($$\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}| |\mathbf{b}|}$$\right)$

Example: Finding the Angle

Let’s find the angle between the vectors:

  • $\mathbf{a} = \langle 2, 3, 1 \rangle$
  • $\mathbf{b} = \langle -1, 4, 2 \rangle$

Step 1: Find the dot product.

$\mathbf{a}$ $\cdot$ $\mathbf{b}$ = (2)(-1) + (3)(4) + (1)(2) = -2 + 12 + 2 = 12

Step 2: Find the magnitudes.

|$\mathbf{a}$| = $\sqrt{2^2 + 3^2 + 1^2}$ = $\sqrt{4 + 9 + 1}$ = $\sqrt{14}$

|$\mathbf{b}$| = $\sqrt{(-1)^2 + 4^2 + 2^2}$ = $\sqrt{1 + 16 + 4}$ = $\sqrt{21}$

Step 3: Use the formula for the angle.

$\theta$ = $\arccos$$\left($$\frac{12}{\sqrt{14} \cdot \sqrt{21}}$$\right)$ = $\arccos$$\left($$\frac{12}{\sqrt{294}}$$\right)$ = $\arccos$$\left($$\frac{12}{17.146}$$\right)$

$\theta = \arccos(0.700) \approx 45.57^\circ$

So the angle between the two vectors is about $45.57^\circ$. Not bad!

Projections: Another Application of the Dot Product

One of the most important uses of the dot product is in finding projections. The projection of one vector onto another tells us how much of one vector points in the direction of the other.

Let’s say we want to project vector $\mathbf{a}$ onto vector $\mathbf{b}$.

The formula for the projection of $\mathbf{a}$ onto $\mathbf{b}$ is:

$\text{proj}_{\mathbf{b}$}($\mathbf{a}$) = $\left($ $\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2}$ $\right)$ $\mathbf{b}

This gives us a vector that points in the direction of $\mathbf{b}$ and has a length that represents the “shadow” of $\mathbf{a}$ on $\mathbf{b}$.

Example: Finding a Projection

Let’s project $\mathbf{a} = \langle 4, 3 \rangle$ onto $\mathbf{b} = \langle 1, 2 \rangle$.

Step 1: Find the dot product.

$\mathbf{a}$ $\cdot$ $\mathbf{b}$ = (4)(1) + (3)(2) = 4 + 6 = 10

Step 2: Find $|\mathbf{b}|^2$.

|$\mathbf{b}$|^2 = 1^2 + 2^2 = 1 + 4 = 5

Step 3: Plug into the projection formula.

$\text{proj}_{\mathbf{b}$}($\mathbf{a}$) = $\left($ $\frac{10}{5}$ $\right)$ $\mathbf{b}$ = $2 \mathbf{b} = 2 \langle 1, 2 \rangle = \langle 2, 4 \rangle

So the projection of $\mathbf{a}$ onto $\mathbf{b}$ is the vector $\langle 2, 4 \rangle$.

Notice that this vector lies along the direction of $\mathbf{b}$, but it’s scaled by a factor of 2. That’s because $\mathbf{a}$ has a certain “amount” in the direction of $\mathbf{b}$, and that amount is exactly what we calculated.

Real-World Example: Work Done by a Force

In physics, the concept of work is a perfect example of using the dot product. Work is defined as the dot product of the force vector and the displacement vector:

W = $\mathbf{F}$ $\cdot$ $\mathbf{d}$ = |$\mathbf{F}$| |$\mathbf{d}$| $\cos($$\theta)$

Here:

  • $\mathbf{F}$ is the force vector.
  • $\mathbf{d}$ is the displacement vector.
  • $\theta$ is the angle between the force and displacement.

If the force is applied in the exact direction of the displacement ($\theta = 0^\circ$), then $\cos(\theta) = 1$ and all the force contributes to the work. If the force is perpendicular to the displacement ($\theta = 90^\circ$), then $\cos(\theta) = 0$ and no work is done.

Imagine pushing a box across the floor. If you push straight forward, all your force goes into moving the box. But if you push at an angle, only part of your force actually moves the box forward. The rest is “wasted” pushing down or sideways. The dot product helps us find the effective force that does the work.

Dot Product in Higher Dimensions

The dot product isn’t limited to 3D. It works in any dimension. For example, in 2D:

$\mathbf{a}$ = \langle a_1, a_2 \rangle, \quad $\mathbf{b}$ = \langle b_1, b_2 \rangle

$\mathbf{a}$ $\cdot$ $\mathbf{b}$ = a_1 b_1 + a_2 b_2

In 4D:

$\mathbf{a}$ = \langle a_1, a_2, a_3, a_4 \rangle, \quad $\mathbf{b}$ = \langle b_1, b_2, b_3, b_4 \rangle

$\mathbf{a}$ $\cdot$ $\mathbf{b}$ = a_1 b_1 + a_2 b_2 + a_3 b_3 + a_4 b_4

The geometric interpretation still holds: it still tells you about the angle between the two vectors and can be used to find projections.

Fun Fact: Dot Product in Computer Graphics

In computer graphics, the dot product is used all the time to calculate lighting. When light hits a surface, the amount of light reflected depends on the angle between the light direction and the surface normal (a vector perpendicular to the surface). This is called Lambertian reflection.

Graphics software uses the dot product to compute how bright a surface should look. If the angle is small (light hitting straight on), the dot product is large, and the surface appears bright. If the angle is large (light grazing the surface), the dot product is small, and the surface appears dim. This is how 3D scenes get realistic lighting! 💡

Conclusion

We’ve covered a lot today, students! 🎓 Let’s recap the key points:

  • The dot product is a way to multiply two vectors and get a scalar.
  • Algebraically, it’s the sum of the products of corresponding components.
  • Geometrically, it’s related to the angle between the vectors.
  • A zero dot product means the vectors are perpendicular.
  • The dot product helps us find angles and projections.
  • It’s used in physics (work) and computer graphics (lighting).

With this knowledge, you're well-equipped to tackle problems involving vectors, angles, and projections. Keep practicing, and you’ll master the dot product in no time! 🌟

Study Notes

  • Definition of Dot Product:
  • $\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3$
  • Geometric Formula:
  • $\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}| |\mathbf{b}| \cos(\theta)$
  • Where $\theta$ is the angle between the vectors.
  • Magnitude of a Vector:
  • $|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}$
  • Finding the Angle Between Vectors:
  • $\theta = \arccos\left(\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}| |\mathbf{b}|}\right)$
  • Zero Dot Product:
  • If $\mathbf{a} \cdot \mathbf{b} = 0$, then $\mathbf{a}$ and $\mathbf{b}$ are perpendicular (orthogonal).
  • Projection of $\mathbf{a}$ onto $\mathbf{b}$:
  • $\text{proj}_{\mathbf{b}}(\mathbf{a}) = \left( \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2} \right) \mathbf{b}$
  • Work Formula (Physics):
  • $W = \mathbf{F} \cdot \mathbf{d} = |\mathbf{F}| |\mathbf{d}| \cos(\theta)$
  • Dot Product in 2D:
  • $\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2$
  • Dot Product in 4D:
  • $\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3 + a_4 b_4$
  • Practical Uses:
  • Finding angles between vectors.
  • Determining if vectors are perpendicular.
  • Calculating projections.
  • Applications in physics (work, force).
  • Applications in computer graphics (lighting, reflections).

Keep these notes handy, students, and you’ll be ready to conquer any dot product problem! 🚀

Practice Quiz

5 questions to test your understanding