Dot Product &
Vector Angles
Master the scalar (dot) product, find angles between vectors, and identify perpendicular and parallel vectors with confidence.
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}\).
Defining the Dot Product
The scalar (dot) product of two vectors produces a single number, not a vector. There are two equivalent definitions:
\(\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3\)
\(\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}|\,|\mathbf{b}|\cos\theta\)
where \(0 \le \theta \le \pi\).
Why Does the Dot Product Matter?
The Angle Formula
Setting the two definitions equal and solving for \(\theta\):
Properties of the Dot Product
Perpendicular vs Parallel
The vectors meet at a right angle. \(\cos 90^\circ = 0\), so the dot product vanishes.
Same direction (\(k > 0\)): \(\theta=0^\circ\).
Opposite (\(k < 0\)): \(\theta=180^\circ\).
Sign of \(\mathbf{a}\cdot\mathbf{b}\) and the Angle
\(\theta < 90^\circ\)
Vectors point in a similar direction (acute angle).
\(\theta = 90^\circ\)
Vectors are perpendicular.
\(\theta > 90^\circ\)
Vectors point in opposite-ish directions (obtuse angle).
How to Find the Angle: Step by Step
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}\).
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}\).
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.
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\).
Common Mistakes to Avoid
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\)?