The dot product of two vectors multiplies matching components and adds: u · v = u₁v₁ + u₂v₂. The result is a number, not a vector. The law of cosines shows that this number also equals |u||v|cos θ, where θ is the angle between the vectors, so the dot product measures that angle. It is zero exactly when the vectors are perpendicular. Dividing by |v| gives the length of the shadow u casts along v, which is how a projection and the work done by a force are computed.
Adding vectors gives a vector. Multiplying a vector by a number gives a vector.
The dot product does something else: it turns two vectors into a single
number.
u⋅v=u1v1+u2v2
For u=⟨3,4⟩ and v=⟨2,−1⟩,
u⋅v=3(2)+4(−1)=2
That number carries geometric information: it measures how much the two
vectors point the same way.
u⋅v=∣u∣∣v∣cosθ
where θ is the angle between them, taken between 0° and 180°.
The first two brackets are ∣u∣2 and ∣v∣2, so comparing
the two lines leaves u1v1+u2v2=∣u∣∣v∣cosθ.
The component formula and the angle formula are the law of cosines written
twice, which is why a sum of products can report an angle.
Two consequences follow at once. Since ∣u∣ and ∣v∣ are
positive, the sign of the dot product is the sign of cosθ:
The dot product also answers: how far does u reach in the direction
of v? Dropping a perpendicular from the tip of u onto the
line through v leaves a shadow of length
∣u∣cosθ, which is the dot product divided by ∣v∣:
compvu=∣v∣u⋅vprojvu=∣v∣2u⋅vv
The first is a number, the length of the shadow. The second is the shadow
itself, a vector along v.
The dot product is 3+2=5, and the lengths are 5 and 10. So cosθ=505=22.
Are ⟨4,−2⟩ and ⟨1,2⟩ perpendicular?
Answer
Yes
Full solution
4(1)+(−2)(2)=4−4=0.
Find k so that ⟨k,3⟩ is perpendicular to ⟨6,−2⟩.
Answer
k=1
Full solution
6k−6=0.
Use the dot product to find the length of ⟨6,8⟩.
Answer
10
Full solution
u⋅u=36+64=100, which is ∣u∣2, so ∣u∣=10.
Find the projection of ⟨3,4⟩ onto ⟨1,1⟩.
Answer
⟨3.5,3.5⟩
Full solution
The dot product is 7 and ∣v∣2=2, so the projection is 27⟨1,1⟩.
A force of ⟨12,5⟩ newtons moves an object ⟨10,0⟩ meters. Find the work.
Answer
120 joules
Full solution
12(10)+5(0)=120.
Find the angle between ⟨−1,3⟩ and ⟨2,1⟩, to the nearest tenth of a degree.
Answer
About 81.9°
Full solution
The dot product is −2+3=1, and the lengths are 10 and 5. So cosθ=501≈0.1414 and θ≈81.9°.
Explain why u⋅v=v⋅u for every pair of vectors.
Answer
u1v1+u2v2=v1u1+v2u2
Full solution
Each term is a product of two numbers, and multiplying numbers does not depend on the order. Geometrically, the angle between two vectors is the same either way round.
A student reports that the angle between ⟨1,0⟩ and ⟨−1,0⟩ is 0°, since the dot product is −1 and cos0°=1. What went wrong?
Hint
Divide by the lengths, and watch the sign.
Answer
cosθ=1⋅1−1=−1, so θ=180°. The vectors point in opposite directions.
Full solution
The dot product is −1, and both lengths are 1, so cosθ=−1. The negative sign says the angle is obtuse, and the only angle with cosine −1 between 0° and 180° is 180°, which matches two arrows pointing opposite ways.
Frequently asked questions
What is the dot product of two vectors?
For u = ⟨u₁, u₂⟩ and v = ⟨v₁, v₂⟩, it is u₁v₁ + u₂v₂. The answer is a single number, called a scalar.
How do you find the angle between two vectors?
Use cos θ = (u · v)/(|u||v|), then take the inverse cosine. The angle comes out between 0° and 180°.
What does a dot product of zero mean?
The vectors are perpendicular, since cos 90° = 0. This is the quickest test for a right angle.
What does a negative dot product mean?
The angle between the vectors is obtuse, because cosine is negative between 90° and 180°.
How is work a dot product?
Work is the force times the distance moved in the force's direction, which is exactly F · d.