In this chapter: direction cosines and direction ratios of a line, vector and Cartesian equations of a line through a point and through two points, angle between two lines, skew lines and the shortest distance between two lines, plus a summary of results on planes for MHT‑CET.Direction cosines and direction ratios
If a directed line makes angles α, β, γ with the positive x, y and z axes, its direction cosines are l = cos α, m = cos β, n = cos γ, and
Any three numbers a, b, c proportional to l, m, n are direction ratios. To convert, divide by √(a² + b² + c²): l = ±a/√(a² + b² + c²), and similarly for m and n, taking the same sign throughout. A line has infinitely many sets of direction ratios but, apart from the choice of sign (direction), only one set of direction cosines.
For the line through P(x1, y1, z1) and Q(x2, y2, z2), the direction ratios are x2 − x1, y2 − y1, z2 − z1, and dividing by the distance PQ gives the direction cosines.
Equation of a line
Through a given point, parallel to a given vector
If the line passes through A with position vector a and is parallel to b = aî + bĵ + ck̂, every point P on it satisfies AP = λb. So
Worked example: Find the vector and Cartesian equations of the line through (5, 2, −4) parallel to 3î + 2ĵ − 8k̂.Solution: Vector form: r = 5î + 2ĵ − 4k̂ + λ(3î + 2ĵ − 8k̂). Cartesian form: (x − 5)/3 = (y − 2)/2 = (z + 4)/(−8). Note z − (−4) becomes z + 4.
Through two given points
A common slip: the Cartesian form requires the coefficients of x, y and z to be 1. A line written as (2x − 1)/3 = (y + 2)/2 = (z − 1)/1 has direction ratios 3/2, 2, 1, not 3, 2, 1, because 2x − 1 = 2(x − 1/2).
Angle between two lines
The angle between two lines is the angle between their direction vectors. With direction ratios a1, b1, c1 and a2, b2, c2:
- Perpendicular lines: a1a2 + b1b2 + c1c2 = 0.
- Parallel lines: a1/a2 = b1/b2 = c1/c2.
Worked example: Find the angle between (x + 3)/3 = (y − 1)/5 = (z + 3)/4 and (x + 1)/1 = (y − 4)/1 = (z − 5)/2.Solution: Direction ratios 3, 5, 4 and 1, 1, 2. cos θ = |3 + 5 + 8|/(√50 √6) = 16/√300 = 16/(10√3) = 8√3/15. So θ = cos−1(8√3/15).
Shortest distance between two lines
In space, two lines can intersect, be parallel, or be skew: neither parallel nor intersecting. Skew lines lie in different planes. The shortest distance between them is the length of the segment perpendicular to both.
For r = a₁ + λb₁ and r = a₂ + μb₂:
For non-parallel lines, d = 0 means they intersect. In Cartesian form the numerator of the first formula is the absolute value of the determinant with rows (x2 − x1, y2 − y1, z2 − z1), (a1, b1, c1), (a2, b2, c2).
Worked example: Find the shortest distance between r = î + ĵ + λ(2î − ĵ + k̂) and r = 2î + ĵ − k̂ + μ(3î − 5ĵ + 2k̂).Solution: a₂ − a₁ = î − k̂. b₁ × b₂ = î((−1)(2) − (1)(−5)) − ĵ((2)(2) − (1)(3)) + k̂((2)(−5) − (−1)(3)) = 3î − ĵ − 7k̂, with magnitude √(9 + 1 + 49) = √59. The dot product with î − k̂ is 3 + 7 = 10. So d = 10/√59.
Planes (for MHT‑CET)
The current NCERT chapter ends with lines. MHT‑CET students also study planes in the Maharashtra board's "Line and Plane" chapter, so the main results are collected here. A plane with normal vector n = Aî + Bĵ + Ck̂ has equation Ax + By + Cz + D = 0.
| Result | Formula |
|---|---|
| Plane through (x1, y1, z1) with normal (A, B, C) | A(x − x1) + B(y − y1) + C(z − z1) = 0 |
| Normal form (unit normal n̂, distance d from origin) | r · n̂ = d, or lx + my + nz = d |
| Intercept form | x/a + y/b + z/c = 1 |
| Distance of (x1, y1, z1) from Ax + By + Cz + D = 0 | |Ax1 + By1 + Cz1 + D| / √(A² + B² + C²) |
| Angle between two planes | cos θ = |n₁ · n₂| / (|n₁| |n₂|) |
| Angle between line (direction b) and plane (normal n) | sin φ = |b · n| / (|b| |n|) |
For example, the distance of (2, 5, −3) from 6x − 3y + 2z − 4 = 0 is |12 − 15 − 6 − 4|/√(36 + 9 + 4) = 13/7.
Common mistakes: (1) Reading direction ratios from a Cartesian equation whose x, y or z has a coefficient other than 1. (2) Forgetting the modulus in cos θ and reporting an obtuse angle between lines. (3) Using the skew-lines formula for parallel lines, where b1 × b2 = 0 and the formula breaks down. (4) Sign errors in the middle term of the cross product. (5) Using sin instead of cos (or the other way round) for the angle between a line and a plane.JEE and MHT‑CET focus
- Direction cosines from direction ratios, and angles with the axes.
- Writing a line in vector and Cartesian forms and converting between them.
- Conditions for two lines to be perpendicular or parallel, often with an unknown to find.
- Shortest distance between skew and parallel lines, and the condition for two lines to intersect.
- For MHT‑CET: equations of planes, distance of a point from a plane, and angles between planes and between a line and a plane.
Practice questions
The direction cosines of a line with direction ratios 2, −1, −2 are:
- 2, −1, −2
- 2/3, −1/3, −2/3
- 2/9, −1/9, −2/9
- 2/√5, −1/√5, −2/√5
Show answer
A line makes angles 90°, 60° and 30° with the x, y and z axes. Its direction cosines are:
- 0, 1/2, √3/2
- 1, √3/2, 1/2
- 0, √3/2, 1/2
- 1/2, 1/2, 1/√2
Show answer
Lines with direction ratios 1, 2, 3 and 3, −3, 1 are:
- Parallel
- Perpendicular
- Inclined at 60°
- Coincident
Show answer
The lines (x − 1)/(−3) = (y − 2)/(2k) = (z − 3)/2 and (x − 1)/(3k) = (y − 1)/1 = (z − 6)/(−5) are perpendicular for k equal to:
- 10/7
- −10/7
- 7/10
- −7/10
Show answer
The Cartesian equation of the line through (1, −2, 3) with direction ratios 2, 1, −4 is:
- (x + 1)/2 = (y − 2)/1 = (z + 3)/(−4)
- (x − 1)/2 = (y + 2)/1 = (z − 3)/(−4)
- (x − 2)/1 = (y − 1)/(−2) = (z + 4)/3
- (x − 1)/2 = (y − 2)/1 = (z − 3)/4
Show answer
The shortest distance between the lines r = λî and r = ĵ + μk̂ is:
- 0
- 1
- √2
- 1/√2
Show answer
The distance of the origin from the plane 2x − y + 2z = 9 is:
- 1
- 3
- 9
- 9/5
Show answer
The angle between the lines with direction ratios 1, 1, 0 and 0, 1, 1 is:
- 30°
- 45°
- 60°
- 90°





