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.