Skip to main content

Three-dimensional vectors, lines and spheres in HSC Mathematics Extension 2: component form, magnitude, the scalar product, vector equations of lines and the equation of a sphere

Syllabus dot point

“Represent three-dimensional vectors in component form, compute the scalar product and magnitude, and find vector equations of lines and the equation of a sphere”

HSCMaths Extension 2Further Work with Vectors (MEX-V1)14 min read

Quick answer

A 3D vector is a=a1i+a2j+a3k\mathbf{a} = a_1\mathbf{i} + a_2\mathbf{j} + a_3\mathbf{k} with magnitude ∣a∣=a12+a22+a32|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}. The scalar 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. A line through point a\mathbf{a} with direction d\mathbf{d} is r=a+λd\mathbf{r} = \mathbf{a} + \lambda\mathbf{d}. A sphere of centre c\mathbf{c} and radius RR is ∣r−c∣=R|\mathbf{r} - \mathbf{c}| = R.

Jump to a section
  1. What this dot point is asking
  2. Vectors in component form
  3. Magnitude as a space diagonal
  4. The scalar product in three dimensions
  5. Vector equation of a line
  6. Intersecting versus skew lines
  7. The equation of a sphere
  8. How exam questions ask about 3D vectors and lines
  9. Exam-style questions

What this dot point is asking

NESA wants you to extend two-dimensional vectors into three dimensions. You must write vectors in component form using i\mathbf{i}, j\mathbf{j}, k\mathbf{k}, compute magnitude and the scalar (dot) product, find the angle between vectors, write vector equations of lines, decide whether two lines intersect or are skew, and derive the equation of a sphere. Almost every formula is the two-dimensional one with a third term bolted on; the genuinely new ideas are the third axis itself, the possibility of skew lines, and the sphere.

Vectors in component form

A point in space is described by an ordered triple (x,y,z)(x, y, z) relative to three mutually perpendicular axes. The position vector of that point is

r=xi+yj+zk,\mathbf{r} = x\mathbf{i} + y\mathbf{j} + z\mathbf{k},

where i\mathbf{i}, j\mathbf{j}, k\mathbf{k} are the unit vectors along the xx, yy and zz axes. To reach the point you step xx along i\mathbf{i}, then yy along j\mathbf{j}, then zz along k\mathbf{k}; the three steps are independent because the axes are perpendicular.

Stage 1: three-dimensional axes and a point An oblique set of x, y and z axes from the origin O. A point P is reached by stepping along x, then y, then z; the position vector r joins O to P. x y z O r P P(x, y, z) is reached by x i + y j + z k from O.

Addition, subtraction and scalar multiplication act component by component, exactly as in two dimensions. The only discipline the third dimension demands is never to silently drop the k\mathbf{k} term: a vector you began in two-dimensional habit will be wrong by a whole coordinate.

Magnitude as a space diagonal

The magnitude (length) of a=a1i+a2j+a3k\mathbf{a} = a_1\mathbf{i} + a_2\mathbf{j} + a_3\mathbf{k} is

∣a∣=a12+a22+a32.|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}.

This is Pythagoras applied twice. The vector is the long diagonal of a rectangular box with edge lengths a1a_1, a2a_2 and a3a_3: the floor diagonal has length a12+a22\sqrt{a_1^2 + a_2^2}, and the space diagonal then has length (a12+a22)+a32\sqrt{(a_1^2 + a_2^2) + a_3^2}, which is the formula above.

Magnitude as the space diagonal of a box The vector to P is the space diagonal of the rectangular box with edge lengths a1 along x, a2 along y and a3 along z. Its length is the square root of the sum of the squares. x y z O |a| P a₁ a₂ a₃ |a| is the space diagonal: √(a₁² + a₂² + a₃²).

The unit vector in the direction of a\mathbf{a} is a^=a∣a∣\hat{\mathbf{a}} = \dfrac{\mathbf{a}}{|\mathbf{a}|}, and the distance between two points AA and BB is ∣AB→∣=∣b−a∣|\overrightarrow{AB}| = |\mathbf{b} - \mathbf{a}|, the magnitude of the displacement.

The scalar product in three dimensions

