In short

A line in 3D is determined by a point it passes through and a direction it follows. The vector form \vec{r} = \vec{a} + \lambda\vec{b} captures both in one equation. Splitting into components gives the Cartesian (symmetric) form \frac{x - x_1}{a} = \frac{y - y_1}{b} = \frac{z - z_1}{c}. Both are shorthand for three parametric equations that let you trace every point on the line by varying a single parameter.

In two dimensions, a line is pinned down by a single equation: y = mx + c, or ax + by + c = 0. One equation, two unknowns, one degree of freedom — that is a line.

In three dimensions, something changes. You have three coordinates (x, y, z), and a single equation like x + y + z = 6 does not define a line — it defines a plane. To cut down from a 3D space to a 1D line, you need two equations, not one.

But there is a more natural way to think about a line that avoids needing two simultaneous equations. Instead of describing a line as the intersection of two surfaces, describe it the way you would actually draw it: pick a point, pick a direction, and walk.

That is the fundamental idea behind all three forms of the equation of a line in 3D. You give a starting point and a direction, and the equation traces out every point you visit as you walk along that direction — forward and backward, forever.

What you need: a point and a direction

To specify a line in 2D, a slope and a point were enough. In 3D, a "slope" is not a single number — a line can tilt in three independent directions at once. So instead of a slope, you need a direction vector or a set of direction ratios.

A line in 3D is uniquely determined by:

  1. A point it passes through: P_0 = (x_1, y_1, z_1)
  2. A direction: given by direction ratios (a, b, c), or equivalently a vector \vec{b} = a\hat{i} + b\hat{j} + c\hat{k}
A line in 3D defined by a point and a direction vector A line passes through a point P-naught. A direction vector b is shown along the line. A general point P on the line is reached by adding a scalar multiple of b to the position vector of P-naught. z y x P₀ P λb⃗ a⃗ r⃗ = a⃗ + λb⃗ L O
A line $L$ in 3D passes through a known point $P_0$ with position vector $\vec{a}$. Any other point $P$ on the line has position vector $\vec{r} = \vec{a} + \lambda\vec{b}$, where $\vec{b}$ is the direction vector and $\lambda$ is a real number. Varying $\lambda$ traces out the entire line.

Given these two pieces of information, you can write the equation of the line in three equivalent ways. Each has its own advantages.

Vector form

Let the position vector of the known point P_0 be \vec{a} = x_1\hat{i} + y_1\hat{j} + z_1\hat{k}, and let the direction vector be \vec{b} = a\hat{i} + b\hat{j} + c\hat{k}.

A general point P lies on the line if and only if the vector from P_0 to P is parallel to \vec{b}. Two vectors are parallel when one is a scalar multiple of the other. So \vec{P_0P} = \lambda\vec{b} for some real number \lambda.

If \vec{r} is the position vector of P, then \vec{P_0P} = \vec{r} - \vec{a}. The condition becomes:

\vec{r} - \vec{a} = \lambda\vec{b}

Rearranging:

Vector form of a line

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

where \vec{a} is the position vector of a known point on the line, \vec{b} is the direction vector, and \lambda is a real parameter.

Reading it. Start at \vec{a} (the known point). Add \lambda copies of \vec{b} (the direction). When \lambda = 0, you are at P_0 itself. When \lambda = 1, you have moved one full direction-vector length forward. When \lambda = -1, you have moved one full length backward. As \lambda ranges over all real numbers, you trace out every point on the line.

This is the most compact form. It is one equation, it works in any number of dimensions, and it encodes the geometric idea directly: a line is a point plus a direction.

Cartesian (symmetric) form

The vector equation \vec{r} = \vec{a} + \lambda\vec{b} is really three equations hiding inside one. Write \vec{r} = x\hat{i} + y\hat{j} + z\hat{k} and expand:

x\hat{i} + y\hat{j} + z\hat{k} = (x_1 + \lambda a)\hat{i} + (y_1 + \lambda b)\hat{j} + (z_1 + \lambda c)\hat{k}

Match components:

x = x_1 + \lambda a, \quad y = y_1 + \lambda b, \quad z = z_1 + \lambda c

Solve each for \lambda:

\lambda = \frac{x - x_1}{a}, \quad \lambda = \frac{y - y_1}{b}, \quad \lambda = \frac{z - z_1}{c}

