How to explain why the angle between two vectors in $\mathbb{R}^n$ is defined the way it is. It is given in couple of the textbooks I have seen that they just define the angle between two vectors $\vec{x}, \vec{y} \in \mathbb{R}^n$ to be $\theta$ such that 
$$
\cos \theta = \frac{\vec{x} \cdot \vec{y} }{ \|\vec{x}\| \|\vec{y}\|}.
$$ 
I wanted to explain this to a first year undergraduate student why this makes some sense and that it is not completely arbitrary, but I wasn't really sure how to do so. I would greatly appreciate any explanation! Thank you!!
 A: We can fit our vectors $\vec x$ and $\vec y$ into a triangle

The law of cosines says
$$
\left\lVert\vec y-\vec x\right\rVert^2
= \left\lVert\vec x\right\rVert^2+\left\lVert \vec y\right\rVert^2
-2\left\lVert\vec x\right\rVert\left\lVert\vec y\right\rVert\cos\theta\tag{1}
$$
But we also have
$$
\left\lVert\vec y-\vec x\right\rVert^2
= \left(\vec y-\vec x\right)\cdot \left(\vec y-\vec x\right)
= \vec y\cdot\vec y+\vec x\cdot\vec x-2\,\vec x\cdot\vec y
= \left\lVert\vec y\right\rVert^2+\left\lVert\vec x\right\rVert^2-2\,\vec x\cdot\vec y\tag{2}
$$
Plugging (2) into (1) gives
$$
\left\lVert\vec y\right\rVert^2+\left\lVert\vec x\right\rVert^2-2\,\vec x\cdot\vec y=\left\lVert\vec x\right\rVert^2+\left\lVert \vec y\right\rVert^2
-2\left\lVert\vec x\right\rVert\left\lVert\vec y\right\rVert\cos\theta
$$
which simplifies to
$$
\vec x\cdot\vec y=\left\lVert\vec x\right\rVert\left\lVert\vec y\right\rVert\cos\theta
$$
Thus $\cos\theta$ can be expressed as
$$
\cos\theta=\frac{\vec x\cdot\vec y}{\left\lVert\vec x\right\rVert\left\lVert\vec y\right\rVert}
$$
as desired!
In other words, taking this equation as the definition of $\cos\theta$ matches our intuition developed in trigonometry. 
A: The formula matches the traditional geometric notion of the angle between two vectors if they are in $\Bbb R^2$ (with standard scalar product), which is especially easy to see if $\|\vec x\|=\|\vec y\|=1$ and even more specifically $\vec x={1\choose 0}$ and $\vec y={\cos x\choose \sin x}$. For higher dimensions, we can reduce to the $\Bbb R^2$ situation by considereing the space spanned by $\vec x$ and $\vec y$.
