Skip to main content

Vectors in three dimensions: Position and displacement vectors, i, j, k components, magnitude and unit vectors, parallel and perpendicular vectors, the scalar product and angle between vectors, and projections in space (new to Extension 1 in the 2024 syllabus)

Syllabus dot point

“Represent vectors in three dimensions in component form using i\mathbf{i}, j\mathbf{j} and k\mathbf{k}, and use magnitude, unit vectors, the scalar product, angles and projections in space”

12 min read

Quick answer

Three-dimensional vectors work exactly like plane vectors with a third component: a=a1i+a2j+a3k\mathbf{a} = a_1\mathbf{i} + a_2\mathbf{j} + a_3\mathbf{k}, ∣a∣=a12+a22+a32|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}, 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, perpendicular when the scalar product is zero, parallel when one is a multiple of the other, and projection a⋅b∣b∣2b\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2}\mathbf{b}. New to Extension 1 in the 2024 syllabus.

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

What this dot point is asking

This is new to Extension 1 in the Mathematics Extension 1 11-12 Syllabus (2024), first examined in the 2027 HSC. In the 2017 course Extension 1 vectors lived in the plane only, and three-dimensional vectors were an Extension 2 topic. The new Year 12 focus area Introduction to vectors treats two and three dimensions side by side. NESA's content asks you to use position vectors in two and three dimensions, to write vectors in component form (with i\mathbf{i}, j\mathbf{j} and, in three dimensions, k\mathbf{k}), to find magnitudes and unit vectors, to test for parallel and perpendicular vectors, to use the scalar product and the angle between vectors, and to find vector projections and perpendicular components.

The good news is that almost every formula you know from the plane gets one extra term.

Note

Think of a room. The corner where two walls meet the floor is the origin. Every point in the room is described by three numbers: how far along one wall, how far along the other wall and how high up. A vector is an arrow between two such points, and its three components say how far it goes in each of the three directions. The length of the arrow is Pythagoras applied twice: once across the floor, then once up to the ceiling.

The answer

Key fact

For a=a1i+a2j+a3k\mathbf{a} = a_1\mathbf{i} + a_2\mathbf{j} + a_3\mathbf{k} and b=b1i+b2j+b3k\mathbf{b} = b_1\mathbf{i} + b_2\mathbf{j} + b_3\mathbf{k}:

  • Displacement: AB→=b−a\overrightarrow{AB} = \mathbf{b} - \mathbf{a} when AA and BB have position vectors a\mathbf{a} and b\mathbf{b}.
  • Magnitude: ∣a∣=a12+a22+a32|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}.
  • Unit vector: a^=1∣a∣a\hat{\mathbf{a}} = \dfrac{1}{|\mathbf{a}|}\mathbf{a}.
  • Scalar 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, with 0∘≤θ≤180∘0^\circ \leq \theta \leq 180^\circ.
  • Perpendicular: a⋅b=0\mathbf{a} \cdot \mathbf{b} = 0. Parallel: a=λb\mathbf{a} = \lambda\mathbf{b} for some scalar λ≠0\lambda \neq 0.
  • Projection of a\mathbf{a} onto b\mathbf{b}: a⋅b∣b∣2 b\dfrac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2}\,\mathbf{b}, and the perpendicular component is a\mathbf{a} minus that.

Coordinates and position vectors in space

A point P(x,y,z)P(x, y, z) has position vector OP→=xi+yj+zk\overrightarrow{OP} = x\mathbf{i} + y\mathbf{j} + z\mathbf{k}. The three coordinate planes are the xyxy-plane (where z=0z = 0), the yzyz-plane (where x=0x = 0) and the xzxz-plane (where y=0y = 0). The distance between A(x1,y1,z1)A(x_1, y_1, z_1) and B(x2,y2,z2)B(x_2, y_2, z_2) is the magnitude of AB→\overrightarrow{AB}:

AB=(x2−x1)2+(y2−y1)2+(z2−z1)2.AB = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}.

Column notation (xyz)\begin{pmatrix} x \\ y \\ z \end{pmatrix}, ordered triples (x,y,z)(x, y, z) and xi+yj+zkx\mathbf{i} + y\mathbf{j} + z\mathbf{k} all mean the same vector, and you may use whichever the question uses.

