Three-Dimensional Geometry • Topic 2 of 4

Equation of a Line in Space

A straight line in space is completely fixed by two pieces of information: one point on it and one direction along it. Both the vector and the Cartesian descriptions are just two ways of writing that single idea.

Vector form

Let $\vec a$ be the position vector of a known point $A$ on the line and let $\vec b$ be any vector along the line (a direction vector). A point with position vector $\vec r$ lies on the line exactly when $\vec r-\vec a$ is parallel to $\vec b$, i.e. $\vec r-\vec a=\lambda\vec b$ for some scalar $\lambda$. Rearranged:

$$\vec r=\vec a+\lambda\,\vec b,\qquad \lambda\in\mathbb{R}.$$

As the parameter $\lambda$ runs over all real numbers, $\vec r$ sweeps out the whole line. The same line has many valid equations — any point on it can play the role of $\vec a$, and any non-zero multiple of $\vec b$ can play the role of $\vec b$.

Cartesian (symmetric) form

Write $\vec a=x_1\hat i+y_1\hat j+z_1\hat k$ and $\vec b=a\hat i+b\hat j+c\hat k$, so $(a,b,c)$ are direction ratios. Equating components of $\vec r=\vec a+\lambda\vec b$ and eliminating $\lambda$ gives the symmetric form:

$$\dfrac{x-x_1}{a}=\dfrac{y-y_1}{b}=\dfrac{z-z_1}{c}.$$

This says the same thing three times over: each ratio equals $\lambda$. Reading it backwards is a key skill — the numbers subtracted in the numerators give a point $(x_1,y_1,z_1)$ on the line, and the denominators are direction ratios $(a,b,c)$.

A warning about zero denominators: if, say, $c=0$ the symbol $\dfrac{z-z_1}{0}$ is shorthand for the condition $z=z_1$ (the line is parallel to the $xy$-plane). You never actually divide by zero — that fraction is read as "$z-z_1=0$".

Using direction cosines

If instead the direction cosines $(l,m,n)$ are used, the form becomes $\dfrac{x-x_1}{l}=\dfrac{y-y_1}{m}=\dfrac{z-z_1}{n}=r$, where the common value $r$ is then the actual signed distance of the point $(x,y,z)$ from $(x_1,y_1,z_1)$ along the line.

Line through two points

Given two points $A(x_1,y_1,z_1)$ and $B(x_2,y_2,z_2)$, take $\vec a$ as $A$ and $\vec b=\vec{AB}=\vec b_2-\vec b_1$. In vector form $\vec r=\vec a+\lambda(\vec b_2-\vec b_1)$, and in Cartesian form:

$$\dfrac{x-x_1}{x_2-x_1}=\dfrac{y-y_1}{y_2-y_1}=\dfrac{z-z_1}{z_2-z_1}.$$

Converting between the forms

The two forms are interchangeable. Vector to Cartesian: read off the point from $\vec a$ and the DRs from $\vec b$, then slot them into the symmetric form. Cartesian to vector: read off the point and the DRs, then write $\vec r=(x_1\hat i+y_1\hat j+z_1\hat k)+\lambda(a\hat i+b\hat j+c\hat k)$.

Deeper Insight — "point plus direction" is the whole story. Both forms encode the same two ingredients, so most mistakes come from mixing up which number is a coordinate and which is a direction ratio. A reliable habit: whenever you see a line, immediately extract its $(\text{point},\ \text{DRs})$ pair, and whenever you must write a line, decide those two things first. Parallelism is then trivial — two lines are parallel iff they share direction ratios (one set is a multiple of the other) — and a point lies on a line iff substituting its coordinates makes all three ratios equal. Almost every line problem in the chapter is an application of this single pair.

A 3D axis frame with a line through a fixed point A with position vector a, running in the direction of vector b; the line has vector equation r equals a plus lambda b. Line in Space: r = a + λb x y z O a A b r b = direction vector (gives direction ratios) A point r lies on the line iff r − a = λb
1
Worked Example
Write the vector equation of the line through $(1,0,2)$ with direction $\hat i+\hat j-\hat k$.
Solution
  1. Point: $\vec a=\hat i+0\hat j+2\hat k=\hat i+2\hat k$.
  2. Direction: $\vec b=\hat i+\hat j-\hat k$.
  3. Apply $\vec r=\vec a+\lambda\vec b$.

Answer: $\vec r=(\hat i+2\hat k)+\lambda(\hat i+\hat j-\hat k).$

2
Worked Example
Write the Cartesian equation of the line through $(2,-1,3)$ with DRs $1,2,2$.
Solution
  1. Point $(x_1,y_1,z_1)=(2,-1,3)$, DRs $(a,b,c)=(1,2,2)$.
  2. Substitute into the symmetric form, taking care with the sign of $-1$.

Answer: $\dfrac{x-2}{1}=\dfrac{y+1}{2}=\dfrac{z-3}{2}.$

3
Worked Example
Find the Cartesian equation of the line through $(1,2,3)$ and $(2,4,5)$.
Solution
  1. DRs $=(2-1,\ 4-2,\ 5-3)=(1,2,2)$.
  2. Use the point $(1,2,3)$ in the symmetric form.

Answer: $\dfrac{x-1}{1}=\dfrac{y-2}{2}=\dfrac{z-3}{2}.$

