Given a pair of 2D vectors:
![{\displaystyle {\vec {u}}=(u_{x},u_{y})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7936cfb718d8680252e1066b2d51cdafd201cc5a)
![{\displaystyle {\vec {v}}=(v_{x},v_{y})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5e938ae9959ad871233e4ba4131f1cbd84052414)
Then their dot product is
.
Suppose that
and
are both rotated by an angle
:
![{\displaystyle {\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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2278e500abbdf1555dd980f4fe362de46228ae49)
![{\displaystyle {\begin{cases}u_{x}'=u_{x}\cos \theta -u_{y}\sin \theta \\u_{y}'=u_{x}\sin \theta +u_{y}\cos \theta \end{cases}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b821a2a3f99c16bfc7b04aa27c3eb725b12a7b2b)
![{\displaystyle {\begin{cases}v_{x}'=v_{x}\cos \theta -v_{y}\sin \theta \\v_{y}'=v_{x}\sin \theta +v_{y}\cos \theta \end{cases}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8e38ba71dbacaa0266718dbf601b5d99c70fa414)
![{\displaystyle =(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 )}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4c20a833db7892747a03b72a61d92f30d27b643b)
![{\displaystyle +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 }](https://wikimedia.org/api/rest_v1/media/math/render/svg/58a0cbe74c33c177adc2dc042d44a8e1cd4c683b)
![{\displaystyle =u_{x}v_{x}(\cos ^{2}\theta +\sin ^{2}\theta )+u_{y}v_{y}(\cos ^{2}+\sin ^{2}\theta )}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b5e5478795744c82080f56d010d461c5824ed00c)
![{\displaystyle =u_{x}v_{x}+u_{y}v_{y}={\vec {u}}\cdot {\vec {v}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/29472a316871dd7bb639a28e17d0addd3ca97240)
applying the trigonometric form of the Pythagorean Theorem (i.e.,
).
So if
and
are both rotated with the angle between them preserved then their dot product is preserved as well.
Multiplying lengths of
and
. Let
,
. I.e.,
,
.
Then
.
Multiplying the length of
or
also multiplies the length of the dot product
by the same factor. (This property is called homogeneity, or linearity.)
What happens when
and
are unit vectors? Rotate both of them (by the same angle) until one of them equals the vector (1, 0). Suppose that
. Then
,
.
Let
be the angle between
and
(or between
and
, equivalently).
![{\displaystyle \cos \phi ={v_{x}' \over 1}=v_{x}'}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ae1ad9c110acfb501bce2defa29956e510c3de68)
so
For any vectors
which are not unit vectors, let
,
![{\displaystyle {\vec {v}}=v{\hat {v}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3857abe2a274b37bc12106fa3d7aa0e1a67f35f5)
where
is the magnitude (or length) of vector
(by the Pythagorean Theorem) and
likewise, and where
is a unit vector in the same direction as
; and
is a unit vector in the same direction as
.
So
![{\displaystyle {\vec {u}}\cdot {\vec {v}}=u{\hat {u}}\cdot v{\hat {v}}=uv({\hat {u}}\cdot {\hat {v}})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5f35695e0b6fb3fe5c88919a67355f90c288345d)
![{\displaystyle {\vec {u}}\cdot {\vec {v}}=uv\cos \phi }](https://wikimedia.org/api/rest_v1/media/math/render/svg/be9eeb114108ce066545d8b057a40c77c4f3fe66)
where
is the angle between
and
(or equivalently, between
and
). 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).