Magnitude and unit vectors

The magnitude is the space diagonal of the box whose edges are the components. A unit vector has magnitude 11 and records direction only. To make one, divide the vector by its own length. The standard unit vectors i\mathbf{i}, j\mathbf{j} and k\mathbf{k} point along the three axes and are mutually perpendicular.

Parallel and perpendicular vectors

Two non-zero vectors are parallel when one is a scalar multiple of the other, which also means the ratios of matching components are equal. They are perpendicular when the scalar product is zero. A third, more general fact is that ∣a⋅b∣=∣a∣∣b∣|\mathbf{a} \cdot \mathbf{b}| = |\mathbf{a}||\mathbf{b}| exactly when the vectors are parallel, because cos⁡θ=±1\cos\theta = \pm 1.

The scalar product and the angle

The two forms of the scalar product agree, so rearranging the geometric form gives

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

Use this to find the angle at a vertex of a triangle (always form both vectors from that vertex), to test for a right angle, or to find the angle between a line direction and an axis. A negative scalar product means the angle is obtuse.

Projections

The vector projection of a\mathbf{a} onto b\mathbf{b} is the shadow of a\mathbf{a} cast along the line of b\mathbf{b}. The part of a\mathbf{a} left over, a−projba\mathbf{a} - \text{proj}_{\mathbf{b}}\mathbf{a}, is perpendicular to b\mathbf{b}. This splits any vector into a piece along b\mathbf{b} and a piece across it, exactly as in two dimensions.

How exam questions use these ideas

  • "Find the vector AB→\overrightarrow{AB} and its length." Subtract end minus start.
  • "Show that the triangle has a right angle at BB." Show a scalar product from BB is zero.
  • "Find the angle between ..." Scalar product, two magnitudes, inverse cosine.
  • "Find kk so that the vectors are perpendicular (or parallel)." Scalar product equals zero, or equate ratios of components.
  • "Find the projection / perpendicular component." Use ∣b∣2|\mathbf{b}|^2 in the denominator and check with a scalar product.
Worked examples

A unit vector of given length

Find a vector of length 1010 in the direction of a=2i−j+2k\mathbf{a} = 2\mathbf{i} - \mathbf{j} + 2\mathbf{k}.

Step 1: find the unit vector

∣a∣=4+1+4=3|\mathbf{a}| = \sqrt{4 + 1 + 4} = 3, so a^=13(2i−j+2k)\hat{\mathbf{a}} = \frac{1}{3}(2\mathbf{i} - \mathbf{j} + 2\mathbf{k}).

Step 2: scale to length 10

10a^=103(2i−j+2k)=203i−103j+203k10\hat{\mathbf{a}} = \frac{10}{3}(2\mathbf{i} - \mathbf{j} + 2\mathbf{k}) = \frac{20}{3}\mathbf{i} - \frac{10}{3}\mathbf{j} + \frac{20}{3}\mathbf{k}.

Marker's note: a mark for the unit vector, a mark for the scaling. Check: the length of the answer is 103×3=10\frac{10}{3} \times 3 = 10.

Angle between a vector and an axis

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

Step 1: use k\mathbf{k} as the direction of the axis

a⋅k=2\mathbf{a} \cdot \mathbf{k} = 2 and ∣a∣∣k∣=3×1=3|\mathbf{a}||\mathbf{k}| = 3 \times 1 = 3.

Step 2: invert the cosine

cos⁡θ=23\cos\theta = \frac{2}{3}, so θ=cos⁡−1(23)≈48.2∘\theta = \cos^{-1}\left( \frac{2}{3} \right) \approx 48.2^\circ.

Marker's note: the same method gives the angle with the xx-axis (48.2∘48.2^\circ) and the yy-axis (cos⁡−1(−13)≈109.5∘\cos^{-1}\left( -\frac{1}{3} \right) \approx 109.5^\circ).

Common traps

Mixing up the start and end of a displacement. AB→=b−a\overrightarrow{AB} = \mathbf{b} - \mathbf{a}, end minus start. A sign slip reverses the vector and turns an acute angle into an obtuse one.

