01 / 20
\(\theta\)

Dot Product &
Vector Angles

Master the scalar (dot) product, find angles between vectors, and identify perpendicular and parallel vectors with confidence.

IB Mathematics: Analysis and Approaches

What Is a Vector?

A vector is a quantity with both magnitude (length) and direction. In 2D we write \(\mathbf{a} = \begin{pmatrix} a_1 \\ a_2 \end{pmatrix}\) and in 3D we write \(\mathbf{a} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix}\).

x y
\(\mathbf{a}\)
\(\mathbf{b}\)
\(\theta\)
O

Defining the Dot Product

The scalar (dot) product of two vectors produces a single number, not a vector. There are two equivalent definitions:

Algebraic Form
For \(\mathbf{a} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix}\) and \(\mathbf{b} = \begin{pmatrix} b_1 \\ b_2 \\ b_3 \end{pmatrix}\):

\(\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3\)
Geometric Form
Using magnitudes and the angle between them:

\(\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}|\,|\mathbf{b}|\cos\theta\)

where \(0 \le \theta \le \pi\).

Why Does the Dot Product Matter?

Find Angles
Determine the exact angle between any two vectors in 2D or 3D space.
Test Perpendicularity
Two vectors are perpendicular if and only if \(\mathbf{a} \cdot \mathbf{b} = 0\).
Projections
Project one vector onto another: the scalar projection is \(\frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{b}|}\).

The Angle Formula

Setting the two definitions equal and solving for \(\theta\):

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

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 multiple: \((k\mathbf{a})\cdot\mathbf{b} = k(\mathbf{a}\cdot\mathbf{b})\)
4
Self-dot: \(\mathbf{a}\cdot\mathbf{a} = |\mathbf{a}|^2\)
5
Zero vector: \(\mathbf{a}\cdot\mathbf{0} = 0\)

Perpendicular vs Parallel

Perpendicular (\(\theta = 90^\circ\))
\(\mathbf{a}\cdot\mathbf{b} = 0\)

The vectors meet at a right angle. \(\cos 90^\circ = 0\), so the dot product vanishes.
Parallel (\(\theta = 0^\circ\) or \(180^\circ\))
\(\mathbf{b} = k\mathbf{a}\) for some scalar \(k\)

Same direction (\(k > 0\)): \(\theta=0^\circ\).
Opposite (\(k < 0\)): \(\theta=180^\circ\).
Perpendicular
\(\mathbf{a} \cdot \mathbf{b} = 0\)
Parallel
\(\mathbf{b} = k\mathbf{a}\)

Sign of \(\mathbf{a}\cdot\mathbf{b}\) and the Angle

Positive
\(\mathbf{a}\cdot\mathbf{b} > 0\)
\(\theta < 90^\circ\)
Vectors point in a similar direction (acute angle).
Zero
\(\mathbf{a}\cdot\mathbf{b} = 0\)
\(\theta = 90^\circ\)
Vectors are perpendicular.
Negative
\(\mathbf{a}\cdot\mathbf{b} < 0\)
\(\theta > 90^\circ\)
Vectors point in opposite-ish directions (obtuse angle).

How to Find the Angle: Step by Step

1
Compute the dot product \(\mathbf{a}\cdot\mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3\).
2
Find each magnitude: \(|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}\) and likewise for \(|\mathbf{b}|\).
3
Divide: \(\cos\theta = \dfrac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}|\,|\mathbf{b}|}\).
4
Inverse cosine: \(\theta = \cos^{-1}(\text{result})\). Express in degrees or radians as required.

Example 1: 2D Angle

Find the angle between \(\mathbf{a}=\begin{pmatrix}3\\4\end{pmatrix}\) and \(\mathbf{b}=\begin{pmatrix}1\\-2\end{pmatrix}\).

1
Dot product: \(\mathbf{a}\cdot\mathbf{b} = (3)(1)+(4)(-2) = 3-8 = \)\(-5\)
2
Magnitudes: \(|\mathbf{a}|=\sqrt{9+16}=\)\(5\), \(|\mathbf{b}|=\sqrt{1+4}=\)\(\sqrt{5}\)
3
Divide: \(\cos\theta = \dfrac{-5}{5\sqrt{5}} = \dfrac{-1}{\sqrt{5}}\).
4
Angle: \(\theta = \cos^{-1}\!\left(\dfrac{-1}{\sqrt{5}}\right) \approx\)\(116.6^\circ\)

