MathematicsCore22 min read

Vectors in Space

Three dimensions, and the two ways of multiplying vectors

This topic appears in:

01

Adding a third axis changes very little

A vector in space has three components instead of two: v = a i + b j + c k, where i, j and k are unit vectors along the x, y and z axes. Addition, subtraction and scalar multiplication all work exactly as they did in the plane — componentwise, one line each.

The magnitude is Pythagoras applied twice, once in the base plane and once vertically, which is why the formula simply gains a third square.

v = a i + b j + c k = ⟨a, b, c⟩|v| = √(a² + b² + c²)AB = b − a(head minus tail, as in two dimensions)unit vector v̂ = v / |v|i, j and k are mutually perpendicular unit vectors along the three axes
a, b, c
the components along x, y and z
|v|
the magnitudenever negative

Switch between dot and cross. The dot product produces a single number; the cross product produces a whole new vector, sticking out perpendicular to both — that difference is the entire chapter.

02

The dot product: a number that measures alignment

The dot or scalar product multiplies two vectors and returns a number. Computationally it is the sum of the products of matching components. Geometrically it is |a||b| cos θ, which makes it a measure of how much the two vectors point the same way.

That geometric form is what makes it useful: rearranged, it gives the angle between any two vectors, in two or three dimensions, without drawing anything.

a · b = a₁b₁ + a₂b₂ + a₃b₃a · b = |a| |b| cos θcos θ = (a · b) / (|a| |b|)a · b = 0 ⟺ a ⟂ b(for non-zero vectors)the dot product is commutative: a · b = b · a
Worked example

Find the angle between a = 2i + 3j + k and b = i − 2j + 4k.

  1. a · b = (2)(1) + (3)(−2) + (1)(4) = 2 − 6 + 4 = 0.Multiply matching components and add. Mismatching them is the usual slip.
  2. A dot product of zero means cos θ = 0.Neither vector is the zero vector, so the moduli cannot be responsible.
  3. Therefore θ = 90° — the vectors are perpendicular.No need to compute the magnitudes at all once the dot product turns out to be zero.

θ = 90°; the vectors are perpendicular

What the sign of the dot product tells you

Because |a| and |b| are positive, the sign of a · b is the sign of cos θ. Positive means the angle is acute and the vectors broadly agree; zero means exactly perpendicular; negative means obtuse, and the vectors are pulling in opposing directions. That is often all a question needs.

03

The cross product: a vector at right angles to both

The cross or vector product returns a vector, perpendicular to both of the originals, with magnitude |a||b| sin θ. Its direction is given by the right-hand rule, and reversing the order of the two vectors reverses that direction — so a × b = −(b × a) and the cross product is not commutative.

It is computed as a 3 × 3 determinant with i, j and k across the top row. The magnitude has a neat meaning: it is the area of the parallelogram the two vectors span, so half of it is the area of the triangle they form.

Dot productCross product
Resulta scalara vector
Formula|a||b| cos θ|a||b| sin θ
Zero whenthe vectors are perpendicularthe vectors are parallel
Order matters?no — a·b = b·ayes — a×b = −(b×a)
Geometric meaningprojection / alignmentarea of the parallelogram
a × b = | i j k ; a₁ a₂ a₃ ; b₁ b₂ b₃ |a × b = (a₂b₃ − a₃b₂) i − (a₁b₃ − a₃b₁) j + (a₁b₂ − a₂b₁) k|a × b| = |a| |b| sin θ = area of the parallelogramarea of triangle = ½ |a × b|note the minus sign on the j component — it comes from the alternating signs of the determinant expansion

Zero means opposite things

a · b = 0 means the vectors are perpendicular, because cos 90° = 0. a × b = 0 means they are parallel, because sin 0° = 0. Students routinely quote the wrong one. Tie each to its trigonometric function and the pair becomes impossible to confuse.

04

The scalar triple product

Combining the two products gives a · (b × c), a single number whose absolute value is the volume of the parallelepiped built on the three vectors. It is evaluated as a 3 × 3 determinant of the components.

Its most useful consequence: if the triple product is zero, the three vectors lie in one plane — they are coplanar, because a solid built on them has no volume. That is the standard exam use.

[a b c] = a · (b × c) = | a₁ a₂ a₃ ; b₁ b₂ b₃ ; c₁ c₂ c₃ |volume of parallelepiped = |a · (b × c)|volume of tetrahedron = (1/6) |a · (b × c)|a · (b × c) = 0 ⟺ a, b, c are coplanarswapping any two of the three vectors changes the sign but not the magnitude

