Equation of a Line Passing Through Two Given Points
On this page· 13 sections
Source & scope. Class 12 Mathematics (Part 2), Chapter 11 Three Dimensional Geometry, Section 11.3 Equation of a Line in Space (the "two given points" case mentioned as one of the two ways a line is determined) and the chapter Summary, which states the vector-form result r = a + λ(b − a). This editi...
Source & scope. Class 12 Mathematics (Part 2), Chapter 11 Three Dimensional Geometry, Section 11.3 Equation of a Line in Space (the "two given points" case mentioned as one of the two ways a line is determined) and the chapter Summary, which states the vector-form result r = a + λ(b − a). This edition's Chapter 11 covers only direction cosines/ratios, equations of a line, the angle between two lines, and shortest distance between two lines; plane topics are not part of this edition's syllabus. Builds on: Vector Equation of a Line Through a Point and Parallel to a Given Vector, [Direction Ratios of a Line Joining Two Points](/study-materials/math12-ch11-direction-ratios-line-joining-two-points).
The vector equation of a line passing through two points with position vectors a and b is r = a + λ(b − a); its Cartesian equation, for points P(x₁,y₁,z₁) and Q(x₂,y₂,z₂), is (x−x₁)/(x₂−x₁) = (y−y₁)/(y₂−y₁) = (z−z₁)/(z₂−z₁). Both forms follow directly from treating the segment PQ itself as the line's direction.
At a glance
- A line is determined by two given points just as validly as by a point and a direction (the case covered in a sibling article).
- Vector equation: , where a and b are position vectors of the two given points.
- Cartesian equation: .
- Both forms are obtained by taking the direction vector to be exactly b − a (equivalently, the direction ratios x₂−x₁, y₂−y₁, z₂−z₁).
- At λ = 0 the equation gives the first point; at , it gives the second point exactly.
Learning objectives
- State the vector equation of a line through two given points.
- Derive it from the point-and-direction vector equation, using AB as the direction vector.
- Derive the corresponding Cartesian (symmetric) equation.
- Apply both forms to a pair of given points.
Prerequisite knowledge
The reader should know the vector equation r = a + λb of a line through a point parallel to a vector (covered in Vector Equation of a Line Through a Point and Parallel to a Given Vector) and how to find direction ratios of the line joining two points (covered in Direction Ratios of a Line Joining Two Points).
Core explanation
A line is determined by two points, just as validly as by a point and direction
NCERT states at the start of Section 11.3 that a line in space is uniquely determined either by (i) a point and a direction, or (ii) two points. A sibling article covers case (i) in full; this article covers case (ii).
Deriving the vector equation
Let A and B be two given points on the line, with position vectors a and b respectively. The vector is a vector lying exactly along the line (since A and B are both on the line). This means AB can serve directly as the "direction vector" in the point-and-direction vector equation r = (point) + λ(direction). Taking A as the fixed point (position vector a) and AB = (b − a) as the direction vector:
This is the vector equation of the line through the two points A and B. It is a direct corollary of the point-and-direction case — no new derivation technique is needed, only the observation that the segment joining two points on a line is itself a valid direction vector for that line.
Checking the two special values of λ
- At : r = a + 0 = a, giving exactly point A.
- At : r = a + (b − a) = b, giving exactly point B.
This confirms the equation correctly passes through both given points, as it must.
Deriving the Cartesian equation
Let P(x₁, y₁, z₁) and Q(x₂, y₂, z₂) be the two given points. As shown in the sibling article Direction Ratios of a Line Joining Two Points, the direction ratios of the line PQ are x₂ − x₁, y₂ − y₁, z₂ − z₁. Substituting these direction ratios (along with the fixed point P) into the general Cartesian-form result (x−x₁)/a = (y−y₁)/b = (z−z₁)/c (covered in the sibling article on the Cartesian equation for the point-and-direction case) gives:
This is the Cartesian equation of the line through the two points P and Q.
Key terms
- Two-point vector equation — r = a + λ(b − a), for points with position vectors a and b.
- Two-point Cartesian equation — (x−x₁)/(x₂−x₁) = (y−y₁)/(y₂−y₁) = (z−z₁)/(z₂−z₁).
- AB as direction vector — the key idea that the segment joining the two given points itself serves as the line's direction vector.
- λ = 0 and λ = 1 — the two parameter values that recover the original two points exactly.
Diagram / figure guidance
Draw two points A and B in space with their position vectors a and b drawn from the origin O. Draw the vector AB = b − a connecting them directly, and show an arbitrary point P further along the extended line, with its position vector r = a + λ(b−a), labelling λ=0 at A and λ=1 at B to show how the parameter interpolates between (and extends beyond) the two given points.
Worked example
Find the vector and Cartesian equations of the line passing through the points (1, 2, 3) and (4, 0, −1).
Step 1 — write the position vectors of the two points. a = î + 2ĵ + 3k̂ (for point (1,2,3)) b = 4î + 0ĵ − 1k̂ (for point (4,0,−1))
Step 2 — compute the direction vector b − a. b − a = (4−1)î + (0−2)ĵ + (−1−3)k̂ = 3î − 2ĵ − 4k̂
Step 3 — write the vector equation.
Step 4 — write the Cartesian equation using the direction ratios 3, −2, −4 and the point (1,2,3).
Conclusion. The line through (1,2,3) and (4,0,−1) has vector equation r = (î+2ĵ+3k̂) + λ(3î−2ĵ−4k̂) and Cartesian equation (x−1)/3 = (y−2)/(−2) = (z−3)/(−4).
Check: at λ=1, r = (1+3)î + (2−2)ĵ + (3−4)k̂ = 4î + 0ĵ − 1k̂ = (4,0,−1) ✓, exactly the second given point.
Common misconceptions
- "The direction vector for a two-point line must be computed in a completely new way, different from the point-and-direction case." It isn't — the direction vector is simply AB = b − a, after which the exact same point-and-direction formula r = a + λb applies (with "b" replaced by "b − a" here).
- "λ = 1 does not give any special point on this line." It gives exactly the second point B, just as λ = 0 gives exactly the first point A — this is a useful quick check of any derived equation.
- "The Cartesian equation for two points needs direction cosines, not direction ratios." Direction ratios (x₂−x₁, y₂−y₁, z₂−z₁) are sufficient — there is no need to normalise them into direction cosines for the Cartesian equation.
- "Swapping which point is called P and which is Q changes the line." It doesn't change the line, only the specific parametrisation (the direction vector and all λ values get negated, but the underlying line is identical).
Exam application (JEE)
"Find the equation of the line through two given points" is a staple JEE question type, directly testing fluency in computing direction ratios (or the vector b−a) and substituting into either standard form. It frequently appears as a sub-step inside larger problems — e.g., finding where a line through two points meets a given condition, or combining with the angle-between-lines or shortest-distance formulas from sibling articles.
Frequently asked questions
- What is the vector equation of a line through two points? r = a + λ(b − a), where a and b are the position vectors of the two given points.
- How is the two-point line equation derived from the point-and-direction equation? By observing that the vector AB = b − a, joining the two given points, is itself a valid direction vector for the line, then substituting it into r = (point) + λ(direction).
- What is the Cartesian equation of a line through two points P(x₁,y₁,z₁) and Q(x₂,y₂,z₂)? (x−x₁)/(x₂−x₁) = (y−y₁)/(y₂−y₁) = (z−z₁)/(z₂−z₁).
- What happens at λ = 0 and λ = 1 in the two-point vector equation? λ = 0 gives exactly the first point (A), and λ = 1 gives exactly the second point (B) — a useful way to verify a derived equation.
Practice questions (original practice questions)
- The vector equation of the line through (2, 0, 1) and (3, −1, 4) is:
- (a) r = (2î+k̂) + λ(î−ĵ+3k̂)
- (b) r = (3î−ĵ+4k̂) + λ(î+ĵ−3k̂)
- (c) r = (2î+k̂) + λ(5î−ĵ+5k̂)
- (d) r = λ(î−ĵ+3k̂)
- Answer: (a) — b−a = (3−2)î+(−1−0)ĵ+(4−1)k̂ = î−ĵ+3k̂, with a = 2î+k̂.
- The Cartesian equation of the line through (0, 1, 2) and (4, 1, 6) is:
- (a) x/4 = (y−1)/0 = (z−2)/4
- (b) x/4 = (y−1)/1 = (z−2)/4
- (c) (x−4)/0 = (y−1)/1 = (z−6)/4
- (d) x/8 = (y−1)/0 = (z−2)/8
- Answer: (a) — Direction ratios are (4−0, 1−1, 6−2) = (4,0,4); the y-term is written (y−1)/0, meaning y=1 is constant along the line.
- In the equation r = a + λ(b−a) for a line through two points, what does λ=1 represent?
- (a) The midpoint of the segment
- (b) The point with position vector a
- (c) The point with position vector b
- (d) A point not on the line
- Answer: (c) — Substituting λ=1 gives r = a + (b−a) = b.
- Two points (1,1,1) and (2,2,2) determine a line. Its Cartesian equation is:
- (a) (x−1)/1 = (y−1)/1 = (z−1)/1
- (b) (x−2)/1 = (y−2)/1 = (z−2)/2
- (c) x = y = z, offset by 1 in each
- (d) (x−1)/2 = (y−1)/2 = (z−1)/2
- Answer: (a) — Direction ratios (2−1,2−1,2−1)=(1,1,1), giving (x−1)/1=(y−1)/1=(z−1)/1.
- If a line passes through A(a) and B(b) with vector equation r = a + λ(b−a), reversing the roles (taking B as the base point) gives:
- (a) An entirely different line
- (b) r = b + μ(a−b), describing the identical line with a relabelled parameter
- (c) r = b + λ(b−a)
- (d) No valid equation
- Answer: (b) — Swapping the base point and negating the direction vector still parametrises the same underlying line.
Quick revision
- Vector equation: r = a + λ(b − a), for points with position vectors a, b.
- Cartesian equation: (x−x₁)/(x₂−x₁) = (y−y₁)/(y₂−y₁) = (z−z₁)/(z₂−z₁).
- Direction vector is simply AB = b − a; no new technique beyond the point-and-direction case.
- λ=0 gives the first point; λ=1 gives the second point — a quick verification check.
- Swapping which point is the "base" point gives an equivalent equation for the same line.
Related articles
- Builds on: Vector Equation of a Line Through a Point and Parallel to a Given Vector
- Builds on: Direction Ratios of a Line Joining Two Points
- See also: Cartesian Equation of a Line Through a Point and Parallel to a Given Vector
- See also: Testing Collinearity of Three Points Using Direction Ratios
- Related topics: Angle Between Two Lines in Three-Dimensional Geometry, Condition for Two Lines to Be Parallel, Condition for Two Lines to Be Perpendicular, Converting Direction Ratios to Direction Cosines, Direction Angles and Direction Cosines of a Line, Direction Cosines of a Line Joining Two Points