Using the wrong two vectors for an angle in a triangle. To find the angle at BB, both vectors must leave BB: BA→\overrightarrow{BA} and BC→\overrightarrow{BC}. Using AB→\overrightarrow{AB} and BC→\overrightarrow{BC} gives the exterior angle.

Dividing by ∣b∣|\mathbf{b}| instead of ∣b∣2|\mathbf{b}|^2 in a projection. The formula a⋅b∣b∣2b\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2}\mathbf{b} already contains one factor of ∣b∣|\mathbf{b}| in the final b\mathbf{b}. Check the length of your answer against ∣a∣cos⁡θ|\mathbf{a}|\cos\theta.

Forgetting the third component. Magnitudes, scalar products and parallel tests need all three terms. A dropped zz term gives a plausible but wrong answer.

Confusing the letter kk with the vector k\mathbf{k}. In "ki+2j−kk\mathbf{i} + 2\mathbf{j} - \mathbf{k}" they are different objects.

Exam technique

Write each vector as an ordered triple first, then compute the scalar product and the two magnitudes as separate lines. Exact values (surds) are usually requested before a decimal angle. If a question says "hence", the previous part's result (a zero scalar product, a unit vector or a projection) is the tool for the next part. Line equations and vector proofs in three dimensions are Extension 2 content, so you will not need parametric lines here.

Practice questions

Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.

foundation2 marks
The points A(1,2,3)A(1, 2, 3) and B(4,−2,15)B(4, -2, 15) are given. Find the vector AB→\overrightarrow{AB} and the distance between AA and BB.
Show worked solution →

Subtract the position vectors, end minus start.

AB→=(4−1)i+(−2−2)j+(15−3)k=3i−4j+12k.\overrightarrow{AB} = (4 - 1)\mathbf{i} + (-2 - 2)\mathbf{j} + (15 - 3)\mathbf{k} = 3\mathbf{i} - 4\mathbf{j} + 12\mathbf{k}.

The distance is the magnitude.

∣AB→∣=32+(−4)2+122=9+16+144=169=13.|\overrightarrow{AB}| = \sqrt{3^2 + (-4)^2 + 12^2} = \sqrt{9 + 16 + 144} = \sqrt{169} = 13.

Marker's note: one mark for the vector, one for the magnitude. Reversing the subtraction gives −AB→-\overrightarrow{AB}, which has the same length but the wrong direction.

foundation2 marks
Find the unit vector in the direction of a=2i−j+2k\mathbf{a} = 2\mathbf{i} - \mathbf{j} + 2\mathbf{k}.
Show worked solution →

Find the magnitude. ∣a∣=22+(−1)2+22=9=3|\mathbf{a}| = \sqrt{2^2 + (-1)^2 + 2^2} = \sqrt{9} = 3.

Divide each component by it.

a^=13(2i−j+2k)=23i−13j+23k.\hat{\mathbf{a}} = \frac{1}{3}\left( 2\mathbf{i} - \mathbf{j} + 2\mathbf{k} \right) = \frac{2}{3}\mathbf{i} - \frac{1}{3}\mathbf{j} + \frac{2}{3}\mathbf{k}.

Marker's note: one mark for the magnitude, one for the scaled vector. A quick check is that the squares of the new components add to 49+19+49=1\frac{4}{9} + \frac{1}{9} + \frac{4}{9} = 1.

core3 marks
Find the angle between the vectors a=i+2j+2k\mathbf{a} = \mathbf{i} + 2\mathbf{j} + 2\mathbf{k} and b=2i−j+2k\mathbf{b} = 2\mathbf{i} - \mathbf{j} + 2\mathbf{k}, correct to the nearest tenth of a degree.
Show worked solution →
Scalar product
a⋅b=(1)(2)+(2)(−1)+(2)(2)=2−2+4=4\mathbf{a} \cdot \mathbf{b} = (1)(2) + (2)(-1) + (2)(2) = 2 - 2 + 4 = 4.
Magnitudes
∣a∣=1+4+4=3|\mathbf{a}| = \sqrt{1 + 4 + 4} = 3 and ∣b∣=4+1+4=3|\mathbf{b}| = \sqrt{4 + 1 + 4} = 3.
Use the angle formula

