Skip to main content

Vectors and the dot product (SACE Stage 2 Specialist Mathematics)

Syllabus dot point

“Represent vectors in three dimensions, compute magnitudes and unit vectors, and use the dot product to find angles and test for perpendicularity.”

8 min read

Quick answer

A 3D vector a=a1i+a2j+a3k\mathbf{a} = a_1\mathbf{i} + a_2\mathbf{j} + a_3\mathbf{k} has magnitude ∣a∣=a12+a22+a32|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}. The dot product is a⋅b=a1b1+a2b2+a3b3=∣a∣∣b∣cos⁡θ\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3 = |\mathbf{a}||\mathbf{b}|\cos\theta, so cos⁡θ=a⋅b∣a∣∣b∣\cos\theta = \dfrac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|}. Two nonzero vectors are perpendicular exactly when their dot product is zero.

Jump to a section
  1. What this dot point is asking
  2. Vectors in three dimensions
  3. The dot product
  4. Finding the angle between vectors
  5. Perpendicularity and projection
  6. Properties of the dot product
  7. Exam-style questions

What this dot point is asking

You need to represent vectors in three dimensions, find magnitudes and unit vectors, and use the dot (scalar) product to compute angles and test for perpendicularity.

Vectors in three dimensions

Write a vector in component form using the standard basis i,j,k\mathbf{i}, \mathbf{j}, \mathbf{k}:

a=a1i+a2j+a3k=(a1a2a3).\mathbf{a} = a_1\mathbf{i} + a_2\mathbf{j} + a_3\mathbf{k} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix}.

Addition and scalar multiplication act componentwise. The magnitude (length) is
∣a∣=a12+a22+a32.|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}.

A unit vector in the direction of a\mathbf{a} is a^=1∣a∣a\hat{\mathbf{a}} = \dfrac{1}{|\mathbf{a}|}\mathbf{a}, which has length 11.

The dot product

The dot (scalar) product

For a=(a1,a2,a3)\mathbf{a} = (a_1, a_2, a_3) and b=(b1,b2,b3)\mathbf{b} = (b_1, b_2, b_3),

a⋅b=a1b1+a2b2+a3b3=∣a∣ ∣b∣cos⁡θ,\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3 = |\mathbf{a}|\,|\mathbf{b}|\cos\theta,

where θ\theta is the angle between the vectors (0≤θ≤π0 \le \theta \le \pi). The result is a scalar. Note a⋅a=∣a∣2\mathbf{a} \cdot \mathbf{a} = |\mathbf{a}|^2.

The two forms are the key tool: the component form computes a number, and equating it to ∣a∣∣b∣cos⁡θ|\mathbf{a}||\mathbf{b}|\cos\theta extracts the angle.

Finding the angle between vectors

Rearranging gives cos⁡θ=a⋅b∣a∣∣b∣\cos\theta = \dfrac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|}.

Angle between two 3D vectors

Find the angle between a=2i−j+2k\mathbf{a} = 2\mathbf{i} - \mathbf{j} + 2\mathbf{k} and b=i+2j+2k\mathbf{b} = \mathbf{i} + 2\mathbf{j} + 2\mathbf{k}

Step 1: Compute the dot product

Multiply corresponding components and add. This gives a single number that encodes how much the two vectors point in the same direction.

a⋅b=(2)(1)+(−1)(2)+(2)(2)=2−2+4=4.\mathbf{a}\cdot\mathbf{b} = (2)(1) + (-1)(2) + (2)(2) = 2 - 2 + 4 = 4.

Step 2: Compute both magnitudes

The magnitude of each vector is the square root of the sum of squared components. We need both magnitudes to normalise the dot product into a cosine.

∣a∣=22+(−1)2+22=9=3,∣b∣=12+22+22=9=3.|\mathbf{a}| = \sqrt{2^2 + (-1)^2 + 2^2} = \sqrt{9} = 3, \qquad |\mathbf{b}| = \sqrt{1^2 + 2^2 + 2^2} = \sqrt{9} = 3.

Step 3: Find the angle using cos⁡θ=a⋅b∣a∣∣b∣\cos\theta = \dfrac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|}

