# Dot product in the plane

Given a pair of 2D vectors:
    ${\vec {u}}=(u_{x},u_{y})$
    ${\vec {v}}=(v_{x},v_{y})$
Then their dot product is
    ${\vec {u}}\cdot {\vec {v}}:=u_{x}v_{x}+u_{y}v_{y}$.
Suppose that ${\vec {u}}$ and ${\vec {v}}$ are both rotated by an angle $\theta$:
    ${\begin{pmatrix}\cos \theta &-\sin \theta \\\sin \theta &\cos \theta \end{pmatrix}}{\begin{pmatrix}u_{x}\\u_{y}\end{pmatrix}}={\begin{pmatrix}u_{x}\cos \theta -u_{y}\sin \theta \\u_{x}\sin \theta +u_{y}\cos \theta \end{pmatrix}}={\begin{pmatrix}u_{x}'\\u_{y}'\end{pmatrix}}$
    ${\begin{cases}u_{x}'=u_{x}\cos \theta -u_{y}\sin \theta \\u_{y}'=u_{x}\sin \theta +u_{y}\cos \theta \end{cases}}$
    ${\begin{cases}v_{x}'=v_{x}\cos \theta -v_{y}\sin \theta \\v_{y}'=v_{x}\sin \theta +v_{y}\cos \theta \end{cases}}$
    ${\vec {u}}'\cdot {\vec {v}}'=u_{x}'v_{x}'+u_{y}'v_{y}'$
       $=(u_{x}\cos \theta -u_{y}\sin \theta )(v_{x}\cos \theta -v_{y}\sin \theta )+(u_{x}\sin \theta +u_{y}\cos \theta )(v_{x}\sin \theta +v_{y}\cos \theta )$
       $=u_{x}v_{x}\cos ^{2}\theta -u_{x}v_{y}\cos \theta \sin \theta -u_{y}v_{x}\sin \theta \cos \theta +u_{y}v_{y}\sin ^{2}\theta$
          $+u_{x}v_{x}\sin ^{2}\theta +u_{x}v_{y}\sin \theta \cos \theta +u_{y}v_{x}\cos \theta \sin \theta +u_{y}v_{y}\cos ^{2}\theta$
       $=u_{x}v_{x}(\cos ^{2}\theta +\sin ^{2}\theta )+u_{y}v_{y}(\cos ^{2}+\sin ^{2}\theta )$
       $=u_{x}v_{x}+u_{y}v_{y}={\vec {u}}\cdot {\vec {v}}$
applying the trigonometric form of the Pythagorean Theorem (i.e., $\cos ^{2}\theta +\sin ^{2}\theta =1$).
So if ${\vec {u}}$ and ${\vec {v}}$ are both rotated with the angle between them preserved then their dot product is preserved as well.
Multiplying lengths of ${\vec {u}}$ and ${\vec {v}}$. Let ${\vec {u}}'=\lambda {\vec {u}}$, ${\vec {v}}'=\mu {\vec {v}}$. I.e.,
    ${\vec {u}}'=(\lambda u_{x},\lambda u_{y})$,
    ${\vec {v}}'=(\mu v_{x},\mu v_{y})$.
Then
    ${\vec {u}}'\cdot {\vec {v}}'=\lambda \mu u_{x}v_{x}+\lambda \mu u_{y}v_{y}$
       $=\lambda \mu (u_{x}v_{x}+u_{y}v_{y})=\lambda \mu \,{\vec {u}}\cdot {\vec {v}}$.
Multiplying the length of ${\vec {u}}$ or ${\vec {v}}$ also multiplies the length of the dot product ${\vec {u}}\cdot {\vec {v}}$ by the same factor. (This property is called homogeneity, or linearity.)
What happens when ${\hat {u}}$ and ${\hat {v}}$ are unit vectors? Rotate both of them (by the same angle) until one of them equals the vector (1, 0). Suppose that ${\hat {u}}'=(1,0)$. Then ${\hat {v}}'=(v_{x}',v_{y}')$,
    ${\hat {u}}'\cdot {\hat {v}}'=v_{x}'$.
Let $\phi$ be the angle between ${\hat {u}}'$ and ${\hat {v}}'$ (or between ${\hat {u}}$ and ${\hat {v}}$, equivalently).
    $\cos \phi ={v_{x}' \over 1}=v_{x}'$
so ${\hat {u}}'\cdot {\hat {v}}'=\cos \phi ={\hat {u}}\cdot {\hat {v}}$
For any vectors ${\vec {u}},\ {\vec {v}}$ which are not unit vectors, let
    ${\vec {u}}=u{\hat {u}}$,
    ${\vec {v}}=v{\hat {v}}$
where $u={\sqrt {{\vec {u}}\cdot {\vec {u}}}}$ is the magnitude (or length) of vector ${\vec {u}}$ (by the Pythagorean Theorem) and $v={\sqrt {{\vec {v}}\cdot {\vec {v}}}}$ likewise, and where ${\hat {u}}$ is a unit vector in the same direction as ${\vec {u}}$; and ${\hat {v}}$ is a unit vector in the same direction as ${\vec {v}}$.
So
    ${\vec {u}}\cdot {\vec {v}}=u{\hat {u}}\cdot v{\hat {v}}=uv({\hat {u}}\cdot {\hat {v}})$
    ${\vec {u}}\cdot {\vec {v}}=uv\cos \phi$
where $\phi$ is the angle between ${\hat {u}}$ and ${\hat {v}}$ (or equivalently, between ${\vec {u}}$ and ${\vec {v}}$). This last equation denotes the geometric interpretation of the dot product (as being proportional to the magnitudes of the vectors and the cosine of the angle between them).