• Practice
  • About 16 min
  • 5 practice questions

Dot product and the angle between two vectors

Find a · b from the definition and from components, use it to find the angle between two vectors, test perpendicularity, and expand dot products of sums like ordinary algebra.

If something looks wrong, please tell us.

The foundation course added vectors and multiplied them by numbers. The next step is to multiply two vectors together. There are two different products, and they answer different questions. The dot product (also called the scalar product) gives a number that measures how far two vectors point the same way. It is the fastest route to the angle between two vectors and to the test for perpendicular lines, so it appears in almost every vector question in competitive exams.

The definition

Draw a and b from the same point and let θ be the angle between them, with 0° ≤ θ ≤ 180°. The dot product is a · b = |a| |b| cos θ. The answer is a scalar, not a vector. If θ is acute, cos θ is positive and so is a · b; if θ is obtuse, a · b is negative; if θ = 90°, a · b = 0.

The dot product in components

Since i, j and k are unit vectors at right angles, i · i = j · j = k · k = 1 (angle 0°) and i · j = j · k = k · i = 0 (angle 90°). Expanding (a₁i + a₂j + a₃k) · (b₁i + b₂j + b₃k) term by term, every mixed product vanishes and we are left with a · b = a₁b₁ + a₂b₂ + a₃b₃: multiply matching components and add.

a · b = |a| |b| cos θ = a₁b₁ + a₂b₂ + a₃b₃. So cos θ = (a · b)/(|a| |b|), and for non-zero vectors, a ⊥ b exactly when a · b = 0.

Rules that let you expand like algebra

  • Commutative: a · b = b · a.
  • Distributive: a · (b + c) = a · b + a · c.
  • Scalars come out: (λa) · b = λ(a · b).
  • Square of a vector: a · a = |a|², so |a| = √(a · a).
  • Sign test: a · b > 0 means acute (or the same direction), a · b = 0 means perpendicular, a · b < 0 means obtuse (or opposite directions).

Worked example 1: an obtuse angle

Find the angle between a = 2i − j + 2k and b = i + 2j − 2k. First a · b = 2 − 2 − 4 = −4. Next |a| = √(4 + 1 + 4) = 3 and |b| = √(1 + 4 + 4) = 3. So cos θ = −4/9, and θ = cos⁻¹(−4/9), about 116.4°. The negative sign told us at once that the angle is obtuse, which is often enough to eliminate two options.

Worked example 2: a standard angle

Find the angle between i + j and j + k. The dot product is 1 × 0 + 1 × 1 + 0 × 1 = 1. Each vector has magnitude √2, so cos θ = 1/(√2 × √2) = 1/2 and θ = 60°.

Worked example 3: making two vectors perpendicular

Find λ so that 2i + λj + k and i − 2j + 3k are perpendicular. Set the dot product to zero: 2 × 1 + λ × (−2) + 1 × 3 = 5 − 2λ = 0, so λ = 5/2. A perpendicularity question is always one linear equation.

Worked example 4: expanding a product

|a| = 2, |b| = 3 and the angle between them is 60°. Find (2a + b) · (a − b). First a · b = 2 × 3 × cos 60° = 3. Expand: (2a + b) · (a − b) = 2a · a − 2a · b + b · a − b · b = 2|a|² − a · b − |b|² = 8 − 3 − 9 = −4. Collect the a · b terms carefully: −2a · b + b · a = −a · b.

Common traps

The angle between two vectors is measured with both drawn from the same point; in a triangle ABC the angle at B is between BA and BC, not between AB and BC (those give the exterior angle, 180° − B). Do not write a · a = a²; write |a|². And a · b = 0 does not mean a = 0 or b = 0: perpendicular non-zero vectors also give zero.

Key takeaways: a · b = |a||b| cos θ = a₁b₁ + a₂b₂ + a₃b₃. Find an angle from cos θ = (a · b)/(|a||b|), check the sign first, and set a · b = 0 for perpendicular vectors. Dot products of sums expand like algebra, with a · a = |a|².

Check your understanding

  1. 1. What is (i + 2j − 3k) · (3i − j + k)?

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

    Answer: B. Multiply matching components and add: 1 × 3 + 2 × (−1) + (−3) × 1 = 3 − 2 − 3 = −2.

  2. 2. What is the angle between i − j and j − k?

    1. 60°
    2. 90°
    3. 120°
    4. 150°
    Show answer

    Answer: C. (i − j) · (j − k) = 0 + (−1)(1) + 0 = −1. Both magnitudes are √2, so cos θ = −1/2 and θ = 120°. Answering 60° ignores the minus sign.

  3. 3. For what value of λ are λi + 2j + k and i − 2j + 3k perpendicular?

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

    Answer: A. The dot product must be zero: λ − 4 + 3 = λ − 1 = 0, so λ = 1.

  4. 4. |a| = 4, |b| = 3 and a · b = 6. What is the angle between a and b?

    1. 30°
    2. 45°
    3. 120°
    4. 60°
    Show answer

    Answer: D. cos θ = (a · b)/(|a||b|) = 6/12 = 1/2, so θ = 60°.

  5. 5. |a| = 5 and |b| = 3. What is (a + b) · (a − b)?

    1. 34
    2. 16
    3. 4
    4. 8
    Show answer

    Answer: B. (a + b) · (a − b) = a · a − a · b + b · a − b · b = |a|² − |b|² = 25 − 9 = 16. The middle terms cancel because a · b = b · a.

Privacy · Terms · Refunds · Delivery