Geometry: Parametric curves and vectors
The dot product
Let #\blue{\vec{x}} =\blue{\cv{x_1\\x_2}}# and #\green{\vec{y}}=\green{\cv{y_1\\y_2}}# be two vectors. We define the dot product between #\blue{\vec{x}}# and #\green{\vec{y}}# to be \[\dotprod{\blue{\vec{x}} }{ \green{\vec{y}}} = \blue{x_1}\cdot \green{y_1} + \blue{x_2}\cdot\green{y_2}\] Note that the dot product between two vectors always produces a number, not a vector.
Example
Let #\blue{\vec{x}} =\blue{\cv{1\\1}}# and #\green{\vec{y}}=\green{\cv{5\\0}}#. Then #\dotprod{\blue{\vec{x}}}{ \green{\vec{y}}} = \blue{1}\cdot\green{5} + \blue{1}\cdot\green{0} = 5#.
The dot product gives rise to many interesting applications, for instance, it allows us to compute the angle between two vectors. To calculate this angle we need another formula.
Let #\blue{\vec{x}} =\blue{\cv{x_1\\x_2}}# and #\green{\vec{y}}=\green{\cv{y_1\\y_2}}# be vectors and let #\phi# be the smallest angle between them. Then \[\cos(\phi) = \frac{\dotprod{\blue{\vec{x}} }{ \green{\vec{y}}}}{||\blue{\vec{x}}|| \cdot ||\green{\vec{y}}||}\] where #||\blue{\vec{x}}||# and #||\green{\vec{y}}||# denote the lengths of vectors #\blue{\vec{x}}# and #\green{\vec{y}}# respectively.
Example
Let again #\blue{\vec{x}} =\blue{\cv{1\\1}}# and #\green{\vec{y}}=\green{\cv{5\\0}}#.
\[\cos(\phi)= \frac{\dotprod{\blue{\vec{x}} }{ \green{\vec{y}}}}{||\blue{\vec{x}}|| \cdot ||\green{\vec{y}}||} = \frac{5}{\sqrt{2} \cdot 5} = \frac{1}{\sqrt{2}},\] meaning that #\phi = \frac{\pi}{4}#.
In many applications, it is useful to work with vectors that are orthogonal.
Two vectors #\blue{\vec{x}}# and #\green{\vec{y}}# are orthogonal, or perpendicular, if the smallest angle #\phi# between them is #\frac{\pi}{2}#.
Since we know #\cos\left(\frac{\pi}{2}\right)=0#, we have that #\blue{\vec{x}}# and #\green{\vec{y}}# are orthogonal if and only if #\dotprod{\blue{\vec{x}} }{ \green{\vec{y}}}=0#.
Example
Let #\blue{\vec{x}} =\blue{\cv{1\\2}}# and #\green{\vec{y}}=\green{\cv{2\\-1}}#. We have #\dotprod{\blue{\vec{x}}}{ \green{\vec{y}}}=\blue{1}\cdot\green{2} + \blue{2} \cdot \green{-1} = 0# and indeed #\phi=\frac{\pi}{2}#.
We want to use the formula #\cos(\phi)=\frac{\dotprod{\vec{x}}{ \vec{y}}}{||\vec{x}|| \cdot ||\vec{y}||}#. First, we calculate the dot product between #\vec{x}# and #\vec{y}#: \[\dotprod{\vec{x}}{\vec{y}} = 1 \cdot 2 -1 \cdot -1 = 3\] Next, we find the lengths of vectors #\vec{x}# and #\vec{y}#: \[||\vec{x}||= \sqrt{(1)^2 + (-1)^2} = \sqrt{2} \quad \text{and} \quad ||\vec{y}||=\sqrt{(2)^2 + (-1)^2}=\sqrt{5}\] Filling in these numbers gives \[\cos(\phi)=\frac{\dotprod{\vec{x}}{ \vec{y}}}{||\vec{x}|| \cdot ||\vec{y}||}= \frac{3}{\sqrt{2} \cdot \sqrt{5}} = {{3}\over{\sqrt{2}\cdot \sqrt{5}}}\]
Or visit omptest.org if jou are taking an OMPT exam.