Substituting the dot product and both magnitudes into the angle formula gives a value for cos⁡θ\cos\theta, which we then invert.

cos⁡θ=43×3=49.\cos\theta = \frac{4}{3 \times 3} = \frac{4}{9}.

So θ=cos⁡−1 ⁣(49)≈63.6∘\theta = \cos^{-1}\!\left(\dfrac{4}{9}\right) \approx 63.6^{\circ} (about 1.111.11 radians).

Final answer: θ≈63.6∘\theta \approx 63.6^{\circ}

Perpendicularity and projection

Perpendicular test

Two nonzero vectors are perpendicular if and only if a⋅b=0\mathbf{a} \cdot \mathbf{b} = 0. This is because cos⁡90∘=0\cos 90^{\circ} = 0. It is the fastest way to check perpendicularity and to find an unknown component that makes two vectors orthogonal.

The scalar projection of a\mathbf{a} onto b\mathbf{b} is a⋅b∣b∣\dfrac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{b}|}, the signed length of the shadow of a\mathbf{a} along b\mathbf{b}. The vector projection is (a⋅b∣b∣2)b\left(\dfrac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{b}|^2}\right)\mathbf{b}. Projections appear when resolving one vector into components parallel and perpendicular to another, for instance splitting a force into a component along an incline and a component perpendicular to it.

Properties of the dot product

The dot product obeys familiar algebraic rules that make it easy to manipulate. It is commutative, a⋅b=b⋅a\mathbf{a}\cdot\mathbf{b} = \mathbf{b}\cdot\mathbf{a}, and distributive over addition, a⋅(b+c)=a⋅b+a⋅c\mathbf{a}\cdot(\mathbf{b}+\mathbf{c}) = \mathbf{a}\cdot\mathbf{b} + \mathbf{a}\cdot\mathbf{c}, so an expression like (p+r)⋅(r−p)(\mathbf{p}+\mathbf{r})\cdot(\mathbf{r}-\mathbf{p}) expands exactly like a binomial product. It also satisfies a⋅a=∣a∣2\mathbf{a}\cdot\mathbf{a} = |\mathbf{a}|^2, which is the bridge between the algebra of dot products and the geometry of lengths. These properties are what let you prove geometric results - such as the perpendicularity of a rhombus's diagonals - purely by expanding dot products, without coordinates.

Finding a value for perpendicularity

For what value of tt are u=3i+tj−k\mathbf{u} = 3\mathbf{i} + t\mathbf{j} - \mathbf{k} and v=2i+j+4k\mathbf{v} = 2\mathbf{i} + \mathbf{j} + 4\mathbf{k} perpendicular?

Step 1: Set up the perpendicularity condition

Two nonzero vectors are perpendicular if and only if their dot product equals zero. This follows directly from the formula u⋅v=∣u∣∣v∣cos⁡θ\mathbf{u}\cdot\mathbf{v} = |\mathbf{u}||\mathbf{v}|\cos\theta, since cos⁡90∘=0\cos 90^{\circ} = 0. So we require u⋅v=0\mathbf{u}\cdot\mathbf{v} = 0.

Step 2: Compute the dot product in terms of tt and solve

Multiplying corresponding components and setting the result equal to zero gives an equation in tt.

u⋅v=(3)(2)+(t)(1)+(−1)(4)=6+t−4=t+2.\mathbf{u}\cdot\mathbf{v} = (3)(2) + (t)(1) + (-1)(4) = 6 + t - 4 = t + 2.

Perpendicular means t+2=0t + 2 = 0, so t=−2t = -2.

Final answer: t=−2t = -2

Common errors
Treating the dot product as a vector
a⋅b\mathbf{a}\cdot\mathbf{b} is a scalar (a single number), not a vector.
Forgetting the square root in the magnitude
∣a∣=a12+a22+a32|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}; leaving off the root gives ∣a∣2|\mathbf{a}|^2.
Sign errors in components
A negative component, squared in the magnitude or multiplied in the dot product, must keep its sign through the arithmetic.
Using degrees and radians inconsistently
Decide on one unit for the angle and keep your calculator in that mode; mixing them is a frequent cause of wrong answers.