4
Worked Example
From $\dfrac{x-1}{2}=\dfrac{y+3}{-1}=\dfrac{z}{4}$, read a point and the direction ratios.
Solution
  1. Set each numerator to zero: $x=1,\ y=-3,\ z=0$ gives a point.
  2. The denominators are the DRs.

Answer: Point $(1,-3,0)$; direction ratios $(2,-1,4)$.

5
Worked Example
Find the vector and Cartesian equations of the line through $(2,-1,1)$ and $(4,1,3)$.
Solution
  1. DRs $=(4-2,\ 1-(-1),\ 3-1)=(2,2,2)$, simplify to $(1,1,1)$.
  2. Vector form with point $\vec a=2\hat i-\hat j+\hat k$.
  3. Cartesian form with the same point and DRs.

Answer: $\vec r=(2\hat i-\hat j+\hat k)+\lambda(\hat i+\hat j+\hat k)$;   $\dfrac{x-2}{1}=\dfrac{y+1}{1}=\dfrac{z-1}{1}.$

6
Worked Example
Convert $\vec r=(\hat i+\hat j)+\lambda(2\hat i-\hat j+\hat k)$ to Cartesian form.
Solution
  1. Point from $\vec a$: $(1,1,0)$.
  2. DRs from $\vec b$: $(2,-1,1)$.
  3. Substitute.

Answer: $\dfrac{x-1}{2}=\dfrac{y-1}{-1}=\dfrac{z}{1}.$

7
Worked Example
Find the Cartesian equation of the line through the origin with direction ratios $3,-1,2$.
Solution
  1. Point is $(0,0,0)$, so the subtracted constants vanish.
  2. Use DRs $(3,-1,2)$.

Answer: $\dfrac{x}{3}=\dfrac{y}{-1}=\dfrac{z}{2}.$

8
Worked Example
Find the vector and Cartesian equations of the line through $(1,2,3)$ parallel to $\dfrac{x}{2}=\dfrac{y}{3}=\dfrac{z}{6}$.
Solution
  1. Parallel lines share direction ratios, so $\vec b=(2,3,6)$.
  2. Use the given point $(1,2,3)$ for $\vec a$.
  3. Write both forms.

Answer: $\vec r=(\hat i+2\hat j+3\hat k)+\lambda(2\hat i+3\hat j+6\hat k)$;   $\dfrac{x-1}{2}=\dfrac{y-2}{3}=\dfrac{z-3}{6}.$

9
Worked Example
Does the point $(3,2,1)$ lie on the line $\dfrac{x-1}{2}=\dfrac{y+1}{3}=\dfrac{z}{1}$?
Solution
  1. Substitute the coordinates and evaluate each ratio.
  2. $\dfrac{3-1}{2}=1$, $\dfrac{2+1}{3}=1$, $\dfrac{1}{1}=1$.
  3. All three are equal (to $\lambda=1$).

Answer: Yes — all three ratios equal $1$, so the point lies on the line.

10
Worked Example
Find the coordinates of the point on $\dfrac{x-1}{2}=\dfrac{y+1}{3}=\dfrac{z}{1}$ at parameter $\lambda=2$.
Solution
  1. Set each ratio equal to $\lambda=2$.
  2. $x-1=2(2)=4\Rightarrow x=5$.
  3. $y+1=3(2)=6\Rightarrow y=5$.
  4. $z=1(2)=2$.

Answer: The point is $(5,5,2)$.

11
Worked Example
Write the equation of the line through $(0,1,-2)$ parallel to the $z$-axis.
Solution
  1. The $z$-axis has direction ratios $(0,0,1)$.
  2. Two denominators are zero, read as $x=0$ and $y=1$; only $z$ varies.

Answer: $\vec r=(\hat j-2\hat k)+\lambda\hat k$, i.e. $x=0,\ y=1$ with $z$ free.

Key Points

  • A line is fixed by one point and one direction; both equation forms encode exactly this pair.
  • Vector form: $\vec r=\vec a+\lambda\vec b$ (point $\vec a$, direction $\vec b$); the parameter $\lambda$ traces the whole line.
  • Cartesian (symmetric) form: $\dfrac{x-x_1}{a}=\dfrac{y-y_1}{b}=\dfrac{z-z_1}{c}$.
  • Read a Cartesian line backwards: denominators are the direction ratios, subtracted constants give a point.
  • A zero denominator is shorthand for the coordinate being fixed (e.g. $\dfrac{z-z_1}{0}$ means $z=z_1$) — never an actual division.
  • Two-point line: DRs are the coordinate differences; substitute into either form.
  • Convert vector to Cartesian (and back) by extracting the point from $\vec a$ and the DRs from $\vec b$.
  • A point lies on a line iff substituting its coordinates makes all three Cartesian ratios equal.
Tap an option to check your answer0 / 4
Q1.The vector equation of a line is:
Explanation: Point plus scalar multiple of direction.
Q2.In $\dfrac{x-1}{2}=\dfrac{y+3}{-1}=\dfrac{z}{4}$, the direction ratios are:
Explanation: Denominators give the DRs.
Q3.A point on $\dfrac{x-1}{2}=\dfrac{y+3}{-1}=\dfrac{z}{4}$ is:
Explanation: Set each numerator to zero.
Q4.Line through $(1,2,3),(2,4,5)$ has DRs:
Explanation: Differences $(1,2,2)$.