← Back to course

The Dot Product & Angles Between Vectors

You’ll be able to

A product of two vectors that is a number

The dot product of ⟨a₁, a₂⟩ and ⟨b₁, b₂⟩ is a₁b₁ + a₂b₂ — multiply matching components and add. The result is a single number, not a vector, which is why it is also called the scalar product. Its value measures how much the two vectors point the same way, and that interpretation is what makes it useful.

Two formulas for the dot product
u · v = u₁v₁ + u₂v₂ · u · v = |u||v|cos θ
Setting the two equal and solving for cos θ is how the angle between vectors is found. Note that the dot product is commutative: u · v = v · u.

The sign tells you the geometry

Since |u| and |v| are positive, the sign of u · v is the sign of cos θ. Positive means θ < 90°, so the vectors broadly agree in direction. Negative means θ > 90°, so they broadly oppose. Zero means cos θ = 0, so θ = 90° exactly — the vectors are perpendicular. That last case is the most-used fact in the topic: perpendicularity is a single arithmetic check, with no angle computation at all.

Angle between vectors, and the perpendicularity test
cos θ = (u · v)/(|u||v|) · u ⟂ v ⟺ u · v = 0
Compute the two magnitudes and the dot product, divide, then take arccos. The result always lies in [0°, 180°], since arccos does.
Worked example

Find the angle between u = ⟨3, 4⟩ and v = ⟨−1, 2⟩.

  1. 1.Dot product: u · v = 3(−1) + 4(2) = −3 + 8 = 5.
  2. 2.Magnitudes: |u| = √(9 + 16) = 5 and |v| = √(1 + 4) = √5 ≈ 2.236.
  3. 3.cos θ = 5/(5 · 2.236) = 5/11.180 ≈ 0.44721.
  4. 4.θ = arccos(0.44721) ≈ 63.43°.
  5. 5.Sign check: the dot product is positive, so the angle must be under 90°. ✓
Answer: The angle is about 63.4°. Checking the sign of the dot product against the answer catches sign errors immediately — a positive dot product with an obtuse answer means an arithmetic mistake somewhere.
Checkpoint

Which pair of vectors is perpendicular?

Watch out

The dot product is a number, so writing "u · v = ⟨5, 0⟩" is a category error. It also has no inverse: from u · v = u · w you cannot conclude v = w, because many different vectors share a dot product with u.

Magnitude from the dot product

Dot a vector with itself: u · u = u₁² + u₂², which is exactly |u|². So |u| = √(u · u), and the dot product contains the distance formula as a special case. This also explains why a vector's dot product with itself can never be negative, and is zero only for the zero vector.

Worked example

A force of ⟨6, 8⟩ newtons acts on an object displaced by ⟨4, 3⟩ meters. Compute the work done, and the angle between force and displacement.

  1. 1.Work is the dot product of force and displacement: W = 6(4) + 8(3) = 24 + 24 = 48 joules.
  2. 2.|F| = √(36 + 64) = 10 N and |d| = √(16 + 9) = 5 m.
  3. 3.cos θ = 48/(10 · 5) = 0.96.
  4. 4.θ = arccos(0.96) ≈ 16.26°.
  5. 5.Interpretation: the force is nearly aligned with the motion, so almost all of it does useful work.
Answer: The work done is 48 joules, and the angle between force and displacement is about 16.3°. Work is the canonical physical use of the dot product — it captures precisely the idea that only the component of force along the motion contributes.
Checkpoint

Two vectors have a negative dot product. What does this indicate?

Answer the 2 checkpoints as you read.

Sign in to save your progress