Matrices and vectors calculating angle. I've got an exam in January, and i've been looking over past papers. There seems to be a recurrence for the following question : 

Calculate the angle between the vectors $\mathbf u=\begin{pmatrix}-8 \\
15\end{pmatrix}$ and $\mathbf v=\begin{pmatrix}-23 \\
7\end{pmatrix}$.
You can use the following table to work out the angle from its cosine: 
  $$
\begin{array}{|c|c|}
\hline\\ \cos\phi  & 1 & \dfrac{\sqrt{3}}2 & \dfrac{\sqrt{2}}2 & \dfrac12 & 0 & -\dfrac12 & -\dfrac{\sqrt{2}}2 & -\dfrac{\sqrt{3}}2 & -1     \\ \\
\hline
\\\\
\phi & 0° & 30° & 45° & 60° & 90° & 120° & 135° & 150° & 180°  \\ \\
\hline
\end{array}
$$

I know how to multiply matrices, that's about all i know how to do though =/ 
Could someone show me a basic process in how this should be done, in a way that will actually help me understand for the exam; bare in mind im bad at maths. 
 A: The dot product of two vectors in $\Bbb R^2$ is expressible in two ways:
$$\mathbf{u\cdot v} = |\mathbf{u}|\cdot|\mathbf{v}| \cos\theta$$ where $\theta$ is the angle between the two vectors, and 
$$\mathbf{u\cdot v} = u_xv_x + u_yv_y$$
Equating these we have $$|\mathbf{u}||\mathbf{v}| \cos\theta = u_xv_x + u_yv_y.$$
In your problem, $u_x, u_y, v_x, v_y$ are given, and from these you can calculate $|\mathbf{u}||\mathbf{v}| = \sqrt{u_x^2 + u_y^2}\cdot\sqrt{v_x^2 + v_y^2}$.
Does that help?
A: $$\cos(\theta) = \frac{v_1w_1+v_2w_2+v_3w_3}{|v||w|} \qquad v=\left(v_1,v_2,v_3\right), w=\left(w_1,w_2,w_3\right)$$
The numerator is the arithmetical way for the dot product, and the denominator is based on the geometrical way of getting the dot product:
$$|v|=\sqrt{ v_1^2+v_2^2+v_3^2}$$
So, in the numerator, you take the correspond values in $v$ times those in $w$ and in the denomentato
EX: 
$$\cos(\theta) = \frac{-8\times -23+15\times 7}{\sqrt{(-8)^2+15^2}\sqrt{(-23)^2+7^2}}$$ 
EDIT:
For the new pairs of vectors in the comments:
$$\cos(\theta) = \frac{(-6)\times 7+12\times (-5)}{\sqrt{(-6)^2+12^2}\times \sqrt{7^2+(-5)^2}}$$ 