cos⁡θ=a⋅b∣a∣∣b∣=49,θ=cos⁡−1(49)≈63.6∘.\cos\theta = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}||\mathbf{b}|} = \frac{4}{9}, \qquad \theta = \cos^{-1}\left( \frac{4}{9} \right) \approx 63.6^\circ.

Marker's note: one mark for the scalar product, one for the magnitudes, one for the angle. Calculators must be in degree mode.

core3 marks
The vectors p=ki+2j−k\mathbf{p} = k\mathbf{i} + 2\mathbf{j} - \mathbf{k} and q=3i+kj+4k\mathbf{q} = 3\mathbf{i} + k\mathbf{j} + 4\mathbf{k} are perpendicular. Find the value of kk.
Show worked solution →

Perpendicular vectors have scalar product zero.

p⋅q=(k)(3)+(2)(k)+(−1)(4)=5k−4.\mathbf{p} \cdot \mathbf{q} = (k)(3) + (2)(k) + (-1)(4) = 5k - 4.

Set it to zero. 5k−4=05k - 4 = 0, so k=45k = \frac{4}{5}.

Marker's note: one mark for the scalar product, one for setting it to zero, one for kk. The letter kk appears as both a number and the unit vector k\mathbf{k} here, so write the unit vector in bold and keep the two apart.

core2 marks
The vectors u=pi+6j−9k\mathbf{u} = p\mathbf{i} + 6\mathbf{j} - 9\mathbf{k} and v=2i+qj−3k\mathbf{v} = 2\mathbf{i} + q\mathbf{j} - 3\mathbf{k} are parallel. Find pp and qq.
Show worked solution →

Parallel means one is a scalar multiple of the other: u=λv\mathbf{u} = \lambda\mathbf{v}.

The k\mathbf{k} components give −9=−3λ-9 = -3\lambda, so λ=3\lambda = 3.

The i\mathbf{i} components give p=3×2=6p = 3 \times 2 = 6. The j\mathbf{j} components give 6=3q6 = 3q, so q=2q = 2.

Marker's note: one mark for finding the scalar from the component that has no unknown, one mark for both p=6p = 6 and q=2q = 2.

exam4 marks
The points A(1,1,1)A(1, 1, 1), B(3,2,3)B(3, 2, 3) and C(5,0,2)C(5, 0, 2) form a triangle. (a) Show that angle ABCABC is a right angle. (b) Hence find the area of triangle ABCABC and check your answer using the length of ACAC.
Show worked solution →

(a) Form the two vectors from BB.

BA→=(1−3,1−2,1−3)=(−2,−1,−2)\overrightarrow{BA} = (1-3, 1-2, 1-3) = (-2, -1, -2) and BC→=(5−3,0−2,2−3)=(2,−2,−1)\overrightarrow{BC} = (5-3, 0-2, 2-3) = (2, -2, -1).

BA→⋅BC→=(−2)(2)+(−1)(−2)+(−2)(−1)=−4+2+2=0,\overrightarrow{BA} \cdot \overrightarrow{BC} = (-2)(2) + (-1)(-2) + (-2)(-1) = -4 + 2 + 2 = 0,

so the vectors are perpendicular and angle ABC=90∘ABC = 90^\circ.

(b) Area. ∣BA→∣=4+1+4=3|\overrightarrow{BA}| = \sqrt{4 + 1 + 4} = 3 and ∣BC→∣=4+4+1=3|\overrightarrow{BC}| = \sqrt{4 + 4 + 1} = 3. The two perpendicular sides give

Area=12×3×3=92.\text{Area} = \frac{1}{2} \times 3 \times 3 = \frac{9}{2}.

Check with Pythagoras. AC=(5−1)2+(0−1)2+(2−1)2=16+1+1=18=32AC = \sqrt{(5-1)^2 + (0-1)^2 + (2-1)^2} = \sqrt{16 + 1 + 1} = \sqrt{18} = 3\sqrt{2}, and 32+32=18=(32)23^2 + 3^2 = 18 = \left(3\sqrt{2}\right)^2.

