• Practice
  • About 18 min
  • 5 practice questions

The scalar (dot) product, angles and projections

Define the scalar product, compute it from components, find the angle between vectors and the projection of one on another, test perpendicularity, and use its properties and inequalities.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Define a⃗ · b⃗ = |a⃗||b⃗| cos θ and read its sign.
  • Compute a⃗ · b⃗ = a₁b₁ + a₂b₂ + a₃b₃ and the angle between two vectors.
  • Find the projection of one vector on another and test for perpendicular vectors.
  • Use the algebraic properties, |a⃗ + b⃗| ≤ |a⃗| + |b⃗| and |a⃗ · b⃗| ≤ |a⃗||b⃗|.

Vectors can be multiplied in two ways. The first gives a number, which is why it is called the scalar product. It measures how much two vectors point the same way, and it is the main tool for angles, perpendicularity and projections.

Angle between vectors and the definition

The angle θ between a⃗ and b⃗ is the angle between their directions when both start from (or both end at) the same point, with 0 ≤ θ ≤ π. If they meet tip to tail, extend one to make them both diverge first. θ = 0 or π means the vectors are parallel. For non-zero vectors the scalar (dot) product is a⃗ · b⃗ = |a⃗||b⃗| cos θ, a scalar.

Geometric meaning. Drop a perpendicular from the tip of b⃗ to the line of a⃗. The signed length from the start to the foot is |b⃗| cos θ, the projection of b⃗ on a⃗. So projection of b⃗ on a⃗ = (a⃗ · b⃗)/|a⃗|, and projection of a⃗ on b⃗ = (a⃗ · b⃗)/|b⃗|.

Properties

PropertyStatement
Commutativea⃗ · b⃗ = b⃗ · a⃗
Signθ acute: positive; θ = π/2: zero; θ obtuse: negative
Parallelθ = 0: a⃗ · b⃗ = |a⃗||b⃗|; θ = π: a⃗ · b⃗ = −|a⃗||b⃗|
Perpendicularnon-zero a⃗ ⊥ b⃗ if and only if a⃗ · b⃗ = 0
Unit vectorsî · î = ĵ · ĵ = k̂ · k̂ = 1; î · ĵ = ĵ · k̂ = k̂ · î = 0
Square of a vectora⃗ · a⃗ = |a⃗|², also written a⃗²
Scalars(λa⃗) · (μb⃗) = λμ(a⃗ · b⃗)
Distributivea⃗ · (b⃗ + c⃗) = a⃗ · b⃗ + a⃗ · c⃗
Useful identities|a⃗ ± b⃗|² = |a⃗|² ± 2a⃗ · b⃗ + |b⃗|²; (a⃗ + b⃗) · (a⃗ − b⃗) = |a⃗|² − |b⃗|²

Working rule. Using distributivity and the unit-vector products, if a⃗ = a₁î + a₂ĵ + a₃k̂ and b⃗ = b₁î + b₂ĵ + b₃k̂, then a⃗ · b⃗ = a₁b₁ + a₂b₂ + a₃b₃ and cos θ = (a₁b₁ + a₂b₂ + a₃b₃) / (|a⃗||b⃗|). Two inequalities follow: the triangle inequality |a⃗ + b⃗| ≤ |a⃗| + |b⃗| (one side of a triangle is at most the sum of the other two), and |a⃗ · b⃗| ≤ |a⃗||b⃗|, because |cos θ| ≤ 1.

Worked example 1: an angle

Find the angle between a⃗ = 2î − ĵ + 2k̂ and b⃗ = î + 2ĵ + 2k̂. Working: a⃗ · b⃗ = 2·1 + (−1)·2 + 2·2 = 2 − 2 + 4 = 4. |a⃗| = √(4 + 1 + 4) = 3 and |b⃗| = √(1 + 4 + 4) = 3. So cos θ = 4/9 and θ = cos⁻¹(4/9), an acute angle since the dot product is positive.

Worked example 2: perpendicular vectors and a projection

(i) Find λ so that 2î + λĵ + k̂ and î − 2ĵ + 4k̂ are perpendicular. Working: 2·1 + λ·(−2) + 1·4 = 0 gives 6 − 2λ = 0, so λ = 3. (ii) Find the projection of b⃗ = 3î + 4ĵ + 5k̂ on a⃗ = 2î − ĵ + 2k̂. Working: a⃗ · b⃗ = 6 − 4 + 10 = 12 and |a⃗| = 3, so the projection is 12/3 = 4.

Worked example 3: a right-angled triangle

