HL AI · Geometry and Trigonometry

Vector equations of lines in 2D and 3D (IB Math AI HL)

Updated October 2026

Quick answer: A line is r = a + λb: a is a point on it and b is its direction. For motion with constant velocity, r = r₀ + tv, where r₀ is the starting position, v the velocity and t the time. To find where two moving objects are closest, write the vector between them in terms of t and minimise its length.

r = a + λb for a line, and r = a + tv for an object moving with constant velocity. HL AI asks where two paths meet or how close two moving objects get. (Equations of planes are AA HL only.)

Practise Vector equations of lines in 2D and 3D with AI marking

Open the full HL AI engine — every question in this unit is worked through with instant AI-graded feedback on your handwritten workings.

Practise HL AI Geometry and Trigonometry →

Key ideas

Worked example

Ship A's position is (2, 1) + t(3, 4) and ship B's position is (14, −3) + t(−1, 5), in km, t hours after noon. Show that the ships do not collide, and find the least distance between them and when it happens.

  1. Collision test: the x-coordinates are equal when 2 + 3t = 14 − t, so t = 3. The y-coordinates are equal when 1 + 4t = −3 + 5t, so t = 4. There is no single time, so the ships do not collide.
  2. Vector from A to B: (14 − t, −3 + 5t) − (2 + 3t, 1 + 4t) = (12 − 4t, t − 4).
  3. Distance squared: D = (12 − 4t)² + (t − 4)² = 17t² − 104t + 160.
  4. dD/dt = 34t − 104 = 0, so t = 52/17 ≈ 3.06 hours.
  5. D = 160 − 104² ÷ (4 × 17) = 16/17, so the least distance is √(16/17) = 4/√17 ≈ 0.970 km.

Answer: They do not collide; the least distance is 4/√17 ≈ 0.970 km, about 3.06 hours after noon (about 15:04).

Exam-style HL AI questions on this topic

Key formulas for vector equations of lines in 2D and 3D

Vector dot product
a⃗·b⃗ = |a⃗||b⃗|cos θ = a₁ b₁ + a₂ b₂ + a₃ b₃
Vector magnitude
|a⃗| = √(a₁² + a₂² + a₃²)
Angle between two vectors
cos θ = (a⃗·b⃗)/(|a⃗||b⃗|)
Vector equation of a line
r⃗ = a⃗ + t d⃗

In the notation of the IB formula booklet. All HL AI formulas · see them used in worked examples

Try it now

1 of 5

  1. Question 1 of 5
  2. Question 2 of 5
  3. Question 3 of 5
  4. Question 4 of 5
  5. Question 5 of 5

5 quick questions on vector equations of lines. No sign-in needed.

Find the acute angle between the lines \(\mathbf{r} = \begin{pmatrix}0 \\ 2 \\ 1\end{pmatrix} + \lambda\begin{pmatrix}1 \\ 1 \\ -2\end{pmatrix}\) and \(\mathbf{r} = \begin{pmatrix}2 \\ 0 \\ 3\end{pmatrix} + \mu\begin{pmatrix}-3 \\ 1 \\ 1\end{pmatrix}\).
Choose your answer · keys 1–4

Do it on your GDC

A GDC is allowed on every AI paper. Keystrokes for the TI-84 Plus CE, TI-Nspire CX II and Casio fx-CG50, with a checked worked example:

Maths IA ideas that use vector equations of lines in 2d and 3d

Related in Geometry and Trigonometry

Revise Vector equations of lines in 2D and 3D for the exam

Stretch yourself: original geometry problems at Senior level (ages 16 to 18), with hints and full solutions: Problem S76 · Problem S19 · Problem S75 · Problem S18. All 22 →

More on this topic

Sibling topic in other IB Maths courses

FAQ

How do you find the closest approach of two moving objects?

Write each position as a starting point plus t times its velocity, subtract to get the vector between them, and find the value of t that makes its length smallest. Substitute that t back in to find the least distance.

Where can I practise vector equations of lines in 2D and 3D questions?

On the Vectors and Kinematics questions page: 44 exam-style HL AI questions with full mark schemes, plus free step-by-step worked examples.

Can I use my calculator for vector equations of lines in 2D and 3D?

Yes: a GDC is allowed on every HL AI paper, so practise the calculator method as well as the working. The Vectors guide gives the keystrokes for the TI-84 Plus CE, TI-Nspire CX II and Casio fx-CG50.

What else is free here

Save your progress as you reviseA free account remembers the questions you have done on every topic and brings you back to this page.

Join free

Already have an account? Sign in