Since all three expressions equal the same \lambda, set them equal to each other:

Cartesian (symmetric) form of a line

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

where (x_1, y_1, z_1) is a known point and (a, b, c) are direction ratios.

This is called the symmetric form because all three variables appear in the same way — each coordinate minus its reference value, divided by the corresponding direction ratio.

What if a direction ratio is zero? If, say, a = 0, then the line has no component in the x-direction — it lies in a plane parallel to the yz-plane, with x constant. In this case, the symmetric form is written as

x = x_1, \quad \frac{y - y_1}{b} = \frac{z - z_1}{c}

You cannot divide by zero, so you separate the zero-ratio coordinate into its own equation. This is not a special case of the algebra — it is the algebra telling you something geometric: the line does not move in that direction, so the coordinate is fixed.

Similarly, if two direction ratios are zero, say b = c = 0, the line is parallel to the x-axis, and the equations become y = y_1, z = z_1 — the line is the intersection of two planes.

Parametric form

Go back to the three component equations before you eliminated \lambda:

Parametric form of a line

x = x_1 + \lambda a, \quad y = y_1 + \lambda b, \quad z = z_1 + \lambda c

where \lambda \in \mathbb{R} is the parameter.

This is the most computational form. Given any value of \lambda, you can immediately read off the coordinates of the corresponding point. It is especially useful for:

The three forms are not three different things. They are three notations for the same line. The vector form is the most elegant. The symmetric form is the most common in Indian textbooks and JEE problems. The parametric form is the most useful for computation. You should be able to move between them without thinking.

The three equivalent forms of a line equation A diagram showing three boxes labelled Vector, Symmetric, and Parametric, connected by double-headed arrows to show they are equivalent representations of the same line. Vector r = a + λb most compact Symmetric (x−x₁)/a = (y−y₁)/b = (z−z₁)/c most tested Parametric x = x₁ + λa, ... most computational
The three forms of the equation of a line are interchangeable. The vector form is the most compact, the symmetric form is the most commonly tested in Indian exams, and the parametric form is the most useful for computation.

A line through two points

Often you are not given a direction vector — you are given two points P_1(x_1, y_1, z_1) and P_2(x_2, y_2, z_2) and asked to write the equation of the line through both.

The direction vector is simply \vec{P_1P_2} = (x_2 - x_1)\hat{i} + (y_2 - y_1)\hat{j} + (z_2 - z_1)\hat{k}. The direction ratios are the coordinate differences: (x_2 - x_1, \; y_2 - y_1, \; z_2 - z_1).

Use either point as the "known point" — the resulting line is the same. In symmetric 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}

In vector form:

\vec{r} = \vec{a_1} + \lambda(\vec{a_2} - \vec{a_1})

where \vec{a_1} and \vec{a_2} are the position vectors of the two points.

Reading this. When \lambda = 0, \vec{r} = \vec{a_1} — you are at P_1. When \lambda = 1, \vec{r} = \vec{a_2} — you are at P_2. For 0 < \lambda < 1, you are between them. For \lambda > 1, you have gone past P_2. For \lambda < 0, you are on the other side of P_1. The parameter \lambda locates you on the line like a ruler.

The parameter lambda acts as a ruler along the line A horizontal line with points marked at lambda equals negative 1, 0, 0.5, 1, and 2. The point P1 is at lambda equals 0 and P2 is at lambda equals 1. The segment between them is highlighted. λ = −1 P₁ λ = 0 0.5 P₂ λ = 1 λ = 2
The parameter $\lambda$ acts as a ruler: $\lambda = 0$ is at $P_1$, $\lambda = 1$ is at $P_2$, and the entire real number line of $\lambda$ values traces out the entire line through both points.

Computing one from start to finish

Example 1: Writing the equation of a line

Write the equation of the line passing through P_0 = (2, -1, 3) with direction ratios (3, 4, -2) in all three forms.

Step 1. Write the vector form.

\vec{a} = 2\hat{i} - \hat{j} + 3\hat{k}, \quad \vec{b} = 3\hat{i} + 4\hat{j} - 2\hat{k}
\vec{r} = (2\hat{i} - \hat{j} + 3\hat{k}) + \lambda(3\hat{i} + 4\hat{j} - 2\hat{k})

Why: the vector form directly encodes "start at P_0 and walk in direction \vec{b}."