Example 2: 3D Angle

Find the angle between \(\mathbf{p}=\begin{pmatrix}2\\1\\-1\end{pmatrix}\) and \(\mathbf{q}=\begin{pmatrix}1\\-1\\3\end{pmatrix}\).

1
Dot product: \(\mathbf{p}\cdot\mathbf{q} = (2)(1)+(1)(-1)+(-1)(3) = 2-1-3 = \)\(-2\)
2
Magnitudes: \(|\mathbf{p}|=\sqrt{4+1+1}=\)\(\sqrt{6}\), \(|\mathbf{q}|=\sqrt{1+1+9}=\)\(\sqrt{11}\)
3
Divide: \(\cos\theta = \dfrac{-2}{\sqrt{6}\cdot\sqrt{11}} = \dfrac{-2}{\sqrt{66}}\).
4
Angle: \(\theta = \cos^{-1}\!\left(\dfrac{-2}{\sqrt{66}}\right) \approx\)\(104.3^\circ\)

Example 3: Testing Perpendicularity

Show that \(\mathbf{u}=\begin{pmatrix}4\\2\\-1\end{pmatrix}\) and \(\mathbf{v}=\begin{pmatrix}1\\-3\\-2\end{pmatrix}\) are perpendicular.

\(\mathbf{u}\)
\(\mathbf{v}\)

Example 4: Finding a Missing Component

If \(\mathbf{a}=\begin{pmatrix}2\\k\\1\end{pmatrix}\) and \(\mathbf{b}=\begin{pmatrix}3\\-1\\4\end{pmatrix}\) are perpendicular, find \(k\).

1
Set dot product to zero: \(\mathbf{a}\cdot\mathbf{b}=0\)
2
Expand: \((2)(3)+(k)(-1)+(1)(4) = 0\)
3
Simplify: \(6 - k + 4 = 0 \implies 10 - k = 0\)
4
Solve: \(k = \)\(10\)

Common Mistakes to Avoid

✕ Forgetting the Formula
Using \(\mathbf{a}\cdot\mathbf{b} = |\mathbf{a}|\,|\mathbf{b}|\) without the \(\cos\theta\) factor. Every geometric dot product needs \(\cos\theta\).
✕ Wrong Sign in Components
Miscalculating \((4)(-2)\) as \(+8\) instead of \(-8\). Track negatives carefully in each product.
✕ Calculator in Wrong Mode
Using radians when degrees are expected (or vice versa). Always check your calculator's angle mode before taking \(\cos^{-1}\).

Summary Table

Condition What It Means
\(\mathbf{a}\cdot\mathbf{b} > 0\) \(\cos\theta > 0\) Acute angle (\(0^\circ < \theta < 90^\circ\))
\(\mathbf{a}\cdot\mathbf{b} = 0\) \(\cos\theta = 0\) Right angle (\(\theta = 90^\circ\))
\(\mathbf{a}\cdot\mathbf{b} < 0\) \(\cos\theta < 0\) Obtuse angle (\(90^\circ < \theta < 180^\circ\))
\(\mathbf{b} = k\mathbf{a},\; k > 0\) \(\cos\theta = 1\) Parallel, same direction (\(\theta = 0^\circ\))
\(\mathbf{b} = k\mathbf{a},\; k < 0\) \(\cos\theta = -1\) Anti-parallel (\(\theta = 180^\circ\))

Question 1 of 5

What is the dot product of \(\mathbf{a}=\begin{pmatrix}2\\-3\\1\end{pmatrix}\) and \(\mathbf{b}=\begin{pmatrix}4\\1\\-5\end{pmatrix}\)?

Question 2 of 5

If \(\mathbf{a}\cdot\mathbf{b} = -12\), \(|\mathbf{a}| = 4\), and \(|\mathbf{b}| = 6\), what is \(\theta\)?

Question 3 of 5

For which value of \(t\) are \(\mathbf{u}=\begin{pmatrix}1\\t\\3\end{pmatrix}\) and \(\mathbf{v}=\begin{pmatrix}2\\-4\\t\end{pmatrix}\) perpendicular?

Question 4 of 5

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

Question 5 of 5

What is \(\mathbf{a}\cdot\mathbf{a}\) if \(|\mathbf{a}| = 7\)?