Facebook Pixel
Mathos AI logo

Dot Product and Vector Angles

Dot Product and Angle Between Vectors

The dot product (or scalar product) is an algebraic operation that takes two equal-length sequences of numbers (usually coordinate vectors) and returns a single number (a scalar). It is a powerful tool in both algebra and geometry.

Calculating the Dot Product

For two 2D vectors u⃗=⟹u1,u2⟩\vec{u} = \langle u_1, u_2 \rangle and v⃗=⟹v1,v2⟩\vec{v} = \langle v_1, v_2 \rangle, the dot product is calculated by multiplying corresponding components and adding the results:

u⃗⋅v⃗=u1v1+u2v2\vec{u} \cdot \vec{v} = u_1 v_1 + u_2 v_2

(This extends naturally to 3D vectors: u1v1+u2v2+u3v3u_1 v_1 + u_2 v_2 + u_3 v_3)

Finding the Angle Between Vectors

The dot product connects algebra and geometry. Geometrically, it is defined as:

u⃗⋅v⃗=∣u⃗∣∣v⃗∣cos⁡Ξ\vec{u} \cdot \vec{v} = |\vec{u}| |\vec{v}| \cos \theta

where Ξ\theta is the angle between the two vectors, and ∣u⃗∣|\vec{u}| and ∣v⃗∣|\vec{v}| are their magnitudes (lengths). Rearranging this gives a reliable formula for finding the angle between any two vectors:

cos⁡Ξ=u⃗⋅v⃗∣u⃗∣∣v⃗∣\cos \theta = \frac{\vec{u} \cdot \vec{v}}{|\vec{u}| |\vec{v}|}

Example: Find the angle between u⃗=⟹2,3⟩\vec{u} = \langle 2, 3 \rangle and v⃗=⟹−1,4⟩\vec{v} = \langle -1, 4 \rangle.

  1. Find the dot product: u⃗⋅v⃗=(2)(−1)+(3)(4)=−2+12=10\vec{u} \cdot \vec{v} = (2)(-1) + (3)(4) = -2 + 12 = 10
  2. Find the magnitudes: ∣u⃗∣=22+32=4+9=13|\vec{u}| = \sqrt{2^2 + 3^2} = \sqrt{4 + 9} = \sqrt{13} ∣v⃗∣=(−1)2+42=1+16=17|\vec{v}| = \sqrt{(-1)^2 + 4^2} = \sqrt{1 + 16} = \sqrt{17}
  3. Calculate the angle: cos⁡Ξ=101317=10221\cos \theta = \frac{10}{\sqrt{13}\sqrt{17}} = \frac{10}{\sqrt{221}} Ξ=arccos⁡(10221)≈47.7∘\theta = \arccos\left(\frac{10}{\sqrt{221}}\right) \approx 47.7^\circ

Orthogonal (Perpendicular) Vectors

If two non-zero vectors are perpendicular, the angle between them is 90∘90^\circ. Since cos⁡(90∘)=0\cos(90^\circ) = 0, their dot product must be zero.

Rule: Two vectors u⃗\vec{u} and v⃗\vec{v} are orthogonal if and only if: u⃗⋅v⃗=0\vec{u} \cdot \vec{v} = 0

Vector Projection

The vector projection of u⃗\vec{u} onto v⃗\vec{v} gives the component (or "shadow") of u⃗\vec{u} that lies perfectly along the direction of v⃗\vec{v}. The formula is:

projv⃗u⃗=(u⃗⋅v⃗∣v⃗∣2)v⃗\text{proj}_{\vec{v}} \vec{u} = \left( \frac{\vec{u} \cdot \vec{v}}{|\vec{v}|^2} \right) \vec{v}

Example: Find the projection of u⃗=⟹3,4⟩\vec{u} = \langle 3, 4 \rangle onto v⃗=⟹1,0⟩\vec{v} = \langle 1, 0 \rangle.

  1. Dot product: u⃗⋅v⃗=(3)(1)+(4)(0)=3\vec{u} \cdot \vec{v} = (3)(1) + (4)(0) = 3
  2. Magnitude squared of v⃗\vec{v}: ∣v⃗∣2=12+02=1|\vec{v}|^2 = 1^2 + 0^2 = 1
  3. Projection: projv⃗u⃗=(31)⟹1,0⟩=⟹3,0⟩\text{proj}_{\vec{v}} \vec{u} = \left( \frac{3}{1} \right) \langle 1, 0 \rangle = \langle 3, 0 \rangle

This means the component of ⟹3,4⟩\langle 3, 4 \rangle acting purely in the horizontal direction (along ⟹1,0⟩\langle 1, 0 \rangle) is exactly ⟹3,0⟩\langle 3, 0 \rangle.