Why do we use vector subtraction to derive the cosine law? In an exercise I was assigned, I was asked to derive the law of cosines using $ \vec c \cdot \vec c $, where $ \vec c = \vec a - \vec b $. This is a neat way of deriving it, but I don't understand why $ \vec c = \vec a - \vec b $. What makes the vector subtraction work instead of addition ? Is $ \vec c $ meant to illustrate a displacement between $ \vec b $ and $ \vec a $ ? Again, it's really cool how it works, but I don't understand why the subtraction is meaningful in this derivation.
 A: So:
$\vec{c} \cdot \vec{c} = |\vec{c}|^2 \text{ and } (\vec{a}-\vec{b}) \cdot (\vec{a}-\vec{b}) = |\vec{a}|^2 + |\vec{b}|^2 - 2(\vec{a} \cdot\vec{b})$
and we know that $(\vec{a} \cdot\vec{b}) = |\vec{a}||\vec{b}|\cos(\theta)$ where $\theta$ is the angle between $\vec{a}$ and $\vec{b}$. So defining $a = |\vec{a}|$, $b = |\vec{b}|$, $c = |\vec{c}|$, we get:
$c^2 = a^2+b^2-2ab\cos(\theta)$.
A: Consider a triangle ABC:

Image Source
Let
$$CA\equiv\vec{b}$$
$$CB\equiv\vec{a}$$
$$AB\equiv\vec{c}$$
Then, $$\vec{c}=\vec{a}-\vec{b}$$
and
$$\vec{c}\cdot\vec{c}=(\vec{a}-\vec{b})\cdot(\vec{a}-\vec{b})=|\vec{a}|^2+|\vec{b}|^2-2\vec{a}\cdot\vec{b}\cos\gamma$$
which is the cosine rule.
Now, if you instead define
$$AC\equiv\vec{b}$$
you get
$$\vec{c}=\vec{a}+\vec{b}$$
and
$$\vec{c}\cdot\vec{c}=(\vec{a}+\vec{b})\cdot(\vec{a}+\vec{b})=|\vec{a}|^2+|\vec{b}|^2+2\vec{a}\cdot\vec{b}\cos(\pi-\gamma)=|\vec{a}|^2+|\vec{b}|^2-2\vec{a}\cdot\vec{b}\cos\gamma$$
which is the same result.
The first convention is more convenient since the angle between the two vectors is the internal angle of the triangle.
