Skip to main content

Vectors in three dimensions, dot and cross products (QCE Specialist Mathematics Unit 3)

Syllabus dot point

“Use vectors in three dimensions, compute scalar (dot) and vector (cross) products, find angles between vectors, scalar and vector projections, and apply these to geometric problems and the equations of lines and planes”

8 min read

Quick answer

In three dimensions, ∣a∣=a12+a22+a32|\mathbf{a}| = \sqrt{a_1^2+a_2^2+a_3^2}. The dot product a⋅b=a1b1+a2b2+a3b3=∣a∣∣b∣cos⁡θ\mathbf{a}\cdot\mathbf{b} = a_1b_1+a_2b_2+a_3b_3 = |\mathbf{a}||\mathbf{b}|\cos\theta gives angles and tests perpendicularity. The vector projection of a\mathbf{a} onto b\mathbf{b} is a⋅b∣b∣2b\frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{b}|^2}\mathbf{b}. The cross product a×b\mathbf{a}\times\mathbf{b} is perpendicular to both, with magnitude ∣a∣∣b∣sin⁡θ|\mathbf{a}||\mathbf{b}|\sin\theta equal to the parallelogram area. A line is r=a+td\mathbf{r} = \mathbf{a} + t\mathbf{d}.

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Exam-style questions

What this dot point is asking

QCAA wants you to work with vectors in three dimensions: write them in component form, find magnitudes and unit vectors, compute dot and cross products, find angles and projections, and use vectors to describe lines and to solve geometric problems. This is heavily assessed in IA2 and the external assessment, where setting up the right product for the question is the key decision.

The answer

Component form and magnitude

A vector in three dimensions is written a=a1i+a2j+a3k\mathbf{a} = a_1\mathbf{i} + a_2\mathbf{j} + a_3\mathbf{k} or as a column. Its magnitude 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^=a∣a∣\hat{\mathbf{a}} = \dfrac{\mathbf{a}}{|\mathbf{a}|}. The vector from point AA to point BB is AB⃗=b−a\vec{AB} = \mathbf{b} - \mathbf{a}, the position vector of BB minus that of AA.

The dot (scalar) product

The dot product produces a scalar:

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. Rearranging gives the angle:

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

If a⋅b=0\mathbf{a}\cdot\mathbf{b} = 0 and neither vector is zero, the vectors are perpendicular. The dot product is the tool for angles and perpendicularity.

Scalar and vector projections

The scalar projection of a\mathbf{a} onto b\mathbf{b} is the signed length of the shadow of a\mathbf{a} along b\mathbf{b}:

scalar proj=a⋅b∣b∣.\text{scalar proj} = \frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{b}|}.

The vector projection multiplies this by the unit vector b^\hat{\mathbf{b}}:

vector proj=(a⋅b∣b∣2)b.\text{vector proj} = \left(\frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{b}|^2}\right)\mathbf{b}.

The scalar projection is negative when the angle is obtuse, which the sign of a⋅b\mathbf{a}\cdot\mathbf{b} captures automatically.

The cross (vector) product

The cross product produces a vector perpendicular to both inputs:

a×b=∣ijka1a2a3b1b2b3∣.\mathbf{a} \times \mathbf{b} = \begin{vmatrix}\mathbf{i} & \mathbf{j} & \mathbf{k}\\ a_1 & a_2 & a_3\\ b_1 & b_2 & b_3\end{vmatrix}.

Its magnitude is ∣a×b∣=∣a∣∣b∣sin⁡θ|\mathbf{a}\times\mathbf{b}| = |\mathbf{a}||\mathbf{b}|\sin\theta, which equals the area of the parallelogram spanned by a\mathbf{a} and b\mathbf{b}. The direction follows the right-hand rule. The cross product is the tool for finding a normal vector and for areas.

Equations of lines

A line through point AA with position vector a\mathbf{a} and direction d\mathbf{d} has vector equation

r=a+td,t∈R.\mathbf{r} = \mathbf{a} + t\mathbf{d}, \quad t \in \mathbb{R}.

Splitting into components gives the parametric equations x=a1+td1x = a_1 + t d_1, y=a2+td2y = a_2 + t d_2, z=a3+td3z = a_3 + t d_3. Two lines are parallel when their direction vectors are scalar multiples, and they intersect when a single pair (t,s)(t, s) satisfies all three component equations.

Properties of the dot product