Show that A(1, 0, 2), B(3, 1, 4), C(2, 0, 1) form a right-angled triangle. Working: AB⃗ = 2î + ĵ + 2k̂ and AC⃗ = î + 0ĵ − k̂. These are not parallel, so the points form a triangle. AB⃗ · AC⃗ = 2·1 + 1·0 + 2·(−1) = 0, so the angle at A is a right angle. Check with lengths: |AB⃗|² = 9, |AC⃗|² = 2 and BC⃗ = −î − ĵ − 3k̂ gives |BC⃗|² = 1 + 1 + 9 = 11 = 9 + 2.

Worked example 4: a magnitude from a dot product

If |a⃗| = 3, |b⃗| = 4 and a⃗ · b⃗ = 6, find |a⃗ + b⃗| and the angle between a⃗ and b⃗. Working: |a⃗ + b⃗|² = |a⃗|² + 2a⃗ · b⃗ + |b⃗|² = 9 + 12 + 16 = 37, so |a⃗ + b⃗| = √37. And cos θ = 6/(3 × 4) = 1/2, so θ = π/3. Note also that if |a⃗| = |b⃗|, then (a⃗ + b⃗) · (a⃗ − b⃗) = 0: the diagonals of a rhombus are perpendicular.

What the sign of a⃗ · b⃗ says

  • a⃗ · b⃗ > 0
    • 0 ≤ θ < π/2
    • Directions roughly agree
  • a⃗ · b⃗ = 0
    • θ = π/2 for non-zero vectors
    • Perpendicular
  • a⃗ · b⃗ < 0
    • π/2 < θ ≤ π
    • Directions roughly oppose

a⃗ · b⃗ = |a⃗||b⃗| cos θ = a₁b₁ + a₂b₂ + a₃b₃. Perpendicular ⇔ a⃗ · b⃗ = 0. Projection of b⃗ on a⃗ = (a⃗ · b⃗)/|a⃗|.

— Scalar product

Key takeaways: the dot product is a number; from components it is the sum of products of matching components; dividing by the magnitudes gives cos θ; zero means perpendicular; and expanding |a⃗ ± b⃗|² with it turns geometry questions into arithmetic.

Check your understanding

  1. 1. What is (3î − 2ĵ + k̂) · (î + 4ĵ − 2k̂)?

    1. −7
    2. 7
    3. 3
    4. −3
    Show answer

    Answer: A. 3·1 + (−2)·4 + 1·(−2) = 3 − 8 − 2 = −7. The negative value shows the angle between them is obtuse.

  2. 2. For which value of m are mî + 2ĵ − k̂ and 2î − mĵ + 3k̂ perpendicular?

    1. 1
    2. 3
    3. No value of m works
    4. −3
    Show answer

    Answer: C. The dot product is 2m − 2m − 3 = −3, whatever m is. It is never 0, so no value of m makes them perpendicular.

  3. 3. What is the projection of î + 2ĵ + 2k̂ on 3î + 4k̂?

    1. 11/3
    2. 11
    3. 11/5
    4. 5/11
    Show answer

    Answer: C. Projection of b⃗ on a⃗ = (a⃗ · b⃗)/|a⃗| with a⃗ = 3î + 4k̂. a⃗ · b⃗ = 3 + 0 + 8 = 11 and |a⃗| = 5, so the projection is 11/5. Dividing by |b⃗| = 3 instead would give the projection the other way round.

  4. 4. If |a⃗| = 2, |b⃗| = 3 and the angle between them is 60°, what is |a⃗ − b⃗|²?

    1. 7
    2. 19
    3. 13
    4. 1
    Show answer

    Answer: A. a⃗ · b⃗ = 2 × 3 × cos 60° = 3. |a⃗ − b⃗|² = |a⃗|² − 2a⃗ · b⃗ + |b⃗|² = 4 − 6 + 9 = 7.

  5. 5. Which is always true for any vectors a⃗ and b⃗?

    1. |a⃗ · b⃗| ≥ |a⃗||b⃗|
    2. |a⃗ · b⃗| ≤ |a⃗||b⃗|
    3. |a⃗ + b⃗| = |a⃗| + |b⃗|
    4. a⃗ · b⃗ ≥ 0
    Show answer

    Answer: B. |a⃗ · b⃗| = |a⃗||b⃗||cos θ| and |cos θ| ≤ 1, so |a⃗ · b⃗| ≤ |a⃗||b⃗|. Equality |a⃗ + b⃗| = |a⃗| + |b⃗| holds only for like vectors, and a⃗ · b⃗ is negative for obtuse angles.

Privacy · Terms · Refunds · Delivery