Before you leave this chapter

  1. |v| = √(a² + b² + c²); everything else about addition works as it did in two dimensions.
  2. Dot product gives a scalar, |a||b| cos θ. Zero ⟹ perpendicular.
  3. Cross product gives a vector perpendicular to both, |a||b| sin θ. Zero ⟹ parallel.
  4. a × b = −(b × a), so the order matters; a · b = b · a, so it does not.
  5. |a × b| is the area of the parallelogram; |a · (b × c)| is the volume, and zero means coplanar.
05

Direction cosines and direction ratios

A vector in space makes an angle with each of the three axes. The cosines of those angles — written l, m and n — are the direction cosines, and they are exactly the components of the unit vector in that direction.

Any three numbers proportional to them are called direction ratios, and the components of the vector itself are the most obvious set. Dividing the ratios by the magnitude turns them into the cosines.

l = a/|v|m = b/|v|n = c/|v|l² + m² + n² = 1direction ratios: any triple proportional to ⟨a, b, c⟩the identity l² + m² + n² = 1 is the free check — it must hold for any genuine set of direction cosines
Worked example

Find the direction cosines of v = 2i − 3j + 6k and the angle it makes with the x-axis.

  1. |v| = √(4 + 9 + 36) = √49 = 7.The magnitude is the denominator for all three cosines.
  2. l = 2/7, m = −3/7, n = 6/7.A negative cosine simply means the angle with that axis is obtuse.
  3. Check: (4 + 9 + 36)/49 = 1The identity confirms all three at once, which is why it is worth doing.
  4. Angle with the x-axis: cos α = 2/7 = 0.2857, so α = 73.4°.Each direction cosine gives its own angle directly.

l, m, n = 2/7, −3/7, 6/7; α ≈ 73.4°

06

The vector equation of a line

A line is fixed by two pieces of information: somewhere it passes through, and the direction it runs in. Write the first as a position vector a and the second as a direction vector b, and every point on the line is reached by starting at a and travelling some multiple of b.

The parameter t is what varies. Each value of t names one point, negative values run backwards along the line, and t = 0 gives the point a itself. This is why the same line has infinitely many correct equations: any point on it can serve as a, and any scalar multiple of b gives the same direction.

r = a + t bthrough two points A and B:r = a + t(b − a)direction from A to B is AB = b − aa is any point on the line; b is any vector along it
r
the position vector of a general pointthe thing being described
a
a known point on the lineoften called the base point
b
the direction vectorany non-zero multiple works equally well
t
the parametereach value picks out one point

Two different-looking answers can be the same line

Because the base point and the scaling of the direction are both free, r = i + 2j + t(2i − 4j) and r = 3i − 2j + s(−i + 2j) describe the same line. If your answer disagrees with the mark scheme, check whether the direction vectors are multiples of each other and whether your base point satisfies their equation — it is very often correct.

07

In three dimensions two lines need not meet, and need not be parallel either — they can pass by one another at different heights. Such lines are called skew, and they have no two-dimensional analogue, which is why the possibility is so easy to forget.

Deciding which case applies is a fixed procedure. Compare the directions first, because that settles the parallel case immediately and without algebra.

TestResultConclusion
directions are multiplesand a point of one lies on the otherthe same line
directions are multiplesbut no shared pointparallel, never meeting
directions not multiplesthe equations solve consistentlythey intersect
directions not multiplesthe equations are inconsistentskew
Worked example

Determine whether the lines r = (1, 0, 2) + t(2, 1, −1) and r = (3, 2, 0) + s(1, −1, 2) intersect.

  1. Check the directions: (2, 1, −1) is not a multiple of (1, −1, 2), so the lines are not parallel.This rules out the parallel and identical cases, leaving intersecting or skew.
  2. Set the position vectors equal, component by component: 1 + 2t = 3 + s, 0 + t = 2 − s, 2 − t = 0 + 2s.If they intersect there is one point on both, so there must be values of t and s giving the same position.
  3. From the second equation, s = 2 − t. Substituting into the first: 1 + 2t = 5 − t, so 3t = 4 and t = 4/3, s = 2/3.Two equations are enough to find both parameters. The third then becomes a consistency test.
  4. Test in the third equation: 2 − 4/3 = 2/3 on the left, and 2(2/3) = 4/3 on the right. These are not equal.This is the step that decides the answer, and the one most often skipped.
  5. The equations are inconsistent, so the lines do not intersect. They are skew.Non-parallel and non-intersecting is precisely the definition of skew.

