Chapter 11 · Three Dimensional Geometry · Topic 02

Equation of a Line
in Space

Learn to write equations of lines in 3D — both in vector form and Cartesian form, through one point or two points.

✓ Board Exam ⚡ JEE Main & Advanced 📘 NCERT Class 12
📋 Contents
01

Overview

A line in 3D space is uniquely determined by either:

  • A point on the line and a direction vector (or DRs)
  • Two points through which the line passes

For each case, we can write the equation in two equivalent forms: Vector Form and Cartesian Form.

Key Concept: The vector equation $\vec{r} = \vec{a} + \lambda\vec{b}$ says "start at point $\vec{a}$, travel $\lambda$ units along direction $\vec{b}$". Every value of $\lambda$ gives a different point on the line.
02

Vector Form — Through a Point with Given Direction

Let the line pass through a point $A$ with position vector $\vec{a}$, and be parallel to a vector $\vec{b}$. If $\vec{r}$ is the position vector of any point $P$ on the line, then $\overrightarrow{AP} = \lambda\vec{b}$ for some scalar $\lambda$.

📌 Vector Equation (Point + Direction)
$$\vec{r} = \vec{a} + \lambda\,\vec{b}, \quad \lambda \in \mathbb{R}$$

where $\vec{a}$ = position vector of a point on the line, $\vec{b}$ = direction vector

In component form: if $\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}$, then:

$$\vec{r} = (x_1\hat{i}+y_1\hat{j}+z_1\hat{k}) + \lambda(a\hat{i}+b\hat{j}+c\hat{k})$$
03

Cartesian Form — Through a Point with Given DRs

Let the line pass through $A(x_1, y_1, z_1)$ with direction ratios $(a, b, c)$. Any point $P(x,y,z)$ on the line satisfies:

📐 Cartesian Equation (Symmetric Form)
$$\frac{x - x_1}{a} = \frac{y - y_1}{b} = \frac{z - z_1}{c} = \lambda$$

$(x_1,y_1,z_1)$ is a point on the line; $(a,b,c)$ are direction ratios

Special Cases

When a line is parallel to a coordinate axis:

Line parallel toEquationMeaning
$x$-axis$\dfrac{x-x_1}{1}=\dfrac{y-y_1}{0}=\dfrac{z-z_1}{0}$$y=y_1,\ z=z_1$
$y$-axis$\dfrac{x-x_1}{0}=\dfrac{y-y_1}{1}=\dfrac{z-z_1}{0}$$x=x_1,\ z=z_1$
$z$-axis$\dfrac{x-x_1}{0}=\dfrac{y-y_1}{0}=\dfrac{z-z_1}{1}$$x=x_1,\ y=y_1$
Note: When a DR is zero (say $b=0$), we do NOT write $\frac{y-y_1}{0}$. Instead we write $y = y_1$ as a separate condition. Division by zero is undefined.
04

Vector Form — Through Two Points

If the line passes through $A$ (position vector $\vec{a}$) and $B$ (position vector $\vec{b}$), the direction is $\vec{b} - \vec{a}$:

📌 Vector Equation (Two Points)
$$\vec{r} = \vec{a} + \lambda(\vec{b} - \vec{a}), \quad \lambda \in \mathbb{R}$$

When $\lambda=0$, $\vec{r}=\vec{a}$ (point $A$). When $\lambda=1$, $\vec{r}=\vec{b}$ (point $B$).

05

Cartesian Form — Through Two Points

The line through $P(x_1,y_1,z_1)$ and $Q(x_2,y_2,z_2)$ has DRs $(x_2-x_1, y_2-y_1, z_2-z_1)$:

📐 Cartesian Equation (Two-Point Form)
$$\frac{x-x_1}{x_2-x_1} = \frac{y-y_1}{y_2-y_1} = \frac{z-z_1}{z_2-z_1}$$
06

Parametric Form

From the Cartesian equation $\dfrac{x-x_1}{a}=\dfrac{y-y_1}{b}=\dfrac{z-z_1}{c}=\lambda$, we extract coordinates:

🔢 Parametric Equations
$$x = x_1 + a\lambda, \quad y = y_1 + b\lambda, \quad z = z_1 + c\lambda$$

This is extremely useful for: finding a point on the line, checking if a point lies on the line, and finding the foot of perpendicular.

Foot of Perpendicular: To find the foot of perpendicular from point $P(x_0,y_0,z_0)$ to a line, write a general point $Q = (x_1+a\lambda, y_1+b\lambda, z_1+c\lambda)$ on the line. Then $\overrightarrow{PQ} \cdot \vec{b} = 0$. Solve for $\lambda$.
07

Complete Comparison

🔵 Vector Form

Through a point + direction:

$$\vec{r} = \vec{a} + \lambda\vec{b}$$

Through two points:

$$\vec{r} = \vec{a} + \lambda(\vec{b}-\vec{a})$$
🔷 Cartesian Form

Through a point + DRs:

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

Through two points:

$$\frac{x-x_1}{x_2-x_1}=\frac{y-y_1}{y_2-y_1}=\frac{z-z_1}{z_2-z_1}$$
Conversion tip: To convert $\vec{r}=\vec{a}+\lambda\vec{b}$ to Cartesian form — extract components of $\vec{a}$ as $(x_1,y_1,z_1)$ and $\vec{b}$ as $(a,b,c)$, then write the symmetric form.
08

