Core Pure · Vectors · Year 1

Scalar Product

The scalar product turns two vectors into a single number — and that number tells you, precisely, the angle between them.

17 min read 4 worked examples

Definition and basic properties

Definition 35.1 — scalar (dot) product

For $\mathbf{a}=(a_1,a_2,a_3)$ and $\mathbf{b}=(b_1,b_2,b_3)$: $$\mathbf{a}\cdot\mathbf{b}=a_1b_1+a_2b_2+a_3b_3=|\mathbf{a}||\mathbf{b}|\cos\theta$$ where $\theta$ is the angle between the vectors when placed tail to tail. The result is always a scalar, not a vector.

Two vectors a and b drawn from the same starting point with the angle theta between them marked with an arc, illustrating the geometric meaning of the scalar product
Fig. 1 — the angle θ between vectors a and b, measured where the two vectors are placed tail to tail.
Key algebraic properties

$\mathbf{a}\cdot\mathbf{b}=\mathbf{b}\cdot\mathbf{a}$ (commutative); $\mathbf{a}\cdot(\mathbf{b}+\mathbf{c})=\mathbf{a}\cdot\mathbf{b}+\mathbf{a}\cdot\mathbf{c}$ (distributive); $\mathbf{a}\cdot\mathbf{a}=|\mathbf{a}|^2$; and two non-zero vectors are perpendicular exactly when $\mathbf{a}\cdot\mathbf{b}=0$.

Example 1 · Evaluating a scalar product directly
Given $\mathbf{a}=(3,-1,2)$ and $\mathbf{b}=(1,4,-2)$, find $\mathbf{a}\cdot\mathbf{b}$.

$\mathbf{a}\cdot\mathbf{b}=3(1)+(-1)(4)+2(-2)=3-4-4=-5$.

Why the geometric and algebraic definitions agree

Proof$a_1b_1+a_2b_2+a_3b_3=|\mathbf{a}||\mathbf{b}|\cos\theta$
1
Consider the triangle formed by $\mathbf{a}$, $\mathbf{b}$ and $\mathbf{b}-\mathbf{a}$, with the angle $\theta$ between $\mathbf{a}$ and $\mathbf{b}$ at their shared tail. By the cosine rule, $|\mathbf{b}-\mathbf{a}|^2=|\mathbf{a}|^2+|\mathbf{b}|^2-2|\mathbf{a}||\mathbf{b}|\cos\theta$.
The side $\mathbf{b}-\mathbf{a}$ joins the tips of $\mathbf{a}$ and $\mathbf{b}$, opposite the angle $\theta$.
2
Writing components, $|\mathbf{b}-\mathbf{a}|^2=(b_1-a_1)^2+(b_2-a_2)^2+(b_3-a_3)^2$, which expands to $|\mathbf{a}|^2+|\mathbf{b}|^2-2(a_1b_1+a_2b_2+a_3b_3)$.
Expanding each squared bracket and collecting the $|\mathbf{a}|^2=a_1^2+a_2^2+a_3^2$ and $|\mathbf{b}|^2=b_1^2+b_2^2+b_3^2$ terms separately from the cross terms.
3
Setting the two expressions for $|\mathbf{b}-\mathbf{a}|^2$ equal: $|\mathbf{a}|^2+|\mathbf{b}|^2-2(a_1b_1+a_2b_2+a_3b_3)=|\mathbf{a}|^2+|\mathbf{b}|^2-2|\mathbf{a}||\mathbf{b}|\cos\theta$.
Both sides computed the same quantity, $|\mathbf{b}-\mathbf{a}|^2$, two different ways.
4
Cancelling $|\mathbf{a}|^2+|\mathbf{b}|^2$ from both sides and dividing by $-2$: $a_1b_1+a_2b_2+a_3b_3=|\mathbf{a}||\mathbf{b}|\cos\theta$.
This confirms the algebraic formula (components) and the geometric formula (magnitudes and angle) always give the same value — they are two routes to the same number.
∎

Finding the angle between two vectors

Theorem 35.2 — angle between two vectors

$$\cos\theta=\frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|}$$

