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⟩ and v=⟨v1,v2⟩, the dot product is calculated by multiplying corresponding components and adding the results:
u⋅v=u1v1+u2v2
(This extends naturally to 3D vectors: u1v1+u2v2+u3v3)
Finding the Angle Between Vectors
The dot product connects algebra and geometry. Geometrically, it is defined as:
u⋅v=∣u∣∣v∣cosθ
where θ is the angle between the two vectors, and ∣u∣ and ∣v∣ are their magnitudes (lengths). Rearranging this gives a reliable formula for finding the angle between any two vectors:
cosθ=∣u∣∣v∣u⋅v
Example: Find the angle between u=⟨2,3⟩ and v=⟨−1,4⟩.
- Find the dot product: u⋅v=(2)(−1)+(3)(4)=−2+12=10
- Find the magnitudes: ∣u∣=22+32=4+9=13 ∣v∣=(−1)2+42=1+16=17
- Calculate the angle: cosθ=131710=22110 θ=arccos(22110)≈47.7∘
Orthogonal (Perpendicular) Vectors
If two non-zero vectors are perpendicular, the angle between them is 90∘. Since cos(90∘)=0, their dot product must be zero.
Rule: Two vectors u and v are orthogonal if and only if: u⋅v=0
Vector Projection
The vector projection of u onto v gives the component (or "shadow") of u that lies perfectly along the direction of v. The formula is:
projvu=(∣v∣2u⋅v)v
Example: Find the projection of u=⟨3,4⟩ onto v=⟨1,0⟩.
- Dot product: u⋅v=(3)(1)+(4)(0)=3
- Magnitude squared of v: ∣v∣2=12+02=1
- Projection: projvu=(13)⟨1,0⟩=⟨3,0⟩
This means the component of ⟨3,4⟩ acting purely in the horizontal direction (along ⟨1,0⟩) is exactly ⟨3,0⟩.