The scalar (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,

where θ\theta is the angle between the vectors. The component formula and the geometric formula are two faces of the same number: the first lets you compute it from coordinates, the second lets you extract the angle. Rearranging gives

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

Angle between two vectors in space Two vectors u and v drawn from the origin; the angle theta between them is found from the scalar product divided by the product of magnitudes. x y z O u v θ cos θ = (u · v) / (|u| |v|).

Two non-zero vectors are perpendicular exactly when a⋅b=0\mathbf{a}\cdot\mathbf{b} = 0, because cos⁡90∘=0\cos 90^\circ = 0. The scalar product is commutative (a⋅b=b⋅a\mathbf{a}\cdot\mathbf{b} = \mathbf{b}\cdot\mathbf{a}), distributes over addition, and satisfies a⋅a=∣a∣2\mathbf{a}\cdot\mathbf{a} = |\mathbf{a}|^2, which is the bridge between lengths and the dot product used throughout vector proofs.

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}:

∣a∣=a12+a22+a32,a⋅b=a1b1+a2b2+a3b3=∣a∣∣b∣cos⁡θ.|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}, \qquad \mathbf{a}\cdot\mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3 = |\mathbf{a}||\mathbf{b}|\cos\theta.

Perpendicular   ⟺  a⋅b=0\iff \mathbf{a}\cdot\mathbf{b} = 0. Every formula is the 2D one with a third term added, so the only new habit is to keep the third component in every line of working.

Vector equation of a line

A line through the point with position vector a\mathbf{a} and parallel to the direction vector d (≠0)\mathbf{d}\,(\ne\mathbf{0}) consists of all points

r=a+λd,λ∈R.\mathbf{r} = \mathbf{a} + \lambda\mathbf{d}, \qquad \lambda \in \mathbb{R}.

The recipe is the same as in two dimensions, just with three-component vectors. Build it up one piece at a time.

Stage 1, a point and a direction. Fix a point AA on the line with position vector a\mathbf{a}, and a direction d\mathbf{d} pointing along the line. Adding one copy of d\mathbf{d} to a\mathbf{a} lands on a second point of the line.

A point and a direction in space The position vector a reaches the point A. From A, the direction vector d points along the line. x y z O a d A a reaches A; d points along the line from A.

Stage 2, the whole line. Letting λ\lambda range over every real number sweeps out the entire line. The position vector r\mathbf{r} of a general point PP is a\mathbf{a} (to get onto the line at AA) plus λ\lambda copies of d\mathbf{d} (to slide along to PP). At λ=0\lambda = 0 you are at AA; positive λ\lambda moves one way, negative the other.

The line r = a + t d in space The full line is every point a + t d as the parameter t runs over the reals. The position vector r reaches a general point P on the line. x y z O r = a + t d a r A P Every value of t gives one point; together they form the line.

In components, r=a+λd\mathbf{r} = \mathbf{a} + \lambda\mathbf{d} reads

(xyz)=(a1a2a3)+λ(d1d2d3),\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix} + \lambda\begin{pmatrix} d_1 \\ d_2 \\ d_3 \end{pmatrix},

so x=a1+λd1x = a_1 + \lambda d_1, y=a2+λd2y = a_2 + \lambda d_2, z=a3+λd3z = a_3 + \lambda d_3. To find the line through two points AA and BB, take a=OA→\mathbf{a} = \overrightarrow{OA} and direction d=AB→=b−a\mathbf{d} = \overrightarrow{AB} = \mathbf{b} - \mathbf{a}. The point a\mathbf{a} may be any point on the line and d\mathbf{d} any non-zero multiple of the direction, so a line has infinitely many vector equations.

To test whether a point lies on the line, solve for a single λ\lambda that reproduces every component. Set up one equation per coordinate, solve the first for λ\lambda, and check that the same λ\lambda satisfies the other two. If any coordinate disagrees, the point is off the line, exactly as in the worked exam question above.

Intersecting versus skew lines

Two lines meet where their position vectors coincide. Use different parameters for the two lines and set them equal:

a1+λd1=a2+μd2.\mathbf{a}_1 + \lambda\mathbf{d}_1 = \mathbf{a}_2 + \mu\mathbf{d}_2.

That is one equation per coordinate, so three equations in only two unknowns λ\lambda and μ\mu. Solve two of them, then check the third: this is where three dimensions differs sharply from two. In the plane, two non-parallel lines always meet. In space they need not.