Example 2 · Finding the angle between two vectors
Find the angle between $\mathbf{a}=(2,1,-2)$ and $\mathbf{b}=(1,3,4)$, to 1 decimal place.

$\mathbf{a}\cdot\mathbf{b}=2(1)+1(3)+(-2)(4)=2+3-8=-3$.

$|\mathbf{a}|=\sqrt{4+1+4}=3$, $|\mathbf{b}|=\sqrt{1+9+16}=\sqrt{26}$.

$$\cos\theta=\frac{-3}{3\sqrt{26}}=-0.19612\ldots \Rightarrow \theta=101.3°$$
Example 3 · Finding an unknown for perpendicular vectors
Find $k$ such that $\mathbf{a}=(3,k,-1)$ and $\mathbf{b}=(2,-1,5)$ are perpendicular.

$\mathbf{a}\cdot\mathbf{b}=3(2)+k(-1)+(-1)(5)=6-k-5=1-k$.

Perpendicular $\Rightarrow 1-k=0 \Rightarrow k=1$.

Using the scalar product with position vectors

Example 4 · Angle at a vertex of a triangle
Points $A(1,0,2)$, $B(3,1,1)$, $C(2,-1,4)$ form a triangle. Find the angle $BAC$.

$\vec{AB}=B-A=(2,1,-1)$, $\vec{AC}=C-A=(1,-1,2)$.

$\vec{AB}\cdot\vec{AC}=2(1)+1(-1)+(-1)(2)=2-1-2=-1$.

$|\vec{AB}|=\sqrt{4+1+1}=\sqrt6$, $|\vec{AC}|=\sqrt{1+1+4}=\sqrt6$.

$\cos(\angle BAC)=\dfrac{-1}{6}=-0.1\overline{6} \Rightarrow \angle BAC=99.6°$ (3 s.f.)

Exam technique

When finding an angle at a vertex of a triangle (or between two edges meeting at a point), always form both direction vectors starting from that same vertex — using vectors in inconsistent directions (e.g. $\vec{AB}$ and $\vec{CA}$ instead of $\vec{AB}$ and $\vec{AC}$) gives the supplementary angle instead of the one required.

Exam-style questions

Question 1 5 marks

Find the angle between $\mathbf{a}=(1,-2,2)$ and $\mathbf{b}=(2,2,1)$, giving your answer to 1 decimal place.

$\mathbf{a}\cdot\mathbf{b}=1(2)+(-2)(2)+2(1)=2-4+2=0$ (M1, A1)

Since the scalar product is $0$, the vectors are perpendicular: $\theta=90°$. (A1, B1, B1)

Question 2 6 marks

Given $\mathbf{a}=(4,-1,3)$ and $\mathbf{b}=(1,2,-2)$, find $\mathbf{a}\cdot\mathbf{b}$, $|\mathbf{a}|$, $|\mathbf{b}|$, and the angle between $\mathbf{a}$ and $\mathbf{b}$ to 1 decimal place.

$\mathbf{a}\cdot\mathbf{b}=4(1)+(-1)(2)+3(-2)=4-2-6=-4$ (M1, A1)

$|\mathbf{a}|=\sqrt{16+1+9}=\sqrt{26}$, $|\mathbf{b}|=\sqrt{1+4+4}=3$ (A1)

$\cos\theta=\dfrac{-4}{3\sqrt{26}}=-0.2614\ldots \Rightarrow \theta=105.2°$ (M1, A1, A1)

Question 3 7 marks

Points $A(0,1,1)$, $B(2,0,3)$, $C(1,3,0)$ form a triangle. Find the angle $ABC$.

$\vec{BA}=A-B=(-2,1,-2)$, $\vec{BC}=C-B=(-1,3,-3)$ (M1, A1)

$\vec{BA}\cdot\vec{BC}=(-2)(-1)+1(3)+(-2)(-3)=2+3+6=11$ (M1, A1)

$|\vec{BA}|=\sqrt{4+1+4}=3$, $|\vec{BC}|=\sqrt{1+9+9}=\sqrt{19}$ (A1)

$\cos(\angle ABC)=\dfrac{11}{3\sqrt{19}}=0.8412\ldots \Rightarrow \angle ABC=32.7°$ (3 s.f.) (M1, A1)