Marker's note: one mark for both vectors, one for the zero scalar product and the conclusion, one for the lengths, one for the area.

exam4 marks
Let a=3i+4j+12k\mathbf{a} = 3\mathbf{i} + 4\mathbf{j} + 12\mathbf{k} and b=i+2j+2k\mathbf{b} = \mathbf{i} + 2\mathbf{j} + 2\mathbf{k}. (a) Find the vector projection of a\mathbf{a} onto b\mathbf{b}. (b) Find the component of a\mathbf{a} perpendicular to b\mathbf{b} and confirm it is perpendicular to b\mathbf{b}.
Show worked solution →

(a) Projection formula. a⋅b=3+8+24=35\mathbf{a} \cdot \mathbf{b} = 3 + 8 + 24 = 35 and ∣b∣2=1+4+4=9|\mathbf{b}|^2 = 1 + 4 + 4 = 9, so

projba=a⋅b∣b∣2 b=359(i+2j+2k)=359i+709j+709k.\text{proj}_{\mathbf{b}}\mathbf{a} = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2}\,\mathbf{b} = \frac{35}{9}\left( \mathbf{i} + 2\mathbf{j} + 2\mathbf{k} \right) = \frac{35}{9}\mathbf{i} + \frac{70}{9}\mathbf{j} + \frac{70}{9}\mathbf{k}.

(b) Subtract the projection from a\mathbf{a}.

a−projba=(3−359)i+(4−709)j+(12−709)k=−89i−349j+389k.\mathbf{a} - \text{proj}_{\mathbf{b}}\mathbf{a} = \left( 3 - \frac{35}{9} \right)\mathbf{i} + \left( 4 - \frac{70}{9} \right)\mathbf{j} + \left( 12 - \frac{70}{9} \right)\mathbf{k} = -\frac{8}{9}\mathbf{i} - \frac{34}{9}\mathbf{j} + \frac{38}{9}\mathbf{k}.

Check perpendicularity. Dotting with b\mathbf{b} gives −89−689+769=0-\frac{8}{9} - \frac{68}{9} + \frac{76}{9} = 0.

Marker's note: one mark for the scalar product and ∣b∣2|\mathbf{b}|^2, one for the projection, one for the perpendicular component, one for the check. The denominator is ∣b∣2|\mathbf{b}|^2, not ∣b∣|\mathbf{b}|.

exam4 marks
Find, correct to the nearest tenth of a degree, the size of angle ABCABC in the triangle with vertices A(2,1,−1)A(2, 1, -1), B(1,3,0)B(1, 3, 0) and C(4,2,1)C(4, 2, 1).
Show worked solution →

Both vectors must start at BB, because the angle is at BB.

BA→=(2−1,1−3,−1−0)=(1,−2,−1)\overrightarrow{BA} = (2-1, 1-3, -1-0) = (1, -2, -1) and BC→=(4−1,2−3,1−0)=(3,−1,1)\overrightarrow{BC} = (4-1, 2-3, 1-0) = (3, -1, 1).

Scalar product
BA→⋅BC→=3+2−1=4\overrightarrow{BA} \cdot \overrightarrow{BC} = 3 + 2 - 1 = 4.
Magnitudes
∣BA→∣=1+4+1=6|\overrightarrow{BA}| = \sqrt{1 + 4 + 1} = \sqrt{6} and ∣BC→∣=9+1+1=11|\overrightarrow{BC}| = \sqrt{9 + 1 + 1} = \sqrt{11}.
Angle

cos⁡B=4611=466,B=cos⁡−1(466)≈60.5∘.\cos B = \frac{4}{\sqrt{6}\sqrt{11}} = \frac{4}{\sqrt{66}}, \qquad B = \cos^{-1}\left( \frac{4}{\sqrt{66}} \right) \approx 60.5^\circ.

Marker's note: one mark for each of the two vectors from BB, one for the scalar product and magnitudes, one for the angle. Using AB→\overrightarrow{AB} in place of BA→\overrightarrow{BA} finds the supplementary angle 119.5∘119.5^\circ.

Practise this

Sources & how we know this

ExamExplained