Once you know a line’s direction (from direction cosines or direction ratios), the next natural question is: how do you actually write the equation of that line in three-dimensional space? Unlike two dimensions, a single equation like y = mx + c won’t work here — 3D lines need either a vector equation or a pair of Cartesian equations. This post walks through both forms, how they connect, and how to apply them in exam-style problems.
When Is a Line Uniquely Determined?
A straight line in space is fixed once you know either of these:
-
A point on the line and the direction it runs in, or
-
Two distinct points that lie on the line.
Every method for writing the equation of a line boils down to one of these two situations.
Vector Equation of a Line Through a Point, Parallel to a Given Vector
Let a be the position vector of a known point A on the line, and let b be a vector parallel to the line’s direction. If r is the position vector of any general point P on the line, then vector AP is parallel to b, so:
AP = λb, where λ is a real (scalar) parameter
Since AP = OP − OA = r − a, this gives the vector equation of a line:
r = a + λb
As λ varies over all real numbers, r traces out every point on the line. If b = a₁î + b₁ĵ + c₁k̂, then a₁, b₁, c₁ are simply the direction ratios of the line.
Deriving the Cartesian Equation from the Vector Form
Let the known point be A(x₁, y₁, z₁) and let a, b, c be the direction ratios of the line. Writing r = xî + yĵ + zk̂ and substituting into r = a + λb, then comparing coefficients of î, ĵ, k̂, we get the parametric equations:
x = x₁ + λa, y = y₁ + λb, z = z₁ + λc
Eliminating the parameter λ from these three equations produces the Cartesian equation of a line:
(x − x₁)/a = (y − y₁)/b = (z − z₁)/c
If instead the direction cosines l, m, n are known, the same equation is written as:
(x − x₁)/l = (y − y₁)/m = (z − z₁)/n
Equation of a Line Through Two Given Points
When a line passes through two points with position vectors a and b (instead of a point and a direction), the direction vector is simply (b − a), so the vector equation becomes:
r = a + λ(b − a)
In Cartesian form, if the two points are (x₁, y₁, z₁) and (x₂, y₂, z₂), the equation is:
(x − x₁)/(x₂ − x₁) = (y − y₁)/(y₂ − y₁) = (z − z₁)/(z₂ − z₁)
Solved Example
Example: Find the vector and Cartesian equations of the line through the point (5, 2, −4), parallel to the vector 3î + 2ĵ − 8k̂.
Solution: Here a = 5î + 2ĵ − 4k̂ and b = 3î + 2ĵ − 8k̂.
Vector equation: r = (5î + 2ĵ − 4k̂) + λ(3î + 2ĵ − 8k̂)
Writing r = xî + yĵ + zk̂ and comparing components:
x = 5 + 3λ, y = 2 + 2λ, z = −4 − 8λ
Eliminating λ:
(x − 5)/3 = (y − 2)/2 = (z + 4)/(−8)
This is the required Cartesian equation.
Common Mistakes to Avoid
-
Don’t confuse the direction vector b with its magnitude |b| — they play very different roles in the equation.
-
When eliminating λ, always double-check the sign of each direction ratio; a single sign error changes the entire line.
-
Remember that a line’s Cartesian equation is really two independent equations joined by equals signs (three ratios, but only two independent conditions) — this matters when you’re asked to find where a line meets a plane or another line.
Why This Matters Beyond the Exam
The vector and Cartesian equations of a line form the backbone of nearly every later section in Three Dimensional Geometry — the angle between two lines, the shortest distance between skew lines, and the intersection of a line with a plane all start from this equation. In CBSE board exams, this concept is tested almost every year, often worth 3–5 marks, and CUET Commerce-stream papers frequently test the parametric-to-Cartesian conversion as a quick MCQ.
Study Smarter with ChampionsPrep
Vector and Cartesian equations feel abstract until you practise enough varied problems — and that’s exactly what ChampionsPrep is built for. Get AI-powered, chapter-wise practice sessions on Three Dimensional Geometry with PrepCoin packs from ₹59, designed for CBSE and Maharashtra Board Class XI–XII Commerce students, plus CUET, IPMAT, JIPMAT, NPAT, and SET aspirants. Head to app.championsprep.in and start converting concepts into confident exam answers.

Equation of a Line in Space – Vector and Cartesian Form (Class 12)
Frequently Asked Questions
What is the difference between the vector and Cartesian equation of a line? +
The vector equation r = a + lambda b expresses every point on the line using a single parameter lambda. The Cartesian equation expresses the same line as ratios involving x, y, z coordinates; both describe the identical line in different notations.
What does the parameter lambda represent in the vector equation of a line? +
Lambda is a scalar that can take any real value; as it varies, the point on the line slides along the entire length of the line in both directions.
Can a line's equation be written without knowing its direction ratios directly? +
Yes, if two points on the line are known, the direction ratios can be calculated as the difference of their coordinates and the equation can be written from there.
Why do direction ratios appear in the denominators of the Cartesian equation of a line? +
Because the Cartesian form comes from eliminating the parameter from the parametric equations; solving each equation for the parameter naturally places the direction ratios in the denominators.
Is the equation of a line unique? +
No single unique equation exists, because different choices of the known point or a scalar multiple of the direction ratios still describe the same line, though all such equations are equivalent.
AI-powered practice — free to start