The dot product is commutative, a⋅b=b⋅a\mathbf{a} \cdot \mathbf{b} = \mathbf{b} \cdot \mathbf{a}, and distributes 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}. A vector dotted with itself returns the square of its length, a⋅a=∣a∣2\mathbf{a} \cdot \mathbf{a} = |\mathbf{a}|^2, which is the algebraic identity behind every magnitude calculation. The base vectors satisfy i⋅i=j⋅j=k⋅k=1\mathbf{i} \cdot \mathbf{i} = \mathbf{j} \cdot \mathbf{j} = \mathbf{k} \cdot \mathbf{k} = 1 and i⋅j=j⋅k=k⋅i=0\mathbf{i} \cdot \mathbf{j} = \mathbf{j} \cdot \mathbf{k} = \mathbf{k} \cdot \mathbf{i} = 0, because they are mutually perpendicular unit vectors. These identities let you expand a product such as (a+2b)⋅(a−b)=∣a∣2+a⋅b−2∣b∣2(\mathbf{a} + 2\mathbf{b}) \cdot (\mathbf{a} - \mathbf{b}) = |\mathbf{a}|^2 + \mathbf{a} \cdot \mathbf{b} - 2|\mathbf{b}|^2 without resorting to components, a move QCAA rewards in proof-style items.

Properties of the cross product

The cross product is anti-commutative, a×b=−(b×a)\mathbf{a} \times \mathbf{b} = -(\mathbf{b} \times \mathbf{a}), so the order matters and reversing it flips the direction of the normal. A vector crossed with itself or with a parallel vector gives the zero vector, a×a=0\mathbf{a} \times \mathbf{a} = \mathbf{0}, which is the algebraic test for parallel vectors. For the base vectors the cyclic rule holds: i×j=k\mathbf{i} \times \mathbf{j} = \mathbf{k}, j×k=i\mathbf{j} \times \mathbf{k} = \mathbf{i}, k×i=j\mathbf{k} \times \mathbf{i} = \mathbf{j}, with a sign change if you reverse any pair. Because ∣a×b∣=∣a∣∣b∣sin⁡θ|\mathbf{a} \times \mathbf{b}| = |\mathbf{a}||\mathbf{b}|\sin\theta equals the parallelogram area, half of it is the area of the triangle spanned by the two vectors, which is the standard route to a triangle area from three position vectors.

Choosing the right product

The single most important decision in a vectors question is which product to use. Reach for the dot product whenever the question mentions an angle, perpendicularity, work done, or a projection, because the dot product converts directly into cos⁡θ\cos\theta. Reach for the cross product whenever the question mentions a normal direction, an area, or a vector perpendicular to two others, because the cross product converts into sin⁡θ\sin\theta and produces a vector. Stating which product you will use and why is itself worth communication credit in extended-response items.

Worked example

Given a=2i−j+2k\mathbf{a} = 2\mathbf{i} - \mathbf{j} + 2\mathbf{k} and b=i+3j−k\mathbf{b} = \mathbf{i} + 3\mathbf{j} - \mathbf{k}, find the angle between them and a vector perpendicular to both.

The angle requires the dot product and both magnitudes; the perpendicular vector requires the cross product.

Step 1: Compute the dot product

Multiply corresponding components and sum. This gives the numerator of the cosine formula:

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

The negative value tells us the angle will be obtuse before we even compute it.

Step 2: Find the magnitudes

The magnitude of each vector is the square root of the sum of squares of its components:

∣a∣=4+1+4=9=3,∣b∣=1+9+1=11.|\mathbf{a}| = \sqrt{4+1+4} = \sqrt{9} = 3, \qquad |\mathbf{b}| = \sqrt{1+9+1} = \sqrt{11}.

Step 3: Find the angle between the vectors

Substitute into the angle formula cos⁡θ=a⋅b∣a∣∣b∣\cos\theta = \dfrac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|}:

cos⁡θ=−3311=−111≈−0.3015,\cos\theta = \frac{-3}{3\sqrt{11}} = \frac{-1}{\sqrt{11}} \approx -0.3015,

so θ≈107.5∘\theta \approx 107.5^\circ. The negative dot product correctly signals an obtuse angle.

Step 4: Find a perpendicular vector using the cross product

The cross product a×b\mathbf{a}\times\mathbf{b} is evaluated via the 3×33\times 3 determinant with the standard basis vectors in the top row:

a×b=∣ijk2−1213−1∣.\mathbf{a}\times\mathbf{b} = \begin{vmatrix}\mathbf{i} & \mathbf{j} & \mathbf{k}\\ 2 & -1 & 2\\ 1 & 3 & -1\end{vmatrix}.

Expand along the top row, remembering the middle component carries a leading minus:

i\mathbf{i} component: (−1)(−1)−(2)(3)=1−6=−5.(-1)(-1) - (2)(3) = 1 - 6 = -5.

j\mathbf{j} component: −[(2)(−1)−(2)(1)]=−[−2−2]=4.-\big[(2)(-1) - (2)(1)\big] = -[-2 - 2] = 4.

k\mathbf{k} component: (2)(3)−(−1)(1)=6+1=7.(2)(3) - (-1)(1) = 6 + 1 = 7.

