How to prove ${\bf u}\cdot{\bf v}=|{\bf u}|\cdot|{\bf v}|\cos\theta$, if $\theta$ is the angle between $|{\bf u}|$ and $|{\bf v}|$ This is a snippet from my book.

How did they get from $|{\bf u}|^2={\bf u}\cdot{\bf v}=|{\bf u}||{\bf v}|\frac{|{\bf u}|}{|{\bf v}|}$?

Under regular Euclidean geometry, the distance between two points $a=(x_1,y_1)$ and $b=(x_2,y_2)$ is defined as $$d(a,b)=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}.$$ Given a vector $\textbf{u}=(u_1,u_2,u_3)$, we know that $\textbf{u}=\sqrt{u_1^2+u_2^2+u_3^2}$. So from our definition of distance, we see that $\textbf{u}$ indicates the distance from the origin $(0,0,0)$ to $(a,b,c)$, or $\textbf{u}=d((0,0,0),\textbf{u})$. This relationship may help with the following explanation.
Using the regular notion of a dot product (i.e. $\textbf{u}\cdot\textbf{u}=u_1^2+u_2^2+u_3^2$), it is easy to check that $\textbf{||u||}^2=\textbf{u}\cdot\textbf{u}$ (see above). So from $0=\textbf{u}\cdot\textbf{v}-\textbf{u}\cdot\textbf{u}$, we have $\textbf{u}\cdot\textbf{v} =\textbf{u}\cdot\textbf{u}=\textbf{||u||}^2$. From there we multiply $\textbf{||u||}^2$ by $\frac{ \textbf{||v||}}{\textbf{||v||}}$. Finally, noticing that $\frac{\textbf{||u||}}{\textbf{||v||}} = cos\theta$, we have $$\textbf{u}\cdot\textbf{v}=||\textbf{u}||*||\textbf{v}||cos\theta.$$