Step 2. Write the Cartesian (symmetric) form by matching the pattern \dfrac{x - x_1}{a} = \dfrac{y - y_1}{b} = \dfrac{z - z_1}{c}.

\frac{x - 2}{3} = \frac{y + 1}{4} = \frac{z - 3}{-2}

Why: note that "y + 1" is "y - (-1)". The signs in the numerator must match the coordinates of P_0.

Step 3. Write the parametric form.

x = 2 + 3\lambda, \quad y = -1 + 4\lambda, \quad z = 3 - 2\lambda

Why: this is the same information, split into three separate equations. Given any \lambda, you can compute the point.

Step 4. Verify by finding a second point. Set \lambda = 1: P_1 = (5, 3, 1). Check this in the symmetric form: \dfrac{5 - 2}{3} = 1, \dfrac{3 + 1}{4} = 1, \dfrac{1 - 3}{-2} = 1. All three equal 1. Confirmed.

Result: The line is \vec{r} = (2\hat{i} - \hat{j} + 3\hat{k}) + \lambda(3\hat{i} + 4\hat{j} - 2\hat{k}), or equivalently \dfrac{x - 2}{3} = \dfrac{y + 1}{4} = \dfrac{z - 3}{-2}.

A projection of the line onto the $x$-$z$ plane (horizontal axis is $x$, vertical axis is $z$). The point $P_0 = (2, 3)$ in this projection corresponds to $(x, z) = (2, 3)$. At $\lambda = 1$ the line reaches $(5, 1)$, and at $\lambda = -1$ it reaches $(-1, 5)$. The line descends in $z$ as $x$ increases, consistent with the direction ratio $c = -2$.

The three forms say the same thing in different languages. The vector form is one line, the symmetric form is a compact chain of equalities, and the parametric form is three separate coordinate recipes. Use whichever one the problem calls for.

Example 2: Line through two points

Find the equation of the line through A(1, 2, 3) and B(4, -1, 0).

Step 1. Compute the direction ratios from the coordinate differences.

a = 4 - 1 = 3, \quad b = -1 - 2 = -3, \quad c = 0 - 3 = -3

Why: the direction from A to B is encoded in how each coordinate changes. The direction ratios (3, -3, -3) can be simplified to (1, -1, -1) — any scalar multiple is valid.

Step 2. Write the symmetric form using point A and simplified direction ratios (1, -1, -1).

\frac{x - 1}{1} = \frac{y - 2}{-1} = \frac{z - 3}{-1}

Why: using A as the base point. You could equally use B: \frac{x - 4}{1} = \frac{y + 1}{-1} = \frac{z - 0}{-1}. Both describe the same line.

Step 3. Verify that B lies on the line. Substitute (4, -1, 0):

\frac{4 - 1}{1} = 3, \quad \frac{-1 - 2}{-1} = 3, \quad \frac{0 - 3}{-1} = 3

All three equal 3, so B lies on the line (at \lambda = 3, when using the simplified ratios from A).

Step 4. Write the vector form.

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

Result: The line is \dfrac{x - 1}{1} = \dfrac{y - 2}{-1} = \dfrac{z - 3}{-1}, or in vector form \vec{r} = (\hat{i} + 2\hat{j} + 3\hat{k}) + \lambda(\hat{i} - \hat{j} - \hat{k}).

A projection of the line onto the $x$-$z$ plane (horizontal axis is $x$, vertical axis is $z$). The dashed lines show the component displacements: $\Delta x = 3$, $\Delta z = -3$. The equal-and-opposite changes confirm that the $x$ and $z$ direction ratios have equal magnitude but opposite sign, so the line drops at $45°$ in this projection.

The dashed right triangle makes the direction ratios visible: the line rises 3 in x and falls 3 in z between A and B. The slope of -1 in this projection matches the direction ratios (1, -1, -1) — specifically, the ratio c/a = -1/1 = -1.

Common confusions

Going deeper

If you can write the equation of a line in all three forms and convert between them, you have the working toolkit — you can stop here. The remaining material connects these equations to other topics and handles edge cases.

Why "symmetric" form?

The name "symmetric form" comes from the way the three coordinates appear symmetrically — each one has the same structure: (x - x_1)/a. This uniformity makes it easy to read off the point and direction at a glance, and it generalises naturally. The form is sometimes also called the "Cartesian form" or the "standard form" of a line in 3D.

