01 / 20

The Dot Product

Understand how the dot product connects angles, projections, and work in multivariable calculus.

Calculus 3

What Is the Dot Product?

The dot product (also called the scalar product) takes two vectors and returns a single number: not a vector, but a scalar. It measures how much two vectors "agree" in direction.

Multiply corresponding components and add the results. The output is a real number: positive, negative, or zero.

The Geometric Formula

The dot product has an equivalent geometric definition that reveals its connection to the angle between vectors:

\(\mathbf{a}\)
\(\mathbf{b}\)
\(\theta\)
\(\|\mathbf{a}\|\)
\(\|\mathbf{b}\|\)

What the Sign Tells You

Since \(\mathbf{a} \cdot \mathbf{b} = \|\mathbf{a}\|\|\mathbf{b}\|\cos\theta\), the sign of the dot product depends entirely on \(\cos\theta\):

Positive
\(\theta < 90^\circ\): vectors point in roughly the same direction
Zero
\(\theta = 90^\circ\): vectors are perpendicular (orthogonal)
Negative
\(\theta > 90^\circ\): vectors point in roughly opposite directions

Finding the Angle Between Vectors

Rearranging the geometric formula gives us a direct way to find the angle:

This works in any dimension: \(\mathbb{R}^2\), \(\mathbb{R}^3\), or higher. The result always satisfies \(0 \leq \theta \leq \pi\).

Scalar Projection

The scalar projection of \(\mathbf{b}\) onto \(\mathbf{a}\) answers: "How far does \(\mathbf{b}\) extend in the direction of \(\mathbf{a}\)?"

\(\mathbf{a}\)
\(\mathbf{b}\)
\(\text{comp}_{\mathbf{a}}\,\mathbf{b}\)
\(\theta\)

Vector Projection

The vector projection of \(\mathbf{b}\) onto \(\mathbf{a}\) is the actual vector lying along \(\mathbf{a}\) that represents the shadow of \(\mathbf{b}\):

Scalar Projection
A number (signed length): divide by \(\|\mathbf{a}\|\)
Vector Projection
A vector along \(\mathbf{a}\): divide by \(\|\mathbf{a}\|^2\), then scale \(\mathbf{a}\)

Work as a Dot Product

In physics, work done by a constant force \(\mathbf{F}\) over a displacement \(\mathbf{d}\) is exactly the dot product:

\(\mathbf{d}\)
\(\mathbf{F}\)
\(\theta\)

Only the component of force along the displacement does work. The dot product captures exactly that.

Dot Product vs. Cross Product

Dot Product Cross Product
Notation \(\mathbf{a} \cdot \mathbf{b}\) \(\mathbf{a} \times \mathbf{b}\)
Result Scalar (number) Vector
Formula \(\|\mathbf{a}\|\|\mathbf{b}\|\cos\theta\) \(\|\mathbf{a}\|\|\mathbf{b}\|\sin\theta\;\hat{n}\)
Measures Alignment / parallelism Perpendicularity / area
Zero when Perpendicular (\(\theta = 90^\circ\)) Parallel (\(\theta = 0^\circ\) or \(180^\circ\))
Dimensions \(\mathbb{R}^n\) (any) \(\mathbb{R}^3\) only

How to Compute Step by Step

1
Identify the vectors. Write \(\mathbf{a}\) and \(\mathbf{b}\) in component form.
2
Multiply corresponding components. Compute \(a_1 b_1\), \(a_2 b_2\), \(a_3 b_3\).
3
Sum the products. \(\mathbf{a}\cdot\mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3\).
4
Interpret the result. Positive: same direction. Zero: perpendicular. Negative: opposing.
5
Find the angle (if needed). Use \(\theta = \cos^{-1}\!\left(\frac{\mathbf{a}\cdot\mathbf{b}}{\|\mathbf{a}\|\,\|\mathbf{b}\|}\right)\).

Example 1: Basic Computation

Find \(\mathbf{a} \cdot \mathbf{b}\) where \(\mathbf{a} = \langle 3, -1, 4 \rangle\) and \(\mathbf{b} = \langle 2, 5, -2 \rangle\).

1
Multiply components: \((3)(2) = 6\), \((-1)(5) = -5\), \((4)(-2) = -8\)
2
Sum: \(6 + (-5) + (-8) = -7\)
3
Interpret: The result is negative, so the angle between \(\mathbf{a}\) and \(\mathbf{b}\) is obtuse (\(\theta > 90^\circ\)).

