On this page
Three Dimensional Geometry is Chapter 11 of the NCERT Class 12 Mathematics textbook, Part II (reprint 2026-27). The CBSE Mathematics syllabus for 2026-27 covers direction cosines and ratios, equations of a line, the angle between lines, skew lines and shortest distance. Its Unit IV, Vectors and Three-dimensional Geometry, carries 14 of the 80 board-paper marks, shared with vectors, not this chapter alone. For answer-writing and traps, read our Three Dimensional Geometry Class 12 board exam guide.
What are direction cosines and direction ratios?
Directed line: a line with one of its two directions chosen, so that its direction cosines are unique.
Direction angles (α, β, γ): the angles a directed line makes with the positive x, y and z-axes.
Direction cosines (l, m, n): the cosines of the direction angles, l = cos α, m = cos β, n = cos γ. Example: angles 90°, 60° and 30° give 0, 1/2 and √3/2.
Identity l² + m² + n² = 1: true for every line. Check: 0 + 1/4 + 3/4 = 1.
Reversed direction: each direction angle is replaced by its supplement, so all three direction cosines change sign.
Direction cosines of the axes: x-axis 1, 0, 0; y-axis 0, 1, 0; z-axis 0, 0, 1.
Direction ratios (a, b, c): a = kl, b = km, c = kn for some nonzero k, so every nonzero multiple of one set is another set. Example: direction ratios 2, −1, −2 give direction cosines 2/3, −1/3, −2/3 after dividing by √(4 + 1 + 4) = 3. Don't confuse with: direction cosines, which must satisfy l² + m² + n² = 1; direction ratios need not.
How do you find the direction of a line through two points?
Direction ratios of PQ: for P(x₁, y₁, z₁) and Q(x₂, y₂, z₂), take x₂ − x₁, y₂ − y₁, z₂ − z₁ (or all three negatives).
Direction cosines of PQ: divide those differences by the length PQ. Example: for (−2, 4, −5) and (1, 2, 3), PQ = √77, so the direction cosines are 3/√77, −2/√77, 8/√77.
Collinear points: three points on one line. Test: the direction ratios of AB and BC are proportional and B is common. Example: A(2, 3, −4), B(1, −2, 3), C(3, 8, −11) give −1, −5, 7 and 2, 10, −14.
Equations of a line in space
Vector equation of a line: r = a + λb, where a is the position vector of a point on the line and b is a vector parallel to it. Example: through (5, 2, −4) parallel to 3i + 2j − 8k gives r = 5i + 2j − 4k + λ(3i + 2j − 8k).
Parameter (λ): a real number; each value of λ gives one point of the line.
Line through two points: use point a and direction b − a, giving r = a + λ(b − a) (listed in the chapter summary).
Parametric equations: x = x₁ + λa, y = y₁ + λb, z = z₁ + λc.
Cartesian equation: (x − x₁)/a = (y − y₁)/b = (z − z₁)/c, where a, b, c are direction ratios. Don't confuse with: the numbers under a form like (1 − x)/3. Rewrite it as (x − 1)/(−3) first, so the direction ratio is −3, not 3.
How do you find the angle between two lines?
Angle between two lines (θ): the acute angle found from their direction vectors, cos θ = |b₁ · b₂| / (|b₁| |b₂|). Example: b₁ = i + 2j + 2k and b₂ = 3i + 2j + 6k give cos θ = 19/21.
Perpendicular lines: a₁a₂ + b₁b₂ + c₁c₂ = 0.
Parallel lines: a₁/a₂ = b₁/b₂ = c₁/c₂. Don't confuse with: the perpendicular test, which adds products; the parallel test compares ratios.
Angle between skew lines: through one point (the origin is easiest), draw a parallel to each skew line; the angle between those two is the answer.
Skew lines and shortest distance
Coplanar lines: lines that lie in one plane; they either intersect or are parallel.
Skew lines: two lines that never meet and are not parallel, so no single plane contains both. Example: in a room, a diagonal across the ceiling and a diagonal down a wall that never meets it.
Shortest distance: the length of the shortest segment joining a point of one line to a point of the other. It is 0 for intersecting lines.
Line of shortest distance: for skew lines, the segment that is perpendicular to both lines; its direction is b₁ × b₂.
Shortest distance between skew lines: d = |(b₁ × b₂) · (a₂ − a₁)| / |b₁ × b₂|. Worked example: for r = (i + j + k) + λ(i + 2j + 2k) and r = (−2i + 4j + 4k) + μ(2i + j − 2k), b₁ × b₂ = −6i + 6j − 3k with length 9, a₂ − a₁ = −3i + 3j + 3k, the dot product is 27, so d = 27/9 = 3. Since b₁ · b₂ = 0, these skew lines are also perpendicular.
Distance between parallel lines: d = |b × (a₂ − a₁)| / |b|, using the common direction b. Don't confuse with: the skew-line formula, which needs a cross product of two different directions.
How to learn these terms
Convert every Cartesian line to (x − x₁)/a form before reading off a, b, c.
Sort any two lines with one question each: is b₁ × b₂ zero (parallel)? If not, is (b₁ × b₂) · (a₂ − a₁) zero (intersecting) or not (skew)?
Draw the picture above from memory: two parallel planes, one line in each, and the common perpendicular PQ.
Revise the dot and cross product from our Vector algebra Class 12 guide.
If a term still feels shaky, the Fermi Concept Library gives each mathematics concept its own lesson and its place in the map.



