0

I'm just starting to learn about vectors, and I am a bit confused. According to my reference material, a dot product is the degree of "alignment" between two vectors.

Consider two vectors a and b, and suppose a is projected onto b. The length of the projection of a on b, let's call it x, is a measure of the degree of alignment—because it varies with the angle between the vectors.

Through simple trigonometry, we get x = ∣a∣cosθ.

But why do we consider ∣b∣ in dot products then? Why is it necessary to use both vectors when just the projection of one on the other can measure alignment?

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
Raffe
  • 5
  • If you don't include the magnitude of $b$, the dot product can't possibly be commutative, so order in which we do the operation matters. However, by virtue of the symmetry of the problem, the angle between $a$ and $b$ is the same as between $b$ and $a$, so we should be able to extract the component of $b$ via $| b |\cos(\theta)$ via the dot product. So it should have both magnitudes in it. I don't have time to fully turn this into an answer, so someone else can borrow from this if they want. – Cameron L. Williams Nov 22 '24 at 13:57
  • @CameronWilliams Oh, that makes sense! If we considered only one vector's magnitude, it could lead to two different possible values depending on which vector we choose (which seems very inconvenient). So by including both magnitudes, the commutative property is naturally satisfied. Thanks!! – Raffe Nov 22 '24 at 14:09

2 Answers2

2

Building on Cameron Williams' comment:

We want the dot product to have a few nice properties:

  1. It's a measure of "alignment", as you've written -- how parallel the vectors are.
  2. It should be commutative. The alignment of $\mathbf{a}$ and $\mathbf{b}$ should be the same as the alignment of $\mathbf{b}$ and $\mathbf{a}$.
  3. It should be linear, so we can do nice algebra things like $\mathbf{a} \cdot (\mathbf{b}+\mathbf{c}) = \mathbf{a} \cdot \mathbf{b} + \mathbf{a} \cdot \mathbf{c}$.

Now from Condition 1, we want $\mathbf{a}\cdot \mathbf{b}$ to depend on the angle $\theta$ between the vectors. We could just use this angle as the "dot product" but it's kind of unwieldy algebraically. So we take the cosine instead -- it sends angle $0$ (parallel vectors) to $+1$ and angle $\pi$ (anti-parallel, reverse directions) to $-1$. This turns out to be a nice choice.

However, just using $\cos(\theta)$ would not be linear. Let $\theta_{\mathbf{b}}$ be the angle between $\mathbf{a}$ and $\mathbf{b}$, and similarly. for $\theta_{\mathbf{c}}$ and $\theta_{\mathbf{b}+\mathbf{c}}$. By scaling vectors, we can see that $\theta_{\mathbf{b}+\mathbf{c}}$ depends on things other than $\theta_{\mathbf{b}}$ and $\theta_{\mathbf{c}}$. In fact, there is very little relation at all!

Now your idea has using the length of the projection; that is, $|\mathbf{a}|\cos(\theta)$. But this isn't commutative, as Cameron Williams pointed out, because it scales with $\mathbf{a}$ but not $\mathbf{b}$.

So we use $\mathbf{a}\cdot \mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos(\theta)$. This turns out to be a good measure of alignment. It's clearly commutative. Moreover, using the rule $\mathbf{a}\cdot \mathbf{b} = a_1b_1 + a_2b_2 + \cdots + a_nb_n$, it's also easy to compute and satifies the linearity condition.

0

We define the dot product to solve a particular problem. If we have a vector in some basis and we want to express it in another basis then we need a way to find the components of the vector in that basis. If we assume that our basis consists of unit vectors, then we may define the dot product of our vector with a unit vector as the component of the vector in the direction of the unit vector. It is easy to show that the dot product is linear in its first argument using tip-to-tail vector addition. The dot product of two unit vectors is commutative. We may want to extend this to all vectors so we scale the dot product with the magnitude of the second vector.

Stardust
  • 616