30
$\begingroup$

How can one see that a dot product gives the angle's cosine between two vectors. (assuming they are normalized)

Thinking about how to prove this in the most intuitive way resulted in proving a trigonometric identity: $\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$.

But even after proving this successfully, the connection between and cosine and dot product does not immediately stick out and instead I rely on remembering that this is valid while taking comfort in the fact that I've seen the proof in the past.

My questions are:

  1. How do you see this connection?

  2. How do you extend the notion of dot product vs. angle to higher dimensions - 4 and higher?

  • 4
    In 2d, you're looking *precisely* at the cosine "angle difference" formula. Just express the vectors in a polar-like form: if $v = r (\cos\theta, \sin\theta)$ and $w= s(\cos\phi,\sin\phi)$, then $v \cdot w = r s (\cos\theta \cos\phi+\sin\theta\sin\phi)= r s \cos(\theta-\phi) = (\text{product of lengths}) \cos(\text{angle between})$.2012-03-03
  • 0
    I think the cosine comes from the cosine rule and not the compound angle formula. Given 2 vectors $\vec{a}$ and $\vec{b}$ emanating from the same point. Given the angle between them and the fact that the vector opposite the angle is $\vec{b}-\vec{a}$ you can use the cosine rule and derive the formula for the dot product.2012-03-03
  • 0
    The Law of Cosines certainly drives the result in general. Evidently, $u\cdot u = |u|^2$ in any dimension; that's just the Distance Formula. Writing $w$ for $u-v$, we have $|w|^2 = (u-v)\cdot (u-v) = u \cdot u + v \cdot v - 2 u\cdot v = |u|^2 + |v|^2 - 2 u\cdot v$. The Law of Cosines tells us that this should be $|w|^2 = |u|^2 + |v|^2 - 2 |u||v|\cos\psi$ for angle $\psi$ between $u$ and $v$; consequently, we must have that $u\cdot v = |u||v|\cos\psi$. Nevertheless, I like that I can "see" the angle-difference formula in the 2d dot product.2012-03-03

6 Answers 6