Two intersecting lines in space Two lines that share a common point: a single pair of parameters makes their position vectors equal, so they meet at the marked point. x y z O L₁ L₂ X Intersecting: a single point X solves both equations.

If λ\lambda and μ\mu from the first two equations also satisfy the third, the lines intersect and substituting gives the meeting point. If the directions are parallel (d1=kd2\mathbf{d}_1 = k\mathbf{d}_2), the lines are parallel; test a point of one against the other to decide whether they are coincident or distinct. If the directions are not parallel and the third equation fails, the lines are skew: they are neither parallel nor intersecting, an arrangement impossible in a plane.

Two skew lines in space Two skew lines that are not parallel and never meet. Their projections cross, but line L2 passes in front of L1 at the apparent crossing, shown by the break in L1, so no pair of parameters makes the position vectors equal. x y z O L₁ L₂ Skew: not parallel, never meet (L₂ passes in front of L₁).

In the picture the two skew lines appear to cross, but L2L_2 passes in front of L1L_1 at different depths (the break in L1L_1 shows this), so there is no common point. Algebraically, that is precisely the case where the first two equations give a (λ,μ)(\lambda, \mu) pair that the third equation rejects.

The equation of a sphere

A sphere is the set of points at fixed distance RR (the radius) from a centre CC with position vector c\mathbf{c}:

∣r−c∣=R.|\mathbf{r} - \mathbf{c}| = R.

In Cartesian coordinates with c=(a,b,c)\mathbf{c} = (a, b, c) this is

(x−a)2+(y−b)2+(z−c)2=R2.(x - a)^2 + (y - b)^2 + (z - c)^2 = R^2.

This is the natural 3D analogue of the circle equation, with the third squared term appearing for the extra coordinate. An expanded form is converted back to centre-radius form by completing the square in each of xx, yy and zz; the constant left over equals R2R^2.

How exam questions ask about 3D vectors and lines

  • "Find the magnitude of" or "the distance between AA and BB": apply a12+a22+a32\sqrt{a_1^2 + a_2^2 + a_3^2} (to b−a\mathbf{b} - \mathbf{a} for a distance).
  • "Find the angle between u\mathbf{u} and v\mathbf{v}": compute u⋅v\mathbf{u}\cdot\mathbf{v} and both magnitudes, then cos⁡θ=u⋅v∣u∣∣v∣\cos\theta = \frac{\mathbf{u}\cdot\mathbf{v}}{|\mathbf{u}||\mathbf{v}|}.
  • "Show that u\mathbf{u} and v\mathbf{v} are perpendicular": show u⋅v=0\mathbf{u}\cdot\mathbf{v} = 0; no need to find the angle.
  • "Find a vector equation of the line through AA and BB": take d=b−a\mathbf{d} = \mathbf{b} - \mathbf{a}, then state r=a+λd\mathbf{r} = \mathbf{a} + \lambda\mathbf{d}.
  • "Does CC lie on the line?": solve one coordinate for λ\lambda and check it reproduces the other two.
  • "Do the lines intersect, or are they skew?": set the forms equal with different parameters, solve two coordinates, and test the third; if it fails and the directions are not parallel, say "skew".
  • "Find the equation of the sphere with centre CC and radius RR" or "... and write down its centre and radius": state ∣r−c∣=R|\mathbf{r} - \mathbf{c}| = R, or complete the square to read off c\mathbf{c} and RR.
Exam technique

Keep every vector in three components from the first line to the last; the single most common lost mark is dropping the k\mathbf{k} term partway through. For an angle, leave cos⁡θ\cos\theta exact (a fraction) before taking the inverse cosine, and read the units the question wants (degrees or radians). When deciding intersect versus skew, always use two different parameters (λ\lambda and μ\mu) and state explicitly that you checked the third equation; markers want to see that the consistency test was actually done. For a sphere given in expanded form, complete the square one variable at a time and keep the R2R^2 on the right. Quoting a vector equation when a specific point is asked loses the mark: substitute the given parameter value.

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}

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}

The angle between two vectors is found via the scalar product formula a⋅b=∣a∣∣b∣cos⁡θ\mathbf{a}\cdot\mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta. We compute the scalar product and the two magnitudes separately, then combine them.