Solved Examples

Board LevelExample 1 — Vector & Cartesian Equation of a Line

Find the vector and Cartesian equations of the line through $A(1, 2, -3)$ with direction ratios $3, -2, 5$.

Solution

$\vec{a} = \hat{i}+2\hat{j}-3\hat{k}$, $\vec{b} = 3\hat{i}-2\hat{j}+5\hat{k}$

Vector form:

$$\vec{r} = (\hat{i}+2\hat{j}-3\hat{k}) + \lambda(3\hat{i}-2\hat{j}+5\hat{k})$$

Cartesian form:

$$\frac{x-1}{3} = \frac{y-2}{-2} = \frac{z+3}{5}$$
Board LevelExample 2 — Line Through Two Points

Find the vector and Cartesian equations of the line through $A(2,-1,4)$ and $B(3,2,-1)$.

Solution

$\vec{a}=2\hat{i}-\hat{j}+4\hat{k}$, $\vec{b}=3\hat{i}+2\hat{j}-\hat{k}$

Direction: $\vec{b}-\vec{a} = \hat{i}+3\hat{j}-5\hat{k}$, so DRs $= (1, 3, -5)$

Vector form:

$$\vec{r} = (2\hat{i}-\hat{j}+4\hat{k}) + \lambda(\hat{i}+3\hat{j}-5\hat{k})$$

Cartesian form:

$$\frac{x-2}{1} = \frac{y+1}{3} = \frac{z-4}{-5}$$
Board LevelExample 3 — Cartesian to Vector Form

Convert the line $\dfrac{x+3}{2} = \dfrac{y-4}{1} = \dfrac{z+5}{3}$ to vector form.

Solution

Point on line: $(-3, 4, -5)$; Direction: $(2, 1, 3)$

$$\vec{r} = (-3\hat{i}+4\hat{j}-5\hat{k}) + \lambda(2\hat{i}+\hat{j}+3\hat{k})$$
JEE LevelExample 4 — Foot of Perpendicular

Find the foot of perpendicular from $P(1, 6, 3)$ to the line $\dfrac{x}{1}=\dfrac{y-1}{2}=\dfrac{z-2}{3}$.

Solution

General point on line: $Q = (\lambda,\ 1+2\lambda,\ 2+3\lambda)$

$\overrightarrow{PQ} = (\lambda-1,\ 2\lambda-5,\ 3\lambda-1)$

Direction vector $\vec{b}=(1,2,3)$. For foot of perpendicular, $\overrightarrow{PQ}\cdot\vec{b}=0$:

$$1(\lambda-1)+2(2\lambda-5)+3(3\lambda-1) = 0$$ $$\lambda - 1 + 4\lambda - 10 + 9\lambda - 3 = 0 \implies 14\lambda = 14 \implies \lambda = 1$$

Foot of perpendicular: $Q = (1,\ 3,\ 5)$

JEE LevelExample 5 — Point Lies on a Line?

Does the point $(2, 1, -1)$ lie on the line $\dfrac{x-1}{1}=\dfrac{y+1}{2}=\dfrac{z}{-1}$?

Solution

Substitute $(x,y,z)=(2,1,-1)$:

$$\frac{2-1}{1}=1,\quad \frac{1+1}{2}=1,\quad \frac{-1}{-1}=1$$

All ratios equal $1$ ✓. The point $(2,1,-1)$ lies on the line (at $\lambda=1$).

✅ Board Exam Tips
  • For vector form, always clearly write $\vec{r} = \ldots + \lambda(\ldots)$ with position vectors identified
  • When a denominator is $0$, don't write $\frac{y-y_1}{0}$; write $y=y_1$ separately (common mistake!)
  • Convert between forms: extract point and direction, then rewrite
  • Two-point form frequently appears in 5-mark questions
⚡ JEE Tips
  • Foot of perpendicular: parametrize the line, use $\overrightarrow{PQ}\cdot\vec{b}=0$
  • Image of a point in a line: find foot, then $\text{Image} = 2\times\text{Foot} - \text{Point}$
  • Check whether two lines are parallel, intersecting, or skew (next topic: 3D3)
❌ Common Mistakes
  • Using DCs instead of DRs in the denominator — any proportional values work
  • Writing $\vec{r} = \vec{a} + \lambda\vec{b}$ but using $\vec{b}$ as a point, not direction
  • In two-point form, using $P-Q$ instead of $Q-P$ — doesn't matter for line, but stay consistent
⚡ Quick Formula Sheet
Vector (pt+dir)
$\vec{r}=\vec{a}+\lambda\vec{b}$
Cartesian (pt+DRs)
$\frac{x-x_1}{a}=\frac{y-y_1}{b}=\frac{z-z_1}{c}$
Vector (2 pts)
$\vec{r}=\vec{a}+\lambda(\vec{b}-\vec{a})$
Cartesian (2 pts)
$\frac{x-x_1}{x_2-x_1}=\frac{y-y_1}{y_2-y_1}=\frac{z-z_1}{z_2-z_1}$
Parametric
$x=x_1+a\lambda,\ y=y_1+b\lambda,\ z=z_1+c\lambda$
Foot of Perp.
Find $\lambda$ from $\overrightarrow{PQ}\cdot\vec{b}=0$