Hands first, words secondDrag b once around the origin and keep your eye on the purple “shadow” and the sign of the dot product. When is the dot product exactly 0?
Loading figure…
Try this
Make the angle between b and a acute, right and obtuse, and look at the sign of the dot product each time.
Keep b fixed and make a twice as long (same direction). What happens to the dot product? Does the shadow change?
Let b=a. What is the dot product?
The two lines of calculation on the right use “length × shadow” and the coordinates x1x2+y1y2. Are they always equal?
For two nonzero vectors a, b with angle θ between them (0∘≤θ≤180∘), the inner product (dot product) is
a⋅b=∣a∣∣b∣cosθ.
∣b∣cosθ is the projection of b in the direction of a: the signed “shadow” that b casts on the line of a when the light shines perpendicular to that line. By convention the zero vector has dot product 0 with every vector. Some useful facts:
a⋅a=∣a∣2;
a⊥b⟺a⋅b=0;
cosθ=∣a∣∣b∣a⋅b, so ∣a⋅b∣≤∣a∣∣b∣;
in coordinates: if a=(x1,y1) and b=(x2,y2), then a⋅b=x1x2+y1y2.
Predict first
∣a∣=2, ∣b∣=3, a⋅b=−3. What is the angle between a and b, in degrees?
°
Choose an answer first; then you can see the result.
✓You predicted it!✗Not what you expected — which is exactly why it is worth a pause.
cosθ=2×3−3=−21, so θ=120∘.
The shadow is ∣b∣cosθ=−23: the shadow of b points against a and is half as long as b.
Loading figure…
a=(2,0), b=(−1.5,2.5): the dot product is −3 and ∣b∣≈2.92, close to 3, so the angle is about 121∘, close to 120∘.
Why: where the coordinate formula comes from
Proof that |a||b|cosθ = x₁x₂ + y₁y₂
Step 1 / 5
Loading figure…
Triangle OAB
OA=a=(3,1), OB=b=(1,3). The third side is AB=b−a.
∣AB∣=∣b−a∣
The law of cosines
Compute the same side in coordinates
Compare
Obtuse angles work too
Using the dot product to find a minimum
Expanding ∣b−ta∣2 gives a quadratic function of t. Here the dot product turns “shortest distance” in geometry into “completing the square”.
For which t is |b − ta| smallest?
Step 1 / 4
Loading figure…
t = 0
a=(2,1), b=(1,3). At t=0 the length is just ∣b∣=10≈3.16. Drag t: the head of the green arrow moves along a line parallel to a.
∣b−ta∣2=5t2−10t+10
Complete the square
The lowest point: perpendicular
The Cauchy inequality for free
Practice
Exercise 1Basic
a=(1,2), b=(3,−1). Find a⋅b.
Hint · direction
You have coordinates, so use the coordinate formula.
Hint · method
a⋅b=x1x2+y1y2.
Hint · first step
1×3+2×(−1).
Full solution
3−2=1.
Exercise 2Basic
∣a∣=3, ∣b∣=4, and the angle between them is 60∘. Find ∣a+b∣2.
Hint · direction
The square of the length is the dot product of the vector with itself.
Hint · method
∣a+b∣2=(a+b)⋅(a+b)=∣a∣2+2a⋅b+∣b∣2.
Hint · first step
a⋅b=3×4×cos60∘=6.
Full solution
9+12+16=37.
Exercise 3Advanced
a=(1,2), b=(x,1), and (a+2b)⊥(2a−b). Find all possible values of x (separated by commas; decimals are fine).
Hint · direction
Perpendicular ⟺ dot product 0.
Hint · method
Find the coordinates of the two vectors first, then set up the equation.
Hint · first step
a+2b=(1+2x,4), 2a−b=(2−x,3), so (1+2x)(2−x)+12=0.
Full solution
This simplifies to 2x2−3x−14=0, that is, (x+2)(2x−7)=0, so x=−2 or x=27.
Exercise 4Challenge
In △ABC, AB=2, AC=3, ∠A=60∘, and M is the midpoint of BC. Find AM2.
Hint · direction
Can you write the median as a vector in terms of AB and AC?
Hint · method
AM=21(AB+AC); square both sides.
Hint · first step
AM2=41(∣AB∣2+2AB⋅AC+∣AC∣2), where AB⋅AC=2×3×21=3.
Diagnosisa⋅b only sees the shadow of b in the direction of a, and infinitely many vectors cast the same shadow: with a=(1,0), both b=(2,1) and c=(2,−5) have dot product 2.
✓
The right step: The correct conclusion is a⋅(b−c)=0, that is, a⊥(b−c) (or b=c).
“A dot product is a number: the direction information is lost, so you cannot cancel”
Exhibit
A negative dot product means an obtuse angle
✗
The wrong step: a⋅b<0, so the angle between a and b is obtuse.
What went wrong? Think first, then open
Diagnosisa⋅b<0 only says cosθ<0, that is, 90∘<θ≤180∘. When θ=180∘ (the vectors point in opposite directions) the dot product is negative too, but that is not an obtuse angle.
✓
The right step: “The angle is obtuse” ⟺a⋅b<0 and a,b do not point in opposite directions. When you find a range for a parameter, remove the value that makes them opposite.
“Once you know the sign of the dot product, check the collinear case as well”
The Inner Product ← → step · F full screen · Esc exit