So a×b=−5i+4j+7k\mathbf{a}\times\mathbf{b} = -5\mathbf{i} + 4\mathbf{j} + 7\mathbf{k}.

Step 5: Verify perpendicularity

A cross product must be perpendicular to both original vectors. Checking against a\mathbf{a}:

(a×b)⋅a=(−5)(2)+(4)(−1)+(7)(2)=−10−4+14=0.(\mathbf{a}\times\mathbf{b})\cdot\mathbf{a} = (-5)(2) + (4)(-1) + (7)(2) = -10 - 4 + 14 = 0.

The dot product is zero, confirming perpendicularity.

Final answer: The angle between a\mathbf{a} and b\mathbf{b} is approximately 107.5∘107.5^\circ, and a vector perpendicular to both is −5i+4j+7k-5\mathbf{i} + 4\mathbf{j} + 7\mathbf{k}.

Common trap

A common error is dropping the middle sign when expanding the cross product determinant: the j\mathbf{j} component carries a leading minus. Another is reporting a scalar projection as a vector or vice versa; read the question carefully, since the scalar projection is a number a⋅b∣b∣\frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{b}|} while the vector projection is a vector. Finally, do not confuse the dot product (a scalar, for angles) with the cross product (a vector, for normals and areas).

Exam-style questions

Questions in the style of QCAA 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.

Practice4 marks
Paper 1 (technique). The points have position vectors a=3i+j−2k\mathbf{a} = 3\mathbf{i} + \mathbf{j} - 2\mathbf{k} and b=−i+2j+4k\mathbf{b} = -\mathbf{i} + 2\mathbf{j} + 4\mathbf{k}. (a) Determine a⋅b\mathbf{a} \cdot \mathbf{b}. (b) Determine the angle between a\mathbf{a} and b\mathbf{b}, correct to the nearest degree.
Show worked answer →

(a) Component dot product: a⋅b=(3)(−1)+(1)(2)+(−2)(4)=−3+2−8=−9.\mathbf{a} \cdot \mathbf{b} = (3)(-1) + (1)(2) + (-2)(4) = -3 + 2 - 8 = -9.

(b) Magnitudes: ∣a∣=9+1+4=14|\mathbf{a}| = \sqrt{9 + 1 + 4} = \sqrt{14} and ∣b∣=1+4+16=21|\mathbf{b}| = \sqrt{1 + 4 + 16} = \sqrt{21}. Then cos⁡θ=−914 21=−9294≈−0.5249\cos\theta = \dfrac{-9}{\sqrt{14}\,\sqrt{21}} = \dfrac{-9}{\sqrt{294}} \approx -0.5249, so θ≈122∘\theta \approx 122^\circ.

Markers reward the correct component dot product, both magnitudes, and an angle that respects the obtuse sign of a negative dot product.

Practice7 marks
Paper 2 (complex familiar). A triangle has vertices A(1,0,2)A(1, 0, 2), B(3,2,1)B(3, 2, 1) and C(2,−1,4)C(2, -1, 4). (a) Determine AB⃗\vec{AB} and AC⃗\vec{AC}. (b) Use the cross product to determine the exact area of triangle ABCABC. (c) Determine a unit vector perpendicular to the plane of the triangle.
Show worked answer →

(a) AB⃗=b−a=(2,2,−1)\vec{AB} = \mathbf{b} - \mathbf{a} = (2, 2, -1) and AC⃗=c−a=(1,−1,2).\vec{AC} = \mathbf{c} - \mathbf{a} = (1, -1, 2).

(b) Cross product AB⃗×AC⃗\vec{AB} \times \vec{AC}: i\mathbf{i} component (2)(2)−(−1)(−1)=4−1=3(2)(2) - (-1)(-1) = 4 - 1 = 3; j\mathbf{j} component −[(2)(2)−(−1)(1)]=−[4+1]=−5-[(2)(2) - (-1)(1)] = -[4 + 1] = -5; k\mathbf{k} component (2)(−1)−(2)(1)=−2−2=−4(2)(-1) - (2)(1) = -2 - 2 = -4. So AB⃗×AC⃗=(3,−5,−4)\vec{AB} \times \vec{AC} = (3, -5, -4) with magnitude 9+25+16=50=52\sqrt{9 + 25 + 16} = \sqrt{50} = 5\sqrt{2}. The triangle area is half the parallelogram area: 12(52)=522\tfrac{1}{2}(5\sqrt{2}) = \dfrac{5\sqrt{2}}{2} square units.

(c) A unit normal is 152(3,−5,−4)\dfrac{1}{5\sqrt{2}}(3, -5, -4).

Markers reward the displacement vectors, the cross product with the correct middle sign, halving for the triangle, and normalising for the unit vector.

Practise this

Sources & how we know this

ExamExplained