- The vector equation of a line is \( \mathbf{r} = \mathbf{a} + \lambda\mathbf{d} \): start at a point \( \mathbf{a} \) and move any multiple \( \lambda \) of a direction vector \( \mathbf{d} \).
- Two lines in 3D can be parallel, intersecting or skew (not parallel and never meeting). Check the directions first, then solve for the parameters.
- To test for intersection, set the two position vectors equal, solve two of the three component equations, and check the third. If it fails, the lines are skew.
- The angle between two lines comes from their direction vectors: \( \cos\theta = \dfrac{|\mathbf{d}_1 \cdot \mathbf{d}_2|}{|\mathbf{d}_1||\mathbf{d}_2|} \).
- Exam point: this is Cambridge 9709 Paper 3 and IB AA HL content. Always show the third-equation check.
The case: do the delivery drones’ paths cross?
A town is testing parcel-delivery drones. Each drone flies in a straight line at a steady velocity. Air-traffic software tracks them with coordinates in metres from the depot: \( x \) east, \( y \) north and \( z \) up. Time \( t \) is in seconds after the drones are launched.
- Drone A starts above the depot at \( (0, 0, 30) \) and flies level with velocity \( (4, 3, 0) \) m/s.
- Drone B starts on a rooftop pad at \( (160, 10, 0) \) and climbs with velocity \( (-2, 4, 1.5) \) m/s.
- Drone C starts at \( (0, 120, 60) \) and descends with velocity \( (2, -1, -1) \) m/s.
The safety officer asks three questions. Do the flight paths of A and B cross, and if so where? At what angle? And does the A path cross C’s path, or do they only look as if they cross on the map? The scenario and numbers are illustrative, but this is exactly the geometry that conflict-detection systems for aircraft rely on.
The concept: a point plus a direction
In two dimensions a line is fixed by a point and a gradient. In three dimensions there is no single gradient, so we use a direction vector instead. Pick a point on the line, with position vector \( \mathbf{a} \). Every other point is reached by moving from \( \mathbf{a} \) some distance along the direction \( \mathbf{d} \): a positive multiple goes forwards, a negative multiple backwards. Letting the multiple \( \lambda \) range over all real numbers sweeps out the whole line.
For a drone this is natural. If \( \mathbf{a} \) is its starting position and \( \mathbf{d} \) is its velocity, then its position after \( t \) seconds is \( \mathbf{a} + t\mathbf{d} \). The parameter is simply time.
In 3D, two lines that are not parallel need not meet. One can pass over the other, like a road bridge over a railway. Such lines are called skew, and they are the reason intersection must be checked rather than assumed.
The formula
The vector equation of a line through the point with position vector \( \mathbf{a} \) in the direction \( \mathbf{d} \) is[1]
Here \( \mathbf{r} \) is the position vector of a general point on the line, \( \mathbf{a} \) is a fixed point on it, \( \mathbf{d} \) is any non-zero vector along it, and \( \lambda \) is a real parameter. The angle \( \theta \) between two lines is the angle between their direction vectors, from the scalar (dot) product[4]:
where \( \mathbf{d}_1 \cdot \mathbf{d}_2 = x_1x_2 + y_1y_2 + z_1z_2 \) and \( |\mathbf{d}| = \sqrt{x^2 + y^2 + z^2} \). The modulus on top gives the acute angle, which is the usual convention for the angle between two lines.
Why this form, and when to be careful
The vector form suits the drones because their motion is a starting point plus time multiplied by a velocity. A Cartesian equation such as \( y = mx + c \) cannot describe a line in 3D on its own, and it hides the direction, which is what both the angle and the parallel test need.
Two cautions. First, the same line has many vector equations: any point on it can be \( \mathbf{a} \), and any multiple of \( \mathbf{d} \) can be the direction. So \( (4, 3, 0) \) and \( (8, 6, 0) \) describe the same direction. Second, when testing whether two lines meet, use different parameters for each line. Using the same letter for both silently assumes the drones arrive at the same moment, which is a different question (a collision, not a crossing).
Setting it up
Write each path with its own parameter. Here the parameter is time, but each drone has its own clock reading at the crossing point, so call them \( s \) for A and \( t \) for B:
The routine for any pair of lines is:
- Parallel? Is one direction a multiple of the other? \( (-2, 4, 1.5) \) is not a multiple of \( (4, 3, 0) \), so A and B are not parallel.
- Equate components: \( x \), \( y \) and \( z \) give three equations in two unknowns.
- Solve two, choosing the easiest pair.
- Check the third. If it holds, the lines intersect; substitute back to find the point. If it fails, the lines are skew.
Solving it
Show that the paths of drones A and B intersect, find the crossing point, and find the acute angle between the paths.
The paths cross at \( (120, 90, 30) \), 30 m up, at about 80°, close to a right angle. But A gets there at \( s = 30 \) s and B at \( t = 20 \) s, so the drones are never there together.
How close do they actually get at a shared time? At \( t = 20 \) s, B is at the crossing point \( (120, 90, 30) \), while A is at \( (80, 60, 30) \). Their separation is \( \sqrt{40^2 + 30^2 + 0^2} = 50 \) m. Paths that cross are a warning, not a collision: the timing matters too.
Drone C follows \( \mathbf{r}_C = (0, 120, 60) + u(2, -1, -1) \). Show that the paths of A and C are skew, and find the angle between them.
On the map the two paths cross, but in 3D they do not. Solving only the \( x \) and \( y \) equations gives \( s = 24 \), \( u = 48 \), the point \( (96, 72) \) in plan. There A is at 30 m and C at \( 60-48 = 12 \) m, so C passes 18 m below A’s path. Skew lines still have an angle between them: the angle between their directions.
(Exam style.) Line \( l \) has equation \( \mathbf{r} = (1, -2, 4) + \lambda(2, 3, -2) \) and line \( m \) has equation \( \mathbf{r} = (4, 5, -2) + \mu(1, -1, 2) \). Show that \( l \) and \( m \) intersect, find the point of intersection, and find the acute angle between them.
Without the modulus you would get \( 119.7^\circ \), the obtuse angle between the directions. The acute angle between the lines is \( 180^\circ-119.7^\circ = 60.3^\circ \).
What the answers tell us
Crossing is not colliding. The A–B paths intersect, but the drones arrive 10 seconds apart and are 50 m apart at the moment B passes the crossing. A real system would compute the closest distance at the same time, which needs one more step (minimising the distance between \( \mathbf{r}_A(t) \) and \( \mathbf{r}_B(t) \)). The geometry of the paths is still the first filter: lines that are skew and far apart need no further checks.
Reasonableness. The crossing point \( (120, 90, 30) \) is at A’s cruising height of 30 m, as it must be, since A flies level. B climbs at 1.5 m/s, so it takes 20 s to reach 30 m, matching \( t = 20 \). The speeds also make sense for small drones: \( |\mathbf{d}_A| = 5 \) m/s and \( |\mathbf{d}_B| \approx 4.7 \) m/s.
Sensitivity. Small changes decide between “intersecting” and “skew”. If B started at \( (160, 12, 0) \) instead of \( (160, 10, 0) \), the \( y \) check would give \( 90 \) against \( 92 \), and the paths would miss by a small margin. That is why the third-equation check matters: two equations can always be solved, and only the third tells you whether the lines really meet.
For the full chapter on vectors, including the foot of a perpendicular and the shortest distance from a point to a line, see the Mathematics Made Simple textbook.
Practice questions
Try each one before opening the answer. More vector questions, each with a full solution, are in the Mathematics Made Simple practice questions book.
EasyQ1. Find a vector equation of the line through \( A(2, -1, 5) \) and \( B(6, 1, 2) \), and show that \( (10, 3, -1) \) lies on it. Show worked answer
\( \mathbf{r} = (2, -1, 5) + \lambda(4, 2, -3) \).
With \( \lambda = 2 \): \( (2 + 8, -1 + 4, 5-6) = (10, 3, -1) \), so the point is on the line.
EasyQ2. Find the acute angle between lines with directions \( (1, 2, 2) \) and \( (2, -1, 2) \). Show worked answer
Magnitudes: \( \sqrt{1 + 4 + 4} = 3 \) and \( \sqrt{4 + 1 + 4} = 3 \).
\( \cos\theta = \dfrac{4}{9} \), so \( \theta \approx 63.6^\circ \).
MediumQ3. Lines \( l_1: \mathbf{r} = (1, 0, 2) + s(1, -1, 3) \) and \( l_2: \mathbf{r} = (2, 3, 1) + t(2, -2, 6) \). Are they the same line, parallel, intersecting or skew? Show worked answer
Same line? The vector between the given points is \( (2, 3, 1)-(1, 0, 2) = (1, 3, -1) \), which is not a multiple of \( (1, -1, 3) \).
So \( (2, 3, 1) \) is not on \( l_1 \): the lines are parallel and distinct.
MediumQ4. Show that \( \mathbf{r} = (0, 1, 2) + s(1, 2, -1) \) and \( \mathbf{r} = (3, 0, -1) + t(1, 1, 2) \) are skew. Show worked answer
Equate \( x \): \( s = 3 + t \). Equate \( y \): \( 1 + 2s = t \).
Substitute: \( 1 + 6 + 2t = t \), so \( t = -7 \) and \( s = -4 \).
Check \( z \): left \( 2-(-4) = 6 \), right \( -1 + 2(-7) = -15 \). Not equal, so the lines do not meet and are skew.
ExamQ5. Points \( A(2, 0, 1) \) and \( B(4, 3, -1) \) lie on line \( l \). Line \( m \) has equation \( \mathbf{r} = (1, 9, 5) + \mu(1, -2, -2) \). (a) Find a vector equation of \( l \). [2] (b) Show that \( l \) and \( m \) intersect, and find the point of intersection. [4] (c) Show that \( l \) and \( m \) are perpendicular. [2] Show worked answer
(b) \( 2 + 2\lambda = 1 + \mu \), \( 3\lambda = 9-2\mu \), \( 1-2\lambda = 5-2\mu \) [1]. From the first, \( \mu = 1 + 2\lambda \); then \( 3\lambda = 9-2-4\lambda \), so \( \lambda = 1 \), \( \mu = 3 \) [1]. Check: \( 1-2 = -1 \) and \( 5-6 = -1 \), equal [1]. Point: \( (4, 3, -1) \), which is \( B \) [1].
(c) \( (2, 3, -2) \cdot (1, -2, -2) = 2-6 + 4 = 0 \) [1]. A zero scalar product means the directions are perpendicular, so the lines are perpendicular [1].
Frequently asked questions
What is the vector equation of a line?
It is \( \mathbf{r} = \mathbf{a} + \lambda\mathbf{d} \), where \( \mathbf{a} \) is the position vector of a known point on the line and \( \mathbf{d} \) is a direction vector. Each value of the parameter \( \lambda \) gives one point on the line.
How do I tell if two lines in 3D are skew?
First check they are not parallel (the directions are not multiples of each other). Then equate the position vectors with different parameters, solve two of the component equations and test the third. If the third fails, the lines never meet and are skew.
Why use the direction vectors to find the angle?
The angle between two lines depends only on which way they point, not on where they are. That is why the same formula works for intersecting lines and for skew lines.
Do intersecting paths mean two moving objects collide?
No. Intersecting paths only mean the routes share a point. A collision also needs both objects to be at that point at the same time, so you must compare the parameter values when the parameter is time.
References
- Strang, G. and Herman, E. (2016) Calculus Volume 3, section 2.5 “Equations of Lines and Planes in Space”. Houston, TX: OpenStax. https://openstax.org/details/books/calculus-volume-3
- Cambridge University Press & Assessment. Cambridge International AS & A Level Mathematics 9709: Syllabus for examination in 2026 and 2027. cambridgeinternational.org
- International Baccalaureate Organization (2019) Mathematics: analysis and approaches guide (first assessment 2021). Geneva: IBO.
- Strang, G. and Herman, E. (2016) Calculus Volume 3, section 2.3 “The Dot Product”. Houston, TX: OpenStax. https://openstax.org/details/books/calculus-volume-3

