IB Mathematics: Analysis and Approaches • Geometry and Trigonometry

Dot Product & Vector Angles — AHL 3.10 Scalar (dot) product; angles; perpendicular/parallel vectors (HL)

Discover how multiplying vectors reveals the angle between them and unlocks tests for perpendicularity and parallelism.

IB Mathematics Analysis and Approaches emblem with a function, curved graph, and sigma notation
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

Historical Context & Motivation

Vectors have been central to mathematics and physics for centuries, but the idea of multiplying two vectors together took a surprisingly long time to develop. Before the dot product existed, finding the angle between two directions in space required cumbersome trigonometric constructions. Mathematicians needed a compact, algebraic way to extract angle information directly from vector components — and the scalar product (also called the dot product) was the elegant answer.

1843 • Hamilton's Quaternions

William Rowan Hamilton invented quaternions — a 4-dimensional number system. Multiplying two quaternions naturally split into a scalar part and a vector part, planting the seeds for both the dot and cross products.

1878 • Clifford's Elements of Dynamic

William Kingdon Clifford published work that began separating vector algebra from quaternions, making vector operations more accessible to physicists and engineers.

1881 • Gibbs Introduces Modern Vector Notation

Josiah Willard Gibbs at Yale developed the modern dot product and cross product as standalone operations. He defined a · b as a scalar quantity that encodes the angle between two vectors.

1901 • Gibbs–Wilson Textbook

Edwin Bidwell Wilson, a student of Gibbs, published Vector Analysis, formalising the notation and theory used in classrooms today. The dot product became standard across mathematics, physics, and engineering.

So why do you need the dot product? Imagine you know two vectors only through their components, like a = (3, 4) and b = (−1, 2). What angle do they form? Are they perpendicular? Parallel? The dot product answers all of these questions with a single calculation. That's the power you'll unlock in this lesson.

SECTION 2

Core Principles & Definitions

The dot product connects the algebraic world of components to the geometric world of angles. Before diving into formulas, it helps to understand four key ideas that underpin everything in this topic.

1

Scalar Result

Unlike vector addition or the cross product, the dot product of two vectors yields a single number (scalar), not another vector. That's why it's officially called the scalar product.
2

Two Equivalent Formulas

You can compute the dot product using components (multiply matching components and add) or using magnitudes and the cosine of the angle between them. Both give the same answer.
3

Perpendicular Vectors

Two non-zero vectors are perpendicular (orthogonal) if and only if their dot product equals zero. This is one of the most useful tests in vector geometry.
4

Parallel Vectors

Two non-zero vectors are parallel when one is a scalar multiple of the other. Their dot product then equals ± the product of their magnitudes.
✦

KEY TAKEAWAY

Think of the dot product like a "shadow meter." If you shine a flashlight along the direction of vector b, the dot product tells you how much of vector a falls in that same direction — its shadow on b — scaled by the length of b. When the vectors are perpendicular, the shadow has zero length, so the dot product is zero. When they point the same way, the shadow is maximum.

SECTION 3

Visual Explanation — Vectors and the Angle Between Them

The Angle θ Between Two VectorsabθOprojection of b onto a|b| sin θ|b| cos θa · b = |a| |b| cos θ → the dot product captures the "aligned" component of b along a.
Vector a (cyan) and vector b (violet) meet at the origin O. The angle θ (pink arc) is the angle between them. The amber dashed line shows the projection of b onto a, whose length is |b| cos θ. The dot product equals |a| times that projection length.

The diagram makes the geometric meaning of the dot product crystal clear. When you compute a · b, you are really finding how much of b points in the direction of a (the projection, shown in amber), and then scaling that by the magnitude of a. If θ is 90°, the projection collapses to zero, so a · b = 0. If θ is 0°, the projection equals the full length of b, giving the maximum dot product. If θ is between 90° and 180°, the projection points opposite to a, so the dot product becomes negative.

SECTION 4

Mathematical Framework

Component Form of the Dot Product

DOT PRODUCT — COMPONENT FORM (2D)

a⋅b=a1b1+a2b2a · b = a₁b₁ + a₂b₂

If a = (a₁, a₂) and b = (b₁, b₂). Multiply each pair of matching components, then add.

DOT PRODUCT — COMPONENT FORM (3D)

a⋅b=a1b1+a2b2+a3b3a · b = a₁b₁ + a₂b₂ + a₃b₃

If a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃). The pattern extends naturally: one extra product for the third component.

Geometric Form of the Dot Product

DOT PRODUCT — GEOMETRIC FORM

a⋅b=∣a∣∣b∣cosθa · b = |a| |b| cos θ

where |a| and |b| are the magnitudes (lengths) of the vectors, and θ is the angle between them (0° ≤ θ ≤ 180°).

Finding the Angle Between Two Vectors

ANGLE FORMULA

cosθ=(a⋅b)/(∣a∣∣b∣)cos θ = (a · b) / (|a| |b|)

Rearranging the geometric form lets you isolate cos θ. Then take the inverse cosine (arccos) to find the angle: θ = cos⁻¹( (a · b) / (|a| |b|) ).

