# Derive the formula for the cosine of the difference of two angles from the dot product formula

My book states that:

The formula for the cosine of the difference of two angles is deduced as an application of the scalar product of two vectors:

$$\cos(\alpha - \beta) = \cos\alpha\cos\beta+\sin\alpha\sin\beta$$

From this formula, we can deduce the formula for the sine of the difference:

$$\sin(\alpha-\beta)=\cos[\frac{\pi}{2}-(\alpha-\beta)]=\\\cos[\frac{\pi}{2}-\alpha-(-\beta)] =\\ \cos(\frac{\pi}{2}-\alpha)\cos(-\beta)+\sin(\frac{\pi}{2}-\alpha)\sin(-\beta)$$

$$\\\\$$ $$\\\\\\\\\\\\\sin(\alpha-\beta )= \sin\alpha\cos\beta-\cos\alpha\sin\beta$$

Deduce the following expression starting from the formulas above:

• $\cos(\alpha+\beta)=\cos\alpha\cos\beta-\sin\alpha\sin\beta$

I have two questions:

1. I don't understand how my book means by

The formula for the cosine of the difference of two angles is deduced as an application of the scalar product of two vectors:

Could you explain to me what this means?

1. How do I solve the given problem?
• The last expression is incorrect. Is it meant to be $\alpha+\beta$ on the left? – Chappers Apr 24 '17 at 1:15
• @Chappers I'll edit, thanks for noticing. – Mark Read Apr 24 '17 at 1:17
• Do you know dot product of vectors? The scalar product should refer to the dot product of vectors, which gives a scalar. – Oscar LIU Apr 24 '17 at 1:20
• To solve the given problem: $\beta \mapsto -\beta$ gives $\cos (\alpha - (-\beta)) = \cos \alpha \cos (-\beta) + \sin \alpha \sin (-\beta) = \cos \alpha \cos \beta - \sin \alpha \sin \beta = \cos(\alpha + \beta)$ using the oddity of $\sin$ and even-ness of $\cos$. – Zain Patel Apr 24 '17 at 1:21

Draw two position vectors, $\mathbf{v}_1$ and $\mathbf{v}_2$ with unit magnitude and at angles $\alpha, \beta$ to the positive $x$-axis. Then the angle between the two is $\alpha - \beta$ (assuming $\alpha > \beta$ w.l.o.g). But $\mathbf{v}_1 \cdot \mathbf{v}_2$ is the cosine of the angle between them. So $\cos (\alpha - \beta) = \mathbf{v}_1 \cdot \mathbf{v}_2$.

But remember that the two vectors lie on the unit circle and have components $\mathbf{v}_1 = \cos \alpha \mathbf{i} + \sin \alpha \mathbf{j}$ and $\mathbf{v}_2 = \cos \beta \mathbf{i} + \sin \beta \mathbf{j}$. By the definition of the dot product $$\cos (\alpha - \beta) = \cos \alpha \cos \beta + \sin \alpha \sin \beta.$$

To solve the given problem: note that $\beta \mapsto -\beta$ gives $$\cos (\alpha - (-\beta)) = \cos \alpha \cos (-\beta) + \sin \alpha \sin (-\beta) = \cos \alpha \cos \beta - \sin \alpha \sin \beta = \cos(\alpha + \beta)$$ using the oddity of $\sin$ and even-ness of $\cos$.

If you have two vectors $v=(v_1,v_2)$ and $w=(w_1,w_2)$, then their dot product is $$v \cdot w = v_1 w_1 + v_2 w_2.$$ Additionally, we also have $$v \cdot w = \|v\| \|w\| \cos \theta$$ where $\|v\|=\sqrt{v_1^2+v_2^2}$, $\|w\|=\sqrt{w_1^2+w_2^2}$, and $\theta$ is the angle between $v$ and $w$. Proof here.

Now, consider $v=(\cos \alpha, \sin \alpha)$ and $w=(\cos \beta, \sin \beta)$. Do you now see why the formula for $\cos(\alpha-\beta)$ then follows? Hint: we have $\|v\|=\|w\|=1$ and $\theta=\alpha-\beta$.

For your second question,note $\cos(\alpha+\beta)=\cos(\alpha-(-\beta))$, then apply your formula for the cosine of a difference of angles, and then use the fact that $\sin$ is an odd function, and $\cos$ is an even function. This has been done for you in the comments.

The scalar product of vectors $a=(a_1,a_2)$ and $b=(b_1,b_2)$ is given by the two formulae (provable equivalent using the cosine rule, see here) $$a \cdot b = a_1b_1+a_2b_2 = \sqrt{a_1^2+a_2^2}\sqrt{b_1^2+b_2^2} \cos{\theta},$$ where $\theta$ is the angle between $a$ and $b$.

To use this to deduce the cosine rule, choose the unit vectors $$a=(\cos{\alpha},\sin{\alpha}), \qquad b=(\cos{\beta},\sin{\beta}).$$ $a$ makes angle $\alpha$ with $(1,0)$, $b$ makes angle $\beta$ with the same vector, and it is clear, since these angles are both in the same direction (one goes anticlockwise from $(1,0)$ in both cases), that the angle between this $a$ and this $b$ is $\beta-\alpha$ (or $\alpha-\beta$, but cosine is even so it makes no difference). Applying the formulae for the dot product gives $$1\cdot 1 \cdot \cos{(\alpha-\beta)} = a\cdot b = \cos{\alpha}\cos{\beta} + \sin{\alpha}\sin{\beta},$$ as required.

The last formula can be found by replacing $\beta$ by $-\beta$ in this formula, and using that sine is odd and cosine is even.