Exam-style questions

Questions in the style of SACE Board exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

SACE 2022-style3 marks
Calculator-assumed. The points are A(1,2,−3)A(1, 2, -3), B(5,3,−2)B(5, 3, -2) and C(6,7,−3)C(6, 7, -3). Find AB⃗⋅AC⃗\vec{AB} \cdot \vec{AC} and hence cos⁡(∠BAC)\cos(\angle BAC).
Show worked answer →

First the two vectors from AA: AB⃗=(4,1,1)\vec{AB} = (4, 1, 1) and AC⃗=(5,5,0)\vec{AC} = (5, 5, 0).

Dot product: AB⃗⋅AC⃗=(4)(5)+(1)(5)+(1)(0)=25\vec{AB} \cdot \vec{AC} = (4)(5) + (1)(5) + (1)(0) = 25. [1 mark]

Magnitudes: ∣AB⃗∣=42+12+12=18=32|\vec{AB}| = \sqrt{4^2 + 1^2 + 1^2} = \sqrt{18} = 3\sqrt{2} and ∣AC⃗∣=52+52=50=52|\vec{AC}| = \sqrt{5^2 + 5^2} = \sqrt{50} = 5\sqrt{2}. [1 mark]

So cos⁡(∠BAC)=2532×52=2530=56\cos(\angle BAC) = \dfrac{25}{3\sqrt{2}\times 5\sqrt{2}} = \dfrac{25}{30} = \dfrac{5}{6}. [1 mark]

SACE 2021-style2 marks
Calculator-free. The rhombus OPQROPQR has OP⃗=p\vec{OP} = \mathbf{p} and OR⃗=r\vec{OR} = \mathbf{r}. Show that OQ⃗⋅PR⃗=∣r∣2−∣p∣2\vec{OQ} \cdot \vec{PR} = |\mathbf{r}|^2 - |\mathbf{p}|^2, then prove the diagonals are perpendicular.
Show worked answer →

The diagonals are OQ⃗=p+r\vec{OQ} = \mathbf{p} + \mathbf{r} and PR⃗=r−p\vec{PR} = \mathbf{r} - \mathbf{p}.

Expand: OQ⃗⋅PR⃗=(p+r)⋅(r−p)=p⋅r−p⋅p+r⋅r−r⋅p\vec{OQ} \cdot \vec{PR} = (\mathbf{p} + \mathbf{r}) \cdot (\mathbf{r} - \mathbf{p}) = \mathbf{p}\cdot\mathbf{r} - \mathbf{p}\cdot\mathbf{p} + \mathbf{r}\cdot\mathbf{r} - \mathbf{r}\cdot\mathbf{p}. Since p⋅r=r⋅p\mathbf{p}\cdot\mathbf{r} = \mathbf{r}\cdot\mathbf{p}, the middle terms cancel, leaving ∣r∣2−∣p∣2|\mathbf{r}|^2 - |\mathbf{p}|^2. [1 mark]

In a rhombus all sides are equal, so ∣p∣=∣r∣|\mathbf{p}| = |\mathbf{r}|, giving OQ⃗⋅PR⃗=0\vec{OQ} \cdot \vec{PR} = 0. A zero dot product of two nonzero vectors means they are perpendicular, so the diagonals are perpendicular. [1 mark]

SACE 2023-style2 marks
Calculator-free. Find the value of tt for which u=3i+tj−k\mathbf{u} = 3\mathbf{i} + t\mathbf{j} - \mathbf{k} and v=2i+j+4k\mathbf{v} = 2\mathbf{i} + \mathbf{j} + 4\mathbf{k} are perpendicular.
Show worked answer →

Set the dot product to zero:

u⋅v=(3)(2)+(t)(1)+(−1)(4)=6+t−4=t+2.\mathbf{u}\cdot\mathbf{v} = (3)(2) + (t)(1) + (-1)(4) = 6 + t - 4 = t + 2.

Perpendicular means t+2=0t + 2 = 0, so t=−2t = -2.

Marks: one for the dot product expression, one for solving t=−2t = -2.

Practise this

Sources & how we know this

ExamExplained