Unit 2 · Length, angle and the dot product
Lesson 11 · Available to read
Dot product: the meaning
Geometrically, a · b = ‖a‖‖b‖ cos θ: the dot product measures how closely two vectors point in the same direction.
The algebraic recipe of the previous lesson has a geometric meaning. If θ is the angle between non-zero vectors a and b, then
a · b = ‖a‖ ‖b‖ cos θ.
This identity follows from the law of cosines applied to the triangle formed by a, b and a − b. The bonus lesson walks through an illustrated proof. Rearranged, it lets us compute angles from components: cos θ = (a · b) / (‖a‖ ‖b‖).
For example, a = [3, 0] and b = [2, 2] give a · b = 6, ‖a‖ = 3 and ‖b‖ = 2√2. Thus cos θ = 6 / (6√2) = 1/√2, and θ = 45°.
Because the norms are positive, the sign of the dot product is the sign of cos θ. When the angle is acute (less than 90°) the dot product is positive and the vectors point broadly the same way. At exactly 90° it is zero. When the angle is obtuse it is negative, and the vectors point broadly in opposite directions. The magnitude of the dot product also depends on the lengths of the vectors, a point the lesson on cosine similarity will address.
The takeaway
a · b = ‖a‖‖b‖ cos θ; its sign shows whether the angle is acute, right or obtuse.
Practice
0 of 5 attempted
- 1Calculate
Find the angle between [3, 0] and [2, 2].
Saved in this browser
- 2Calculate
Find the angle between [1, 0] and [0, 2].
Saved in this browser
- 3Multiple choice
Two non-zero vectors are at an angle of 120°. What is the sign of their dot product?
- 4Explain in your own words
Why does the sign of a · b depend only on the angle, not on the lengths?
Saved in this browser
- 5Apply
A force [4, 3] pushes an object that moves along [1, 0]. Work equals force · displacement. Is the force helping the motion, and how much work does it do?
Saved in this browser