Compute the scalar product: The scalar product is the sum of the products of corresponding components:

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.

Compute the magnitudes: Each magnitude is the square root of the sum of the squares of the components:

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

Find cos⁡θ\cos\theta and hence the angle: Rearranging the scalar product formula gives cos⁡θ=a⋅b∣a∣∣b∣\cos\theta = \dfrac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|}. Substituting:

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

Taking the inverse cosine (the angle is between 00 and π\pi for the angle between two vectors):

θ=arccos⁡49≈63.6∘.\theta = \arccos\frac{4}{9} \approx 63.6^\circ.

Verify the result: As a check, 49≈0.444\dfrac{4}{9} \approx 0.444 and cos⁡63.6∘≈0.444\cos 63.6^\circ \approx 0.444, confirming the calculation is consistent.

Final answer: θ=arccos⁡49≈63.6∘\theta = \arccos\dfrac{4}{9} \approx 63.6^\circ.

Decide whether two lines intersect or are skew

Decide whether two lines intersect or are skew

The lines are L1:r=(1,0,2)+λ(2,1,−1)L_1: \mathbf{r} = (1, 0, 2) + \lambda(2, 1, -1) and L2:r=(4,3,1)+μ(1,−1,2)L_2: \mathbf{r} = (4, 3, 1) + \mu(1, -1, 2). We must decide whether they meet, and if so where.

Check the directions are not parallel: The direction of L1L_1 is (2,1,−1)(2, 1, -1) and of L2L_2 is (1,−1,2)(1, -1, 2). One is a scalar multiple of the other only if all three ratios match: 21,1−1,−12\frac{2}{1}, \frac{1}{-1}, \frac{-1}{2} are not equal, so the directions are not parallel. The lines therefore either intersect at one point or are skew.

Set the position vectors equal, component by component: Using different parameters, (1+2λ, 0+λ, 2−λ)=(4+μ, 3−μ, 1+2μ)(1 + 2\lambda, \, 0 + \lambda, \, 2 - \lambda) = (4 + \mu, \, 3 - \mu, \, 1 + 2\mu). This gives three equations:

1+2λ=4+μ,λ=3−μ,2−λ=1+2μ.1 + 2\lambda = 4 + \mu, \qquad \lambda = 3 - \mu, \qquad 2 - \lambda = 1 + 2\mu.

Solve two of the equations: Substitute the second equation, λ=3−μ\lambda = 3 - \mu, into the first:

1+2(3−μ)=4+μ  ⟹  7−2μ=4+μ  ⟹  3=3μ  ⟹  μ=1.1 + 2(3 - \mu) = 4 + \mu \;\Longrightarrow\; 7 - 2\mu = 4 + \mu \;\Longrightarrow\; 3 = 3\mu \;\Longrightarrow\; \mu = 1.

Then λ=3−1=2\lambda = 3 - 1 = 2.

Test the third equation: The consistency check is the whole point in three dimensions. Substitute λ=2\lambda = 2 and μ=1\mu = 1 into the third equation, 2−λ=1+2μ2 - \lambda = 1 + 2\mu:

left=2−2=0,right=1+2(1)=3.\text{left} = 2 - 2 = 0, \qquad \text{right} = 1 + 2(1) = 3.

Since 0≠30 \neq 3, the third equation fails. No single pair (λ,μ)(\lambda, \mu) satisfies all three.

Conclude: The directions are not parallel and the equations are inconsistent, so the lines are skew: they neither intersect nor run parallel. (Had the third equation held, we would substitute λ=2\lambda = 2 into L1L_1 to give the meeting point.)

Final answer: the lines are skew.

Common traps
Adding components into the magnitude without squaring
The magnitude squares each component, sums, then square-roots. Omitting the squares gives a wrong length.
Dropping the third component
Carrying a 2D habit into 3D and quietly losing the k\mathbf{k} term changes the vector entirely. Keep all three components throughout.
Reusing one parameter for two lines
Use λ\lambda for one line and μ\mu for the other. A shared letter forces a false constraint and breaks intersection questions.
Forgetting the third consistency equation
Two non-parallel lines in space need not meet. Solve two coordinate equations, then check the third before claiming an intersection; if it fails, the lines are skew.
Confusing position and direction vectors for a line
In r=a+λd\mathbf{r} = \mathbf{a} + \lambda\mathbf{d}, a\mathbf{a} is a point on the line and d\mathbf{d} is its direction. Swapping them describes a different line.
Forgetting to square the radius
The sphere equation has R2R^2 on the right. Writing RR instead changes the radius.

