Practice Maths

Vector Equations of Lines in 3D

Key Terms

Vector form
r = a + λd, where a is a position vector of a known point on the line, d is the direction vector, and λ ∈ ℝ is the parameter.
Parametric form
x = a₁ + λd₁,   y = a₂ + λd₂,   z = a₃ + λd₃
Cartesian (symmetric) form
(x − a₁)/d₁ = (y − a₂)/d₂ = (z − a₃)/d₃ (valid when all components of d are non-zero).
Parallel lines
Two lines are parallel if their direction vectors are proportional (scalar multiples). Parallel lines with different positions do not intersect.
Intersecting lines
Solve the parametric equations simultaneously for λ and μ. Check all three equations are consistent.
Skew lines
Lines that are neither parallel nor intersecting. This can only happen in 3D (not 2D).
Distance between skew lines
d = |(ba) · (d₁ × d₂)| / |d₁ × d₂|, where a, b are points on each line and d₁, d₂ are their direction vectors.
Key Formulas:
  • Vector equation: r = a + λd
  • Parametric: x = a₁+λd₁, y = a₂+λd₂, z = a₃+λd₃
  • Cartesian: (x−a₁)/d₁ = (y−a₂)/d₂ = (z−a₃)/d₃
  • Distance between skew lines: |(ba)·(d₁×d₂)| / |d₁×d₂|
Hot Tip To test if two lines intersect: set up the parametric equations equal to each other (using parameters λ and μ), form a system of 3 equations in 2 unknowns. Solve any two equations for λ and μ, then substitute into the third to check consistency. If inconsistent, the lines are skew (assuming they are not parallel).

Worked Example 1 — Writing the equation of a line

Find the vector, parametric and Cartesian equations of the line through A = (2, −1, 3) with direction d = (1, 2, −2).

Vector:   r = (2, −1, 3) + λ(1, 2, −2)

Parametric:   x = 2 + λ,   y = −1 + 2λ,   z = 3 − 2λ

Cartesian:   (x − 2)/1 = (y + 1)/2 = (z − 3)/(−2)

Worked Example 2 — Classifying two lines

Line L₁: r = (1,0,2) + λ(1,1,−1).   Line L₂: r = (2,1,0) + μ(2,2,−2).

Direction vectors: (1,1,−1) and (2,2,−2) = 2(1,1,−1). They are proportional, so the lines are parallel.

Check if they are the same line: Is (2,1,0) on L₁? Need (2,1,0) = (1,0,2) + λ(1,1,−1), giving λ=1 from x, λ=1 from y, but z: 2−1=1≠0. Different lines, so parallel and distinct.

Deriving the Vector Equation of a Line

A line in 3D is uniquely determined by a point on it and a direction. If point A has position vector a and the line runs in direction d, then any point P on the line satisfies OP = a + λd for some real number λ. As λ varies over all reals, P traces out the entire line. The vector d is called the direction vector.

The key insight: two points A and B determine a line, with direction d = B − A (or any scalar multiple). A line through A = (a₁, a₂, a₃) and B = (b₁, b₂, b₃) has vector equation r = (a₁, a₂, a₃) + λ(b₁−a₁, b₂−a₂, b₃−a₃).

Converting Between Forms

The three forms are equivalent and can be converted:

  • From vector to parametric: write each component separately.
  • From parametric to Cartesian: solve each for λ and equate.
  • From Cartesian to vector/parametric: read off a and d directly.

If a direction component is zero (e.g. d₂ = 0), the Cartesian form cannot be written with a fraction in that component. Instead, write d₂ = 0 as a separate equation: y = a₂. Then write the remaining ratios as (x−a₁)/d₁ = (z−a₃)/d₃.

Classifying Pairs of Lines in 3D

Given two lines L₁: r = a + λd₁ and L₂: r = b + μd₂:

  • Parallel: d₁ = kd₂ for some scalar k, and the lines have different positions.
  • Identical: d₁ = kd₂ and a point of one lies on the other.
  • Intersecting: Not parallel, and there exist λ, μ satisfying a + λd₁ = b + μd₂.
  • Skew: Not parallel, and no λ, μ satisfy the simultaneous equations. Skew lines can only exist in 3D — in 2D any two non-parallel lines must intersect.

Distance Between Skew Lines

The shortest distance between skew lines L₁ and L₂ is measured along the unique common perpendicular. If n = d₁ × d₂ is the cross product of the direction vectors, then n is perpendicular to both lines. The distance is the length of the projection of ba onto n:

d = |(ba) · n| / |n|

where a is a point on L₁ and b is a point on L₂.

Exam Tip: When testing for intersection, always check your solution in the third equation — the system is overdetermined (3 equations, 2 unknowns), and the third equation is the consistency check.
Exam Tip: The direction vector of a line is not unique — any non-zero scalar multiple gives the same line. Always simplify your direction vector (e.g. reduce (2, 4, −6) to (1, 2, −3)) for cleaner working.

Mastery Practice

  1. Write the vector equation of the line passing through the given point with the given direction. Fluency

    1. (a) Point (1, 2, 3), direction (2, −1, 4)
    2. (b) Point (0, −1, 5), direction (1, 3, −2)
  2. Write the parametric equations for the line through A = (3, 0, −2) and B = (1, 4, 1). Fluency

  3. Convert to Cartesian (symmetric) form: r = (2, −3, 1) + λ(3, 2, −1). Fluency

  4. Determine whether the point P lies on the given line. Fluency

    1. (a) P = (5, −1, 7), line r = (1, 3, −1) + λ(2, −2, 4)
    2. (b) P = (3, 2, 0), line r = (1, 1, 2) + λ(1, 0, −1)
  5. Find the point of intersection of the lines L₁: r = (1, 2, 0) + λ(1, −1, 2) and L₂: r = (3, 0, 4) + μ(−1, 1, 0). Understanding

  6. Classify each pair of lines as parallel, intersecting, or skew. Understanding

    1. (a) L₁: r = (0,1,2)+λ(1,2,1),   L₂: r = (1,3,4)+μ(2,4,2)
    2. (b) L₁: r = (1,0,0)+λ(1,1,0),   L₂: r = (0,1,1)+μ(1,0,1)
  7. Find the distance between the skew lines L₁: r = (1,0,0)+λ(1,1,0) and L₂: r = (0,1,0)+μ(0,1,1). Understanding

  8. A line passes through P = (2, −1, 4) and Q = (5, 3, −2). Find: (a) the vector equation, (b) whether the point R = (8, 7, −8) lies on the line. Understanding

  9. Find the distance between the skew lines L₁: r = (0,0,0)+λ(1,0,1) and L₂: r = (1,1,0)+μ(0,1,1). Problem Solving

  10. Two aircraft fly along the paths L₁: r = (10, 0, 5) + λ(2, 1, −1) and L₂: r = (0, 5, 7) + μ(1, −1, 0) (distances in km). Show that the flight paths are skew, and find the minimum distance between the paths. Problem Solving