Example 2: Finding the Angle

Find the angle between \(\mathbf{u} = \langle 1, 2, 2 \rangle\) and \(\mathbf{v} = \langle 3, -1, 1 \rangle\).

1
Dot product: \((1)(3) + (2)(-1) + (2)(1) = 3 - 2 + 2 = 3\)
2
Magnitudes: \(\|\mathbf{u}\| = \sqrt{1^2+2^2+2^2} = \sqrt{9} = 3\), \(\|\mathbf{v}\| = \sqrt{3^2+(-1)^2+1^2} = \sqrt{11}\)
3
Apply formula: \(\cos\theta = \dfrac{3}{3\sqrt{11}} = \dfrac{1}{\sqrt{11}}\)
4
Solve: \(\theta = \cos^{-1}\!\left(\frac{1}{\sqrt{11}}\right) \approx 72.5^\circ\)

Example 3: Projection and Work

A force \(\mathbf{F} = \langle 4, 3 \rangle\) moves an object along \(\mathbf{d} = \langle 6, 0 \rangle\). Find the work done and the projection of \(\mathbf{F}\) onto \(\mathbf{d}\).

1
Work: \(W = \mathbf{F}\cdot\mathbf{d} = (4)(6)+(3)(0) = \) 24 (units of energy)
2
Scalar projection: First, \(\|\mathbf{d}\| = \sqrt{6^2+0^2}=6\). Then \(\text{comp}_{\mathbf{d}}\,\mathbf{F} = \frac{\mathbf{F}\cdot\mathbf{d}}{\|\mathbf{d}\|} = \frac{24}{6} = \) 4
3
Vector projection: Using \(\|\mathbf{d}\|^2=36\), \(\text{proj}_{\mathbf{d}}\,\mathbf{F} = \frac{\mathbf{F}\cdot\mathbf{d}}{\|\mathbf{d}\|^2}\mathbf{d} = \frac{24}{36}\langle 6,0\rangle = \) \(\langle 4, 0 \rangle\)

Properties of the Dot Product

1
Commutative: \(\mathbf{a}\cdot\mathbf{b} = \mathbf{b}\cdot\mathbf{a}\)
2
Distributive: \(\mathbf{a}\cdot(\mathbf{b}+\mathbf{c}) = \mathbf{a}\cdot\mathbf{b} + \mathbf{a}\cdot\mathbf{c}\)
3
Scalar multiplication: \((c\,\mathbf{a})\cdot\mathbf{b} = c(\mathbf{a}\cdot\mathbf{b})\)
4
Self-dot: \(\mathbf{a}\cdot\mathbf{a} = \|\mathbf{a}\|^2\) (always non-negative)
5
Zero vector: \(\mathbf{0}\cdot\mathbf{a} = 0\) for all \(\mathbf{a}\)

Common Mistakes to Avoid

✕ Expecting a Vector
The dot product returns a scalar, not a vector. If your answer has angle brackets, something went wrong.
✕ Wrong Projection Formula
Scalar projection divides by \(\|\mathbf{a}\|\). Vector projection divides by \(\|\mathbf{a}\|^2\). Mixing these up changes the answer completely.
✕ Forgetting \(\cos^{-1}\) Domain
The angle \(\theta\) must satisfy \(0 \leq \theta \leq \pi\). Negative dot product means obtuse: do not flip the sign.

Question 1 of 5

What is \(\langle 2, -3, 1 \rangle \cdot \langle 4, 1, -5 \rangle\)?

Question 2 of 5

If \(\mathbf{a}\cdot\mathbf{b} < 0\), what can you conclude about the angle \(\theta\) between them?

Question 3 of 5

What is \(\text{proj}_{\mathbf{a}}\,\mathbf{b}\) when \(\mathbf{a} = \langle 1, 0 \rangle\) and \(\mathbf{b} = \langle 3, 4 \rangle\)?

Question 4 of 5

A force \(\mathbf{F} = \langle 5, 12 \rangle\) acts over a displacement \(\mathbf{d} = \langle 4, 0 \rangle\). How much work is done?

Question 5 of 5

Find the angle between \(\mathbf{u} = \langle 1, 1 \rangle\) and \(\mathbf{v} = \langle -1, 1 \rangle\).