This whole subtopic is higher level. Nothing in it is on an SL paper.
Educerie · IB Diploma · Mathematics: analysis and approaches
Topic 3 Geometry and trigonometry · 3.14 Vector equation of a line
What you must be able to do
| You must be able to | Level | What it looks like in the exam |
|---|---|---|
| Write a vector equation of a line r = a + λb from a point and a direction, or from two points | HL | "Find a vector equation of the line through A and B" (2 to 3 marks) |
| Say what a (a position vector) and b (a direction vector) do in the equation, and why the equation is not unique | HL | "Write down a direction vector for L" (1 mark); follow-through when your equation differs from the scheme's |
| Convert between vector, parametric and Cartesian forms | HL | "Write down the parametric equations of L"; "Express L in Cartesian form" (2 to 3 marks) |
| Test whether a point lies on a line | HL | "Show that C lies on L" (2 marks), or "find the value of k" |
| Find the angle between two lines from their direction vectors | HL | "Find the acute angle between L₁ and L₂" (3 to 5 marks), exact on Paper 1 |
| Read λ as time t, b as velocity and |b| as speed | HL | "Find the speed of the ship"; "find its position after 3 hours" (2 marks each) |
| Solve simple kinematics problems: where and when, collision or not, distance apart, closest approach | HL | Paper 2 Section B, 6 to 10 marks across several parts |
Before you start
You need the vector toolkit of 3.12: position vectors, displacement AB = b − a, magnitude, and the fact that parallel vectors are scalar multiples of each other. You need the scalar product and the angle between two vectors from 3.13. The straight line of 2.1 is the two-dimensional picture this page generalises. The formula booklet gives the vector, parametric and Cartesian equations of a line, and the angle formula cos θ = v · w ÷ (|v||w|); the rule for turning that into the angle between two lines is not in it.
On this page a column vector is printed on one line to save space: (2, −1, 3) means the column vector with 2 on top, −1 in the middle and 3 at the bottom. A point is written with its letter, A(2, −1, 3). In your exam, write vectors as columns.
1The idea in one paragraph
In the plane, y = mx + c pins down a line with a gradient and an intercept. In space there is no single gradient, because a line can climb in two horizontal directions at once. So describe it the way you would give directions to someone: start here, and walk this way. "Here" is a point on the line, given by its position vector a. "This way" is a direction vector b. Every point on the line is reached by going to a and then some multiple λ of b, forwards or backwards, so the position vector of a general point is r = a + λb. That one idea gives three equivalent forms of the equation, the angle between two lines (compare directions only), and motion: if λ is time, b is the velocity.
2The vector equation r = a + λb
r = a + λb, where a is the position vector of a known point on the line, b is a direction vector of the line, and λ ∈ ℝ is the parameter. From the formula booklet.
Here r stands for the position vector of any point on the line; the equation says which points qualify. Figure 1 draws the line through A(2, 1, 3) with direction b = (1, 2, −1).
Each real λ gives one point on the line, and negative λ is as good as positive: the line runs forever both ways.
What a and b each do. The position vector a fixes where the line is; the direction vector b fixes which way it points. Any non-zero multiple of b is an equally good direction vector, because (2, 4, −2) points the same way as (1, 2, −1). Any point on the line is an equally good a.
That is why an equation of a line is not unique, and why examiners write "find a vector equation", never "the". Figure 2 shows one line in the plane with two different vector equations.
The same idea in two dimensions. A line in the plane can be written r = (1, 3) + λ(2, −1). The direction (2, −1) says "2 across, 1 down", so the gradient is −1/2. Its Cartesian equation is found by eliminating λ:
A direction (b₁, b₂) has gradient b₂ ÷ b₁; a vertical line (b₁ = 0) has no gradient but a perfectly good vector equation.
3A line through two points, and testing a point
To find a line through P and Q, use one of the points for a and the displacement between them for b. For P(1, −2, 4) and Q(3, 1, 2):
r = (3, 1, 2) + μ(−4, −6, 4) is the same line. An answer that differs from the mark scheme's is still right if its direction is a multiple of theirs and its point lies on their line.
Does a point lie on the line? A point lies on the line when one single value of λ produces all three of its coordinates. Find λ from one component, then test it in the other two.
S fails even though two coordinates agree. In a "show that" question, write all three checks.
4Parametric and Cartesian forms
The vector equation is three equations stacked in one. Read it row by row and you have the parametric form:
x = x₀ + λl, y = y₀ + λm, z = z₀ + λn, where (x₀, y₀, z₀) is a point on the line and (l, m, n) is a direction vector. From the formula booklet.
Make λ the subject of each and set them equal, and you have the Cartesian form:
(x − x₀)/l = (y − y₀)/m = (z − z₀)/n. From the formula booklet.
Figure 3 shows the round trip for the line through P and Q.
Going back. From Cartesian form, the denominators are the direction, and the numbers subtracted from x, y and z are the point. So (x − 3)/4 = (y + 1)/(−2) = z/5 is the line through (3, −1, 0) with direction (4, −2, 5): r = (3, −1, 0) + λ(4, −2, 5). Note the signs: y + 1 is y − (−1), so the point has y₀ = −1; and z on its own is z − 0.
The trap: coefficients that are not 1. Reading off only works when x, y and z each appear with coefficient +1 on top. Take
The direction is (3/2, 4, −2), or (3, 8, −4) after doubling. The tempting wrong answer reads (3, 4, 2) off the denominators and (1, −2, 1) off the numerators; both are wrong. Setting each fraction equal to λ and solving is the safe method every time.
A zero in the direction. For the line through (1, 4, 5) with direction (2, 0, −3), the y-equation is y = 4 + 0λ, so y is always 4. You cannot divide by zero, so the Cartesian form is written
5The angle between two lines
The angle between two lines is decided by their directions alone. Where the lines are, and whether they even meet, does not matter. So take the angle between the two direction vectors, using the scalar product from 3.13:
cos θ = |b₁ · b₂| ÷ (|b₁||b₂|), using the direction vectors, never the position vectors. The modulus signs give the acute angle.
Why the modulus? A line has two directions, b and −b, so two lines make two angles, θ and 180° − θ, and the angle between the lines means the acute one. Without the modulus you get whichever angle your two vectors happen to make. Figure 4 shows it for b₁ = (1, 2, 2) and b₂ = (2, −2, −1).
Paper 1, exact. For L₁ with direction (1, 1, 0) and L₂ with direction (1, 0, 1):
If the scalar product is 0, the lines are perpendicular. The lines need not meet for this: two skew lines (3.15) can still be perpendicular.
6Lines as motion: λ becomes time
Replace λ by t and read the equation as the position of a moving object:
r = a + tv: a is the position at t = 0, v is the velocity vector (displacement per unit time), and the speed is |v|.
Every unit of time, the object moves by v. So it travels in a straight line at constant speed. Figure 5 shows a drone whose position, in metres, after t seconds is r = (2, −3, 1) + t(6, 2, 3).
Units come from the question. Positions in km and t in hours make v a velocity in km h⁻¹.
Scaling the direction changes the speed. As a line, r = a + t(6, 2, 3) and r = a + t(12, 4, 6) are the same. As motion they are not: the second object covers the path twice as fast. So in a kinematics question you may not simplify the direction vector. If a question gives a speed and a direction, build v as speed × unit vector: a speed of 14 m s⁻¹ in the direction (6, 2, 3) is v = 14 × (6, 2, 3)/7 = (12, 4, 6).
Starting at a time other than 0. An object that is at P at t = 2 and moves with velocity v has position r = p + (t − 2)v. Check: at t = 2 the bracket is zero, so r = p.
Two moving objects. Ship A's position after t hours is rA = (0, 5) + t(4, 1) km and ship B's is rB = (10, −3) + t(1, 3) km. Three different questions get asked about them, and they need three different methods.
Do they collide? A collision means the same place at the same time, so use one t for both.
Do their paths cross? The paths are just lines, so give each its own parameter. That is the intersection method of 3.15.
The paths cross at X, but A is there at t ≈ 3.45 h and B at t ≈ 3.82 h. Figure 6 shows the near miss.
How close do they get? Write the vector from A to B at time t, find its length, and minimise it.
On Paper 2 your GDC does the minimising: graph d(t) = √((10 − 3t)² + (2t − 8)²) and use the minimum tool, which gives t ≈ 3.54 and d ≈ 1.11. Minimising d² gives the same t as minimising d, and avoids differentiating a square root.
A third route uses the scalar product. At the closest moment, the line joining the ships is perpendicular to their relative velocity vB − vA = (−3, 2), so (10 − 3t, 2t − 8) · (−3, 2) = 0, which gives −30 + 9t + 4t − 16 = 0 and again t = 46/13.
7Where marks are lost
Using a position vector in the angle formula. The angle between two lines uses the direction vectors only. Putting a₁ and a₂ into cos θ = … measures nothing useful and scores no method mark.
Giving the obtuse angle. The angle between two lines is acute. If your cos θ is negative, take the modulus (or subtract from 180°).
Reading a Cartesian equation whose coefficients are not 1. In (2x − 1)/3 = … the direction component is 3/2, not 3, and the point has x₀ = 1/2, not 1. Set each fraction equal to λ and solve.
Sign slips reading off the point. (y + 2)/3 means y₀ = −2. The numerators are x − x₀, so the signs flip.
Testing only one or two components. A point is on a line only if one λ fits all three coordinates. Stopping after one component shows nothing; stopping after two can pass a point that is off the line.
Using the same parameter for two different lines. When finding where two paths cross, the lines need different parameters, λ and μ. Using t for both answers a different question: whether the objects collide.
Simplifying the velocity in a kinematics question. (6, 2, 3) and (12, 4, 6) give the same line but different speeds. Keep the velocity exactly as the question defines it.
Mixing up distance and speed. |v| is a speed with units per time. The distance covered in time T is T|v|, and the distance between two objects is the magnitude of their relative position, not of any velocity.
8Work it right
- For a line through two points, write the displacement vector as a line of working before the equation: it is the method mark.
- Write "r =" at the start of every vector equation. An expression with no r = is not an equation, and schemes can withhold the mark.
- Use a different letter for the parameter of each line in the same question: λ, μ, s, t.
- To test a point, solve for λ from one component and substitute into the other two, writing both checks.
- Converting Cartesian to vector form, set each fraction equal to λ and make x, y and z the subjects.
- For the angle between two lines, write the two direction vectors first, then cos θ = |b₁ · b₂| ÷ (|b₁||b₂|), then the value.
- In kinematics, name the velocity and its units, keep it unsimplified, and use one t for "collide" but two parameters for "paths cross".
- For closest approach, write the relative position as a function of t, then minimise d² (by calculus, completing the square, or the GDC minimum).
9Try it
Marks in brackets. Q1 to Q3 are Paper 1 style, no calculator. Q4 and Q5 are Paper 2 style, with a GDC.
Q1. The points A(3, −1, 2) and B(5, 3, −4) lie on the line L.
(a) Find a vector equation of L. 2 marks
(b) Write down the Cartesian equation of L. 2 marks
(c) Show that the point C(0, −7, 11) lies on L. 2 marks
Q2. The line L has Cartesian equation (x + 2)/3 = (4 − y)/2 = (2z − 1)/4. Find a vector equation of L. 4 marks
Q3. The line L₁ has equation r = (1, 0, 2) + λ(1, −1, 0) and the line L₂ has equation r = (4, 3, −1) + μ(0, 1, −1). Find the acute angle between L₁ and L₂, giving your answer in degrees. 4 marks
Q4. A helicopter's position t minutes after it takes off from its pad is given by r = (−3, 10, 0.5) + t(2, −1, 0.4), where distances are in kilometres and the z-axis is vertical.
(a) Find the speed of the helicopter in km per minute. 2 marks
(b) Find the time at which the helicopter is directly above the point (7, 5, 0), and its height at that time. 3 marks
(c) A radar station is at R(1, 2, 0). Find the least distance between the helicopter and the radar station. 4 marks
Q5. Two boats move in straight lines on a lake. Relative to a jetty, boat P's position after t minutes is rP = (2, 1) + t(3, 4) and boat Q's is rQ = (14, −8) + t(−1, 7), in units of 10 metres.
(a) Show that the boats collide, and find the time and position of the collision. 4 marks
(b) Find the speed of boat Q in metres per minute. 2 marks
10In one breath
A line in space is fixed by a point and a direction, so its vector equation is r = a + λb, with a the position vector of a known point, b a direction vector and λ a parameter that slides you along the line; any point on the line and any multiple of b give an equally correct equation. Read the vector row by row for the parametric form, x = x₀ + λl and so on, and make λ the subject of each for the Cartesian form (x − x₀)/l = (y − y₀)/m = (z − z₀)/n, reading off only when x, y and z have coefficient 1. A point is on the line only if one λ fits all three coordinates. The angle between two lines uses their direction vectors only, with cos θ = |b₁ · b₂| ÷ (|b₁||b₂|) for the acute angle. Read λ as time and the equation becomes motion: b is the velocity, |b| the speed, so never simplify it; a collision needs the same t for both objects, crossing paths need separate parameters, and the closest approach comes from minimising the length of the relative position.
Answers
Q1. (a) AB = (5 − 3, 3 − (−1), −4 − 2) = (2, 4, −6), so a direction is (1, 2, −3), and r = (3, −1, 2) + λ(1, 2, −3). M1 for finding AB or BA, A1 for a correct equation including "r =". Any point of the line and any multiple of the direction are accepted.
(b) (x − 3)/1 = (y + 1)/2 = (z − 2)/(−3), or x − 3 = (y + 1)/2 = (2 − z)/3. A1 for the correct structure with their direction, A1 for correct signs throughout. Follow-through from their (a).
(c) From x: 3 + λ = 0, so λ = −3. Then y = −1 + 2(−3) = −7 ✓ and z = 2 − 3(−3) = 11 ✓. One value of λ gives all three coordinates, so C lies on L. M1 for finding λ from one component, R1 for checking both other components and concluding. Checking only one other component scores M1 R0.
Q2. Set each fraction equal to λ: x + 2 = 3λ gives x = −2 + 3λ; 4 − y = 2λ gives y = 4 − 2λ; 2z − 1 = 4λ gives z = 1/2 + 2λ. So r = (−2, 4, 1/2) + λ(3, −2, 2). M1 for setting the expressions equal to a parameter (or equivalent rearrangement), A1 for the point (−2, 4, 1/2), A1 for the direction (3, −2, 2) or any multiple, A1 for a complete equation with "r =". A direction of (3, 2, 4) read straight off the denominators scores A0.
Q3. b₁ · b₂ = 0 − 1 + 0 = −1. |b₁| = √2 and |b₂| = √2. cos θ = |−1| ÷ (√2 × √2) = 1/2, so θ = 60°. M1 for using the two direction vectors in a scalar product, A1 for −1 (or 1), M1 for dividing by the product of their magnitudes, A1 for 60°. 120° scores A0 because the acute angle was asked for. Using the position vectors scores M0.
Q4. (a) Speed = |(2, −1, 0.4)| = √(4 + 1 + 0.16) = √5.16 = 2.27 km per minute (3 s.f.). M1 for the magnitude of the velocity vector, A1 for 2.27.
(b) Directly above (7, 5, 0) means x = 7 and y = 5. From x: −3 + 2t = 7, so t = 5. Check y: 10 − 5 = 5 ✓. Height: z = 0.5 + 0.4(5) = 2.5 km, at t = 5 minutes. M1 for equating the horizontal components, A1 for t = 5 with the y-check, A1 for 2.5 km.
(c) The vector from R to the helicopter is (−4 + 2t, 8 − t, 0.5 + 0.4t). Its squared length is d² = (2t − 4)² + (8 − t)² + (0.4t + 0.5)² = 5.16t² − 31.6t + 80.25. This is least when t = 31.6 ÷ (2 × 5.16) = 3.062…, giving d² = 31.87… and d = 5.65 km (3 s.f.). On a GDC, graph d(t) and use the minimum. M1 for the relative position vector in terms of t, M1 for an expression for d or d², M1 for minimising (calculus, vertex or GDC), A1 for 5.65 km.
Q5. (a) Same time, same place: x: 2 + 3t = 14 − t gives t = 3; y: 1 + 4t = −8 + 7t gives t = 3. The same t satisfies both, so the boats collide, at t = 3 minutes, at r = (2 + 9, 1 + 12) = (11, 13), which is 110 m and 130 m from the jetty along the two axes. M1 for equating the two position vectors with the same t, A1 for t = 3 from one component, R1 for showing the other component gives the same t, A1 for (11, 13).
(b) |(−1, 7)| = √50 = 7.07 units per minute, and one unit is 10 m, so the speed is 70.7 m per minute (3 s.f.). M1 for the magnitude of Q's velocity, A1 for 70.7 m per minute. 7.07 with no conversion scores M1 A0.
Educerie · written from the published IB Diploma Programme Mathematics: analysis and approaches guide, first assessment 2021, section 3.14 Vector equation of a line. Original text, examples and questions. Diagrams drawn by Educerie. Last reviewed 25 September 2026.