TITLE: Use the law of cosines to derive the triangle inequality
QUESTION [0 upvotes]: I am given the vectors:
and show that they span the triangle with sides $a,b,c$ with $c=||u-v||$
and determine for which $\gamma∈[0, \pi]$ we have equality.
Any help is appreciated.

REPLY [1 votes]: Note that the length of the sides of the triangle are $\|u\| = a$, $\|v\| = b$ and $\|u - v\| = c$. Also, the cosine of the angle between the vectors $u$ and $v$ is $\frac{u \cdot v}{\|u\|\|v\|} = \frac{ab\cos(\gamma)}{ab} = \cos(\gamma)$ which we can easily confirm graphically since $u$ is just along the horizontal axis. Now, the cosine law says $c^2 = a^2 + b^2 - 2ab\cos(\gamma)$. Since $\cos(\gamma) \geq -1 \implies -\cos(\gamma) \leq 1$, so
$$
c^2 = a^2 + b^2 - 2ab\cos(\gamma) \leq a^2 + b^2 + 2ab = (a + b)^2.
$$
Since both $c$ and $a + b$ are positive we can take square roots and still preserve the inequality. So $c \leq a + b$ or $\|u - v\| \leq \|u\| + \|v\|$. Looking at the above inequality, we see that its an equality precisely when $\cos(\gamma) = -1$ which implies $\gamma = \pi$.
{"set_name": "stack_exchange", "score": 0, "question_id": 516635}