The two forms — component and geometric — are always equal. This is what makes the dot product so powerful: compute the left side with just components (pure algebra), then equate it to the right side to extract the angle (geometry). No protractors needed.

💡

IB Notation Reminder

In IB exams, vectors are often written in column notation rather than row form. For example, a might appear as a column with entries stacked vertically. The dot product formula is identical — just multiply corresponding entries and sum. Also remember that the IB uses radians and degrees; make sure your calculator is in the correct mode.

SECTION 5

Perpendicular & Parallel Vectors

Two of the most commonly tested scenarios on the IB exam involve checking whether vectors are perpendicular or parallel. Both tests follow directly from the dot product formula.

Perpendicular (a · b = 0)Parallel (a = kb)abθ = 90°cos 90° = 0a · b = 0abb = ½a (same direction)θ = 0°, cos 0° = 1acc = −½a (opposite), θ = 180°
Left: Perpendicular vectors form a 90° angle (pink square). Their dot product is zero. Right: Parallel vectors point in the same direction (θ = 0°) or exactly opposite directions (θ = 180°). One vector is always a scalar multiple of the other.
ConditionAlgebraic TestGeometric Meaning
Perpendiculara · b = 0 (and a ≠ 0, b ≠ 0)θ = 90°; the vectors form a right angle.
Parallel (same direction)a = kb for some k > 0θ = 0°; a · b = |a| |b|.
Anti-parallel (opposite)a = kb for some k < 0θ = 180°; a · b = −|a| |b|.
Acute anglea · b > 00° < θ < 90°.
Obtuse anglea · b < 090° < θ < 180°.

Quick-reference guide: sign of dot product ↔ type of angle

⚠

Common Exam Trap

Don't forget the condition that both vectors must be non-zero for the perpendicularity test. The zero vector has zero dot product with every vector, but it has no direction, so it isn't perpendicular to anything.

SECTION 6

Worked Example

Let's work through a full IB-style problem that brings together the dot product, the angle formula, and a perpendicularity check.

Finding the Angle Between Two 3D Vectors

  1. 1

    Step 1 — State the vectors

    Let a = (2, −1, 3) and b = (4, 2, −1). We want to find the angle θ between them.
  2. 2

    Step 2 — Compute the dot product (component form)

    a · b = (2)(4) + (−1)(2) + (3)(−1) = 8 + (−2) + (−3) = 3.
    a · b = 3
  3. 3

    Step 3 — Find the magnitudes

    |a| = √(2² + (−1)² + 3²) = √(4 + 1 + 9) = √14. Similarly, |b| = √(4² + 2² + (−1)²) = √(16 + 4 + 1) = √21.
    |a| = √14, |b| = √21
  4. 4

    Step 4 — Apply the angle formula

    cos θ = (a · b) / (|a| |b|) = 3 / (√14 × √21) = 3 / √294. Now √294 ≈ 17.146, so cos θ ≈ 3 / 17.146 ≈ 0.17496.
    cos θ ≈ 0.175
  5. 5

    Step 5 — Find θ using inverse cosine

    θ = cos⁻¹(0.17496) ≈ 79.9°. On the IB, you would typically round to three significant figures.
    θ ≈ 79.9° (or 1.39 radians)
  6. 6

    Step 6 — Interpret the result

    Since the dot product is positive, the angle is acute (less than 90°), which our answer of 79.9° confirms. The vectors are not perpendicular (dot product ≠ 0) and not parallel (one is not a scalar multiple of the other).
✓

STRATEGY CHECKLIST

For any "find the angle" question: (1) compute a · b using components, (2) compute |a| and |b|, (3) substitute into cos θ = (a · b)/(|a||b|), (4) apply cos⁻¹. Always double-check that your answer lies between 0° and 180° — that's the only range the formula produces.

SECTION 7

Properties, Strengths & Limitations

The dot product obeys several algebraic properties that make it versatile and reliable. Understanding these properties will help you simplify expressions and avoid common mistakes on exams.

PropertyFormula / RuleWhy It Matters
Commutativea · b = b · aOrder doesn't matter. You'll never get a different answer by swapping the vectors.
Distributivea · (b + c) = a · b + a · cYou can expand brackets just like ordinary algebra.
Scalar Multiplication(ka) · b = k(a · b)A scalar factor can be pulled outside the dot product.
Self Dot Producta · a = |a|²Dot-producting a vector with itself gives the square of its magnitude. Very useful for finding lengths.
Not Associative(a · b) · c is undefineda · b is a scalar, and you cannot dot a scalar with a vector. Be careful with triple products.

Key algebraic properties of the dot product

⚠

LIMITATION TO REMEMBER

The dot product only gives you the angle between two vectors — it tells you nothing about the direction of a perpendicular vector or about the area of a parallelogram formed by two vectors. For those tasks, you need the cross product (covered in AHL 3.12). Think of the dot product as the "alignment detector" and the cross product as the "rotation/area detector."

