The dot product of two vectors is a single number (scalar) that measures how much they point in the same direction.
Algebraic formula (2D): \(\vec{a} \cdot \vec{b} = a_x b_x + a_y b_y\)
Geometric formula: \(\vec{a} \cdot \vec{b} = \|\vec{a}\| \|\vec{b}\| \cos \theta\)
Key facts:
From the geometric formula, we can find the angle between two vectors:
\[ \cos \theta = \frac{\vec{a} \cdot \vec{b}}{\|\vec{a}\| \|\vec{b}\|} \]Example: If dot product = 0, cos θ = 0 → θ = 90° (perpendicular).
The scalar projection of \(\vec{a}\) onto \(\vec{b}\) is:
\[ \text{proj}_{\vec{b}} \vec{a} = \frac{\vec{a} \cdot \vec{b}}{\|\vec{b}\|^2} \vec{b} \]It tells how much of \(\vec{a}\) lies in the direction of \(\vec{b}\).