Exam-style questions

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

HSC 2024-style2 marks
Find the angle between the vectors u=(1,2,−2)\mathbf{u} = (1, 2, -2) and v=(4,−4,7)\mathbf{v} = (4, -4, 7), in radians, correct to 1 decimal place.
Show worked answer →

Use the scalar (dot) product: u⋅v=∣u∣∣v∣cos⁡θ\mathbf{u}\cdot\mathbf{v} = |\mathbf{u}||\mathbf{v}|\cos\theta.

Dot product: u⋅v=(1)(4)+(2)(−4)+(−2)(7)=4−8−14=−18\mathbf{u}\cdot\mathbf{v} = (1)(4) + (2)(-4) + (-2)(7) = 4 - 8 - 14 = -18.

Magnitudes: ∣u∣=1+4+4=3|\mathbf{u}| = \sqrt{1 + 4 + 4} = 3 and ∣v∣=16+16+49=9|\mathbf{v}| = \sqrt{16 + 16 + 49} = 9.

So cos⁡θ=−183⋅9=−23\cos\theta = \frac{-18}{3\cdot 9} = -\frac{2}{3}.

θ=arccos⁡ ⁣(−23)≈2.3\theta = \arccos\!\left(-\frac{2}{3}\right) \approx 2.3 radians (to 1 decimal place).

Mark notes: 1 mark for computing u⋅v\mathbf{u}\cdot\mathbf{v} and the magnitudes, 1 mark for cos⁡θ=−23\cos\theta = -\frac{2}{3} giving θ≈2.3\theta \approx 2.3 radians.

HSC 2023-style2 marks
Find a vector equation of the line through the points A(−3,1,5)A(-3, 1, 5) and B(0,2,3)B(0, 2, 3).
Show worked answer →

A vector equation of a line needs a point on it and a direction vector.

Direction vector: AB→=B−A=(3,1,−2)\overrightarrow{AB} = B - A = (3, 1, -2).

Using A(−3,1,5)A(-3, 1, 5) as the point, a vector equation is

r=(−3,1,5)+λ(3,1,−2)\mathbf{r} = (-3, 1, 5) + \lambda(3, 1, -2), where λ\lambda is a real parameter.

(Using BB as the point, or any non-zero scalar multiple of the direction, is equally correct.)

Mark notes: 1 mark for a correct direction vector AB→=(3,1,−2)\overrightarrow{AB} = (3, 1, -2), 1 mark for a complete vector equation with a point and the parameter λ\lambda.

HSC 2024-style3 marks
The line LL passes through A(3,5,−4)A(3, 5, -4) and B(7,0,2)B(7, 0, 2). (i) Find a vector equation of LL. (ii) Determine, giving reasons, whether C(10,5,−2)C(10, 5, -2) lies on LL.
Show worked answer →

Part (i). Direction vector: AB→=B−A=(4,−5,6)\overrightarrow{AB} = B - A = (4, -5, 6).

A vector equation is r=(3,5,−4)+λ(4,−5,6)\mathbf{r} = (3, 5, -4) + \lambda(4, -5, 6).

Part (ii). CC lies on LL only if a single λ\lambda gives all three coordinates of C(10,5,−2)C(10, 5, -2):

  • xx: 10=3+4λ10 = 3 + 4\lambda, so λ=74\lambda = \frac{7}{4}.
  • yy: 5=5−5λ5 = 5 - 5\lambda, so λ=0\lambda = 0.

These values are inconsistent (74≠0\frac{7}{4} \neq 0), so no single λ\lambda produces CC.

Therefore C(10,5,−2)C(10, 5, -2) does not lie on LL.

Mark notes: part (i) 1 mark for a correct vector equation. Part (ii): 1 mark for substituting CC and solving for λ\lambda in at least one coordinate, 1 mark for showing the values are inconsistent and concluding.

Practise this

Sources & how we know this

ExamExplained