Now, by using the dot-product we get,
\(\left\|u-v \right\|^{2}=\left ( u-v \right )\cdot \left ( u-v \right )\)
\(\left\|u-v \right\|^{2}=u\cdot u-u\cdot v+v\cdot u+v\cdot v\)
\(\left\|u-v \right\|^{2}=u\cdot u-2u\cdot v+v\cdot v\)
\(\left\|u-v \right\|^{2}=\left\|u \right\|^{2}-2u\cdot v+\left\|v \right\|^{2}\) .......(b)
By using equations (a) and (b)
\(\left\|u \right\|^{2}-2u\cdot v+\left\|v \right\|^{2}=\left\|u \right\|^{2}+\left\|v \right\|^{2}-2\left\|u \right\|\left\|v \right\|cos\theta\)
\(-2u\cdot v=-2\left\|u \right\| \left\|v \right\|cos\theta\)
\(u\cdot v=\left\|u \right\| \left\|v \right\|cos\theta\)
Hence proved.