In contrast, the parametric form breaks the symmetry by introducing \lambda explicitly. The vector form restores symmetry by hiding the components inside vector notation. All three are useful; the symmetric form is the one most commonly tested in Indian board exams and JEE.

Converting between forms — a recipe

From To How
Vector \to Symmetric Read off \vec{a} and \vec{b}, write (x - a_1)/b_1 = (y - a_2)/b_2 = (z - a_3)/b_3 Match components
Symmetric \to Parametric Set each fraction equal to \lambda and solve for x, y, z Isolate each variable
Parametric \to Vector 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}) Collect into vectors
Two points \to Symmetric Compute direction ratios = (x_2 - x_1, y_2 - y_1, z_2 - z_1), use either point Subtract and plug in

Intersection with a coordinate plane

A common problem type: find where the line meets the xy-plane. The xy-plane is z = 0. Set z = 0 in the parametric equations:

z_1 + \lambda c = 0 \implies \lambda = -\frac{z_1}{c}

Then substitute this \lambda back into the x and y parametric equations to get the intersection point. If c = 0, the line is parallel to the xy-plane and never meets it (unless z_1 = 0, in which case the entire line lies in the xy-plane).

The same technique works for any plane: substitute the parametric expressions into the plane equation, solve for \lambda, and recover the coordinates.

A line meeting the $xy$-plane (shown as the dashed horizontal line $z = 0$). The line passes through $P_0$ at height $z = 3$ and descends. Setting $z = 0$ in the parametric equations gives the intersection point — the unique value of $\lambda$ where the line crosses the plane.

Checking if a point lies on a line

Given a point (p, q, s) and a line \frac{x - x_1}{a} = \frac{y - y_1}{b} = \frac{z - z_1}{c}, substitute the point:

\frac{p - x_1}{a}, \quad \frac{q - y_1}{b}, \quad \frac{s - z_1}{c}

If all three fractions are equal, the point lies on the line (and their common value is the parameter \lambda at that point). If any fraction differs from the others, the point is not on the line.

This is a fast membership test and is used frequently in problems that ask whether three points are collinear. Three points A, B, C are collinear if and only if C lies on the line through A and B.

Parallel and identical lines

Two lines are parallel if their direction ratios are proportional: \frac{a_1}{a_2} = \frac{b_1}{b_2} = \frac{c_1}{c_2}. Parallel lines either never meet (they are distinct) or they are the same line (they coincide everywhere).

To check whether two parallel lines are identical, take the known point of one line and test whether it lies on the other line using the fraction test above. If it does, the lines are identical. If not, they are parallel and distinct — in 3D, this means they could be coplanar (lying in a common plane, like railway tracks) but they could also be skew lines that share a direction but live on different parallel planes. Two lines that are parallel are always coplanar, so parallel distinct lines are never skew.

Skew lines — a 3D phenomenon

In 2D, two non-parallel lines always intersect. In 3D, this is no longer true. Two lines can be non-parallel and still never meet — they pass each other at different heights, like two overpasses on a highway interchange. Such lines are called skew lines. They have no point in common and are not parallel.

You will study skew lines, the shortest distance between them, and how to detect them in the article on angles and distances between lines.

The line as an intersection of two planes

The symmetric form \frac{x - x_1}{a} = \frac{y - y_1}{b} = \frac{z - z_1}{c} encodes two equations:

\frac{x - x_1}{a} = \frac{y - y_1}{b} \quad \text{and} \quad \frac{y - y_1}{b} = \frac{z - z_1}{c}

Cross-multiplying the first: b(x - x_1) = a(y - y_1), which is bx - ay = bx_1 - ay_1. This is the equation of a plane.

Cross-multiplying the second: c(y - y_1) = b(z - z_1), which is cy - bz = cy_1 - bz_1. This is the equation of another plane.

The line is the intersection of these two planes. Every line in 3D can be expressed as the intersection of two planes — this is the algebraic version of the geometric fact that two non-parallel planes in 3D meet in a line.

This perspective is useful when you need to find a plane containing a given line (the line's two planes give you a one-parameter family of planes containing it) or when you need to find where two lines intersect (solve four equations in three unknowns, and check for consistency).

Where this leads next

You can now write the equation of any line in 3D. The next natural questions are: what angle do two lines make? How far apart are two lines that do not meet? And what happens when lines and planes interact?