I'm currently trying to implement some vehicle physics in a game, and this obviously requires a lot of maths. However, I'm not an english native speaker, so I have trouble understanding some terms and instructions that are given to me.
In my case, this is what they asked me to do :
Derive cosine of the rotation angle from the dot product of $a$ and $b$.
I assume that $\theta$ here is the "rotation angle" they are talking about, and $a$ and $b$ are both vectors. But what do they mean by "Derive... from..." ? Surely they are not asking me to calculate the derivative of $\cos \theta$, because they would instruct me to calculate "$-\sin \theta$" instead.
Can anyone please enlighten me ?
Since there is an answer/hint already given, here is a different one, which begins in a different place and depends on the fact that the scalar product is symmetric and bilinear and is defined in such a way that $a\cdot a = |a|^2$ for any vector $a$.
Examine the triangle $OAB$ with $OA=a$ and $OB=b$ and the third side being $b-a$. Applying the cosine rule gives $$|b-a|^2=|a|^2+|b|^2-2|a||b|\cos \theta$$
Since $a.a=|a|^2$ we have $$(a-b)\cdot(a-b)=a\cdot a+b\cdot b-2|a||b|\cos \theta$$
and this reduces to $a\cdot b=|a||b|\cos \theta$
This allows you to use the components with respect to a suitable (orthonormal) basis to calculate everything - it demonstrates that the two different common ways of expressing the scalar product give the same result, and enables the angle to be computed using a definition which doesn't depend on knowing the angle.