SECTION 8

Connections to Advanced Theory

The dot product you learn in IB HL is a gateway to many powerful ideas in university mathematics and science. Here's a quick look at where the concept leads.

IB HL ConceptAdvanced Extension
Dot product a · b = a₁b₁ + a₂b₂ + a₃b₃Inner product on abstract vector spaces: 〈f, g〉 = ∫ f(x)g(x) dx. This generalises the dot product to functions, used in Fourier analysis.
Perpendicular test: a · b = 0Orthogonality in higher dimensions: orthogonal bases, Gram–Schmidt process, and orthogonal projections in linear algebra.
Angle between two vectorsIn machine learning, cosine similarity cos θ = (a · b)/(|a||b|) measures how alike two data vectors are — used in search engines and recommendation systems.
Scalar projection |a| cos θWork in physics: W = F · d. The work done by a force equals the dot product of the force vector and the displacement vector.

From IB HL to university and beyond

If you continue into physics, you'll use the dot product on your very first day in mechanics when computing work done by a force. If you go into data science or AI, the cosine similarity between vectors will become one of your most-used tools. Mastering the dot product now gives you a huge head start.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

If the dot product of two non-zero vectors is negative, what can you conclude about the angle between them? Explain your reasoning.
Show answer
Since a · b = |a||b| cos θ and both magnitudes are positive (the vectors are non-zero), the dot product is negative only when cos θ < 0. Cosine is negative for angles between 90° and 180°, so the angle between the vectors must be obtuse. In other words, the two vectors are pointing "more apart" than "together" — past the perpendicular threshold.

Question 2: BASIC CALCULATION

Let u = (3, −2, 5) and v = (1, 4, −2). Calculate u · v.
Show answer
Using the component formula: u · v = (3)(1) + (−2)(4) + (5)(−2) = 3 + (−8) + (−10) = −15. Since the result is negative, the angle between u and v is obtuse (greater than 90°). No further computation is needed for this question — just the straightforward component multiplication and addition.

Question 3: INTERMEDIATE

Find the angle between p = (1, 2, −2) and q = (3, −1, 1). Give your answer in degrees, correct to one decimal place.
Show answer
First, p · q = (1)(3) + (2)(−1) + (−2)(1) = 3 − 2 − 2 = −1. Next, |p| = √(1 + 4 + 4) = √9 = 3, and |q| = √(9 + 1 + 1) = √11. Then cos θ = −1 / (3√11) = −1/9.9499 ≈ −0.10050. Finally, θ = cos⁻¹(−0.10050) ≈ 95.8°. The negative dot product confirms the obtuse angle we obtained.

Question 4: APPLIED

A force F = (5, 3, −1) newtons acts on an object that moves along the displacement vector d = (2, 0, 4) metres. The work done is W = F · d. Calculate the work done. Then find the angle between the force and the displacement, to the nearest degree.
Show answer
Work = F · d = (5)(2) + (3)(0) + (−1)(4) = 10 + 0 − 4 = 6 joules. For the angle: |F| = √(25 + 9 + 1) = √35 ≈ 5.916, and |d| = √(4 + 0 + 16) = √20 ≈ 4.472. So cos θ = 6/(5.916 × 4.472) ≈ 6/26.458 ≈ 0.2268, giving θ = cos⁻¹(0.2268) ≈ 76.9° ≈ 77°. The positive work confirms that the force has a component in the direction of motion.

Question 5: CRITICAL THINKING

The vector a = (2, k, −1) is perpendicular to b = (1, 3, 5) and also perpendicular to c = (−2, 1, m). Find the values of k and m.
Show answer
Perpendicular to b means a · b = 0: (2)(1) + (k)(3) + (−1)(5) = 0 → 2 + 3k − 5 = 0 → 3k = 3 → k = 1. Now with a = (2, 1, −1), perpendicular to c means a · c = 0: (2)(−2) + (1)(1) + (−1)(m) = 0 → −4 + 1 − m = 0 → −3 − m = 0 → m = −3. This problem demonstrates how the perpendicularity condition a · b = 0 can be used as an equation to solve for unknown components. Each perpendicularity constraint provides one linear equation, so two constraints determine two unknowns.

SUMMARY

Lesson Summary

Summary

The scalar (dot) product of two vectors can be computed two ways: the component form a · b = a₁b₁ + a₂b₂ + a₃b₃, and the geometric form a · b = |a||b| cos θ. Equating them gives the angle formula: cos θ = (a · b)/(|a||b|). A dot product of zero means the vectors are perpendicular (provided neither is the zero vector). Vectors are parallel when one is a scalar multiple of the other, making the angle either 0° or 180°.

Key properties include commutativity (a · b = b · a), distributivity over addition, and the self-dot identity a · a = |a|². A positive dot product means an acute angle; a negative dot product means an obtuse angle. Beyond the IB, the dot product underpins work in physics, cosine similarity in data science, and generalised inner products in higher mathematics.

Varsity Tutors • IB Mathematics: Analysis and Approaches • Dot Product & Vector Angles