How to understand dot product is the angle's cosine?
Solution 1:
The dot product is basically a more flexible way of working with the Euclidean norm. You know that if you have the dot product $\langle x, y \rangle$, then you can define the Euclidean norm via $$\lVert x\rVert = \sqrt{\langle x, x \rangle}.$$
Conversely, it turns out that you can recover the dot product from the Euclidean norm using the polarization identity $$\langle x, y \rangle = \frac{1}{4} \left(\lVert x + y\rVert^2 - \lVert x - y\rVert^2 \right).$$
Okay, so how can you see the relationship between the dot product and cosines? The key is the law of cosines, which in vector language says that $$\lVert a - b\rVert^2 = \lVert a\rVert^2 + \lVert b\rVert^2 - 2 \lVert a\rVert \lVert b\rVert \cos \theta$$
where $\theta$ is the angle between $a$ and $b$. On the other hand, by bilinearity and symmetry we see that $$\lVert a - b\rVert^2 = \langle a - b, a - b \rangle = \lVert a\rVert^2 + \lVert b\rVert^2 - 2 \langle a, b \rangle$$
so it follows that $$\langle a, b \rangle = \lVert a\rVert \lVert b\rVert \cos \theta$$
as desired.
Any two vectors in an $n$-dimensional Euclidean space together span a Euclidean space of dimension at most $2$, so the connection between the dot product and angles in general reduces to the case of $2$ dimensions.
Solution 2:
Here's one way to remember it easily: assume one of the two unit vectors is $(1,0)$ (by an appropriate choice of coordinates we may assume we are working in $2$ dimensions, and then that one of the vectors is the standard basis vector). Then the dot product is just the $x$-coordinate of the other, which is by definition the cosine of the angle between them.