Why is $\cos(\alpha+\beta) = \cos(\alpha)\cos(\beta)−\sin(\alpha)\sin(\beta)$? I already posted a question about transformation matrices and rotation. But I'm not satisfied with the answer.
They simply said

Composition of functions corresponds to multiplication of matrices.

I think I understand the concept but I'm still confused why exactly $$\cos(\alpha + \beta)=\cos(\alpha)\cos(\beta)−\sin(\alpha)\sin(\beta)$$
Is there a lemma or formula I have to use or does it simply derive from distributivity of matrix multiplication? I can't get my head around it.
 A: *

*The rotation of $\mathbb R^2$ through angle $\alpha$ is a linear transformation with matrix
$\left( \begin{matrix}
 \cos\alpha & -\sin\alpha\\ 
   \sin\alpha &\cos\alpha
\end{matrix}\right)$


*The rotation of $\mathbb R^2$ through angle $\beta$ is a linear transformation with matrix
$\left( \begin{matrix}
 \cos\beta & -\sin\beta\\ 
   \sin\beta &\cos\beta
\end{matrix}\right)$


*The rotation of $\mathbb R^2$ through angle $\alpha+\beta$ is a linear transformation with matrix
$\left( \begin{matrix}
 \cos(\alpha+\beta) & -\sin(\alpha+\beta)\\ 
   \sin(\alpha+\beta) &\cos(\alpha+\beta)
\end{matrix}\right)$


*The rotation of $\mathbb R^2$ through angle $\alpha+\beta$ is the composition of the rotation of $\mathbb R^2$ through angle $\alpha$ and the rotation of $\mathbb R^2$ through angle $\beta$.


*The matrix of the composition of two linear transformations is the product of matrices of these transformations.


*So $$ \left( \begin{matrix}
 \cos\alpha & -\sin\alpha\\ 
   \sin\alpha &\cos\alpha
\end{matrix}\right)\cdot \left( \begin{matrix}
 \cos\beta & -\sin\beta\\ 
   \sin\beta &\cos\beta
\end{matrix}\right) = \left( \begin{matrix}
 \cos(\alpha+\beta) & -\sin(\alpha+\beta)\\ 
   \sin(\alpha+\beta) &\cos(\alpha+\beta)
\end{matrix}\right)$$


*So, in particular, $$\cos(\alpha+\beta)=\cos\alpha\cos\beta-\sin\alpha\sin\beta.$$
A: You can also simply prove it using complex  numbers :
$$ e^{i(\alpha + \beta)} = e^{i\alpha} \times e^{i\beta} 
 \Leftrightarrow \cos (a+b)+i \sin (a+b)=(\cos a+i \sin a) \times(\cos b+i \sin b) $$
Finally we obtain, after distributing :
$$ \cos (a+b)+i \sin (a+b) =\cos a \cos b-\sin a \sin b+i(\sin a \cos b+\cos a \sin b) $$
By identifying the real and imaginary parts we get
$$
\cos (a+b)=\cos a \cos b-\sin a \sin b
$$
$$ \sin (a+b)=\sin a \cos b+\cos a \sin b $$
Of course you need know basics about complex numbers but if you already know all of this it is usually really quick to proove most of this cumbersome trigonometric formulas with complex numbers like what I did here.
A: A matrix represents a linear transformation. Each of its columns contains the coordinates of the transformed base. To apply it to a vector, multiply each column of the matrix by the corresponding coordinate (x coordinate for first column, etc.) and add the results. Applying a matrix to a matrix is applying the left-hand matrix to each column (base vector) of the right-hand matrix. This boils down to the "multiply row by column" rule.
To see that matrix columns form a transformed base in the case of a rotation, consider that the first column contains the coordinates $\cos \alpha$ and $\sin \alpha$ of the $\mathbf i$ vector rotated by $\alpha$. The second column is the first column rotated by $\pi / 2$. For example, for a $\pi / 4$ rotation, your first column will be $(1/\sqrt 2, 1/\sqrt 2)^T$.
Linear algebra done wrong, by Sergei Treil, lays out these principles from the start.
A: You can also prove it by using a simple lemma:
Let $f:{\mathbb R}\to {\mathbb R}$ be twice differentiable, such that $f''=-f$. Then $f(x) = f(0)\cos x + f'(0) \sin x$.
Indeed, if $g(x)= f(x) - f(0)\cos x - f'(0)\sin x$, then $g''=-g$ and $g(0)=g'(0)=0$. But $(g'^2+g^2)' = 2 g'(g''+g) = 0$, hence $g'^2+g^2$ is a constant, which is $0$ because of its value at $x=0$. Hence $g(x)=0$ everywhere.
Applying this to $f(x) = \cos(x+\beta)$, we have $f(0) = \cos\beta$ and $f'(0) = -\sin\beta$, hence
\begin{equation}
\cos(x+\beta) = f(x) = \cos x\cos\beta - \sin x\sin\beta
\end{equation}
In the case of $h(x) = \sin(x+\beta)$, we have $h(0) = \sin\beta$ and $h'(0) = \cos\beta$, hence
\begin{equation}
\sin(x+\beta) = h(x) = \cos x\sin\beta + \sin x\cos\beta
\end{equation}
A: By rotating the unit circle by an angle of $b$ we can see that the point $(cos(a-b),sin(a-b))$ maps to $(cos(a),sin(a))$ and the point $(1,0)$ maps to $(cos(b),sin(b))$.
Since rotations preserve distances,the distance between the points $(cos(a-b),sin(a-b))$ and $(1,0)$ is equal to the distance between points $(cos(a),sin(a))$ and $(cos(b),sin(b))$. The distance formula then gives:
$\sqrt{(cos(a-b)-1)^2+(sin(a-b)-0)^2}=\sqrt{(cos(a)-cos(b))^2+(sin(a)-sin(b))^2}$
With a lot less effort than you'd think (and using $sin(x)^2+cos(x)^2=1$ three times), you arrive at the desired identity