The lines are skew

Use different letters for the two parameters

Writing t in both lines forces them to be at the same point at the same value of t, which is a much stronger condition than intersecting and will report that intersecting lines do not meet. Use t for one and s for the other, always. And having solved for both, you must substitute into the unused third equation — skipping that check makes every pair of lines look as though it intersects.

Practice questions

6 questions · 20 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

3 · 6 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
Find the magnitude of v = 3i − 4j + 12k.
Model answer

|v| = √(9 + 16 + 144) = √169 = 13.

Examiner tip. The sign of any component disappears on squaring, so a negative component never makes the magnitude smaller.

SQ2[2 marks]
State two differences between the dot product and the cross product.
Model answer

The dot product gives a scalar and is commutative; the cross product gives a vector perpendicular to both, and reversing the order reverses its direction. The dot product is zero for perpendicular vectors, the cross product for parallel ones.

Examiner tip. Any two clear differences earn the marks. The scalar-versus-vector distinction is the one examiners want first.

SQ3[2 marks]
If a · b = 0 and neither vector is zero, what can you conclude?
Model answer

Since a · b = |a||b| cos θ and neither magnitude is zero, cos θ = 0, so θ = 90° — the vectors are perpendicular.

Examiner tip. The condition "neither is zero" matters: the zero vector has a zero dot product with everything and no defined direction.

Solved numericals

2 · 8 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[4 marks]
Given a = i + 2j − k and b = 3i − j + 2k, find a · b and the angle between them.
Full working
  1. a · b = (1)(3) + (2)(−1) + (−1)(2) = 3 − 2 − 2 = −1a negative dot product means an obtuse angle[1]
  2. |a| = √(1 + 4 + 1) = √6[1]
  3. |b| = √(9 + 1 + 4) = √14[1]
  4. cos θ = −1/(√6 √14) = −1/9.165 = −0.109, so θ = 96.3°obtuse, as the negative dot product predicted[1]

a · b = −1; θ ≈ 96.3°

Examiner tip. Check the sign of the dot product against your final angle. A negative product with an acute answer means an arithmetic error somewhere.

N2[4 marks]
Find a × b for a = 2i + j + k and b = i − j + 3k, and hence the area of the triangle they form.
Full working
  1. i component: (1)(3) − (1)(−1) = 3 + 1 = 4[1]
  2. j component: −[(2)(3) − (1)(1)] = −5the minus sign on j is where marks are lost[1]
  3. k component: (2)(−1) − (1)(1) = −3, so a × b = 4i − 5j − 3k[1]
  4. Area = ½|a × b| = ½√(16 + 25 + 9) = ½√50 = 3.54accept (5√2)/2[1]

a × b = 4i − 5j − 3k; area ≈ 3.54 square units

Examiner tip. Verify the cross product by dotting it with a: 8 − 5 − 3 = 0 ✓. It must be perpendicular to both originals, and that check costs one line.

Long questions

1 · 6 marks

Theory and numerical together, as they appear in the long-question section.

LQ1[6 marks]
Three vectors are given: a = i + j, b = j + k and c = i + k.
  1. Find b × c.
  2. Hence find the scalar triple product a · (b × c).
  3. State what your answer tells you about the three vectors, and give the volume of the parallelepiped they span.
Mark scheme
  1. b = ⟨0, 1, 1⟩ and c = ⟨1, 0, 1⟩; i component = (1)(1) − (1)(0) = 1[1]
  2. j component = −[(0)(1) − (1)(1)] = 1; k component = (0)(0) − (1)(1) = −1so b × c = i + j − k[1]
  3. a · (b × c) = (1)(1) + (1)(1) + (0)(−1)a = ⟨1, 1, 0⟩[1]
  4. = 2[1]
  5. The triple product is non-zero, so the three vectors are NOT coplanara zero value would have meant they all lay in one plane[1]
  6. Volume = |2| = 2 cubic units[1]

(a) i + j − k (b) 2 (c) not coplanar; volume 2 cubic units

Examiner tip. Take the modulus for the volume. A triple product of −2 describes the same solid — the sign only records the orientation of the three vectors, not a negative volume.