Does angle between vectors satisfy triangle inequality?

159 Views Asked by At

For any two unit vectors $a$ and $b$ from $\mathbb{R}^d$, let $θ(a, b)$ be the angle between them, defined as $\cos^{-1}(a^Tb)$. Hence, the angle lies in the range $[0, \pi]$.

Does $θ$ satisfy the triangle inequality, i.e., for any 3 unit vectors $a$, $b$, and $c$, do we have $θ(a, c) ≤ θ(a, b) + θ(b, c)$? I feel that this is true, but I couldn't prove it or find a counterexample.

(If this is true, I would get that $θ$ defines a metric space over unit vectors.)

1

There are 1 best solutions below

2
On BEST ANSWER

Let $u$, $v$, $w$ three unit vectors in an euclidean space. To show that

$$\arccos \langle u, v\rangle + \arccos \langle v, w\rangle \ge \arccos \langle u, w\rangle$$

Denote the above angles by $\alpha$, $\beta$, $\gamma$. Consider the Gram matrix associated to $u$, $v$, $w$. We know that this matrix is positive semidefinite, so its determinant is $\ge 0$. But now we calculate

$$\left | \begin{matrix} 1 & \cos \alpha & \cos \beta \\ \cos \alpha & 1 & \cos \gamma \\ \cos \beta & \cos \gamma & 1\end{matrix} \right |= 4 \sin p \sin(p-\alpha) \sin (p-\beta) \sin (p-\gamma)$$

where $p = \frac{\alpha + \beta + \gamma}{2}$.

This shows that $p- \max ( \alpha, \beta, \gamma) \ge 0$, which is what we need. It is also easy to see when we have equality: the vectors must be linearly dependent.