How to Use This Section

Twenty fully worked problems covering the whole chapter, in four graded batches: direction cosines and ratios, then line equations, then angles, then shortest distances and mixed problems. Attempt each on paper before reading the solution.

The chapter's entire machinery is four moves: normalise ratios into cosines, read a line's point and direction from either form of its equation, dot directions for angles, and cross for perpendiculars and distances. Every problem below is a composition of those four.

Key Point: in this chapter more than any other, marks die at the reading step — an unstandardised Cartesian equation (3−x3 - x in a numerator, a 2z2z, cosines confused with ratios) poisons everything downstream. Standardise first, always.

Batch 1 — Direction Cosines and Ratios (Easy)

Example 1: The third direction angle

A line makes 135∘135^\circ with the xx-axis and 60∘60^\circ with the yy-axis. Find the acute angle it makes with the zz-axis.

Solution:

  1. Identity: cos⁡2135∘+cos⁡260∘+cos⁡2γ=1\cos^2 135^\circ + \cos^2 60^\circ + \cos^2\gamma = 1, i.e. 12+14+cos⁡2γ=1\dfrac{1}{2} + \dfrac{1}{4} + \cos^2\gamma = 1.
  2. Solve: cos⁡2γ=14\cos^2\gamma = \dfrac{1}{4}, acute choice cos⁡γ=12\cos\gamma = \dfrac{1}{2}.

Answer: γ=60∘\gamma = 60^\circ. The obtuse 135∘135^\circ contributes cos⁡2=12\cos^2 = \dfrac{1}{2} just like 45∘45^\circ would — squares forget signs.


Example 2: Ratios to cosines

Find the direction cosines of a line with direction ratios 6,−2,36, -2, 3.

Solution:

  1. Normalise: 36+4+9=7\sqrt{36 + 4 + 9} = 7.
  2. Divide: (67,−27,37)\left(\dfrac{6}{7}, -\dfrac{2}{7}, \dfrac{3}{7}\right).

Answer: (67,−27,37)\left(\dfrac{6}{7}, -\dfrac{2}{7}, \dfrac{3}{7}\right) — a 6-2-3-7 quadruple worth remembering alongside 1-2-2-3 and 2-3-6-7.


Example 3: Cosines from two points

Find the direction cosines of the line from P(4,3,−5)P(4, 3, -5) to Q(−2,1,−8)Q(-2, 1, -8).

Solution:

  1. Ratios (terminal minus initial): (−6,−2,−3)(-6, -2, -3).
  2. Distance: 36+4+9=7\sqrt{36 + 4 + 9} = 7.
  3. Divide: (−67,−27,−37)\left(-\dfrac{6}{7}, -\dfrac{2}{7}, -\dfrac{3}{7}\right).

Answer: (−67,−27,−37)\left(-\dfrac{6}{7}, -\dfrac{2}{7}, -\dfrac{3}{7}\right) — the all-negated set describes the same line traversed from QQ to PP.


Example 4: Three points on one line

Show that (2,3,4)(2, 3, 4), (3,4,5)(3, 4, 5) and (4,5,6)(4, 5, 6) are collinear.

Solution:

  1. Consecutive ratios: first to second: (1,1,1)(1, 1, 1); second to third: (1,1,1)(1, 1, 1).
  2. Identical (hence proportional) ratios through a shared point — one straight line.

Answer: collinear; indeed all three lie on x−21=y−31=z−41\dfrac{x - 2}{1} = \dfrac{y - 3}{1} = \dfrac{z - 4}{1}.


Example 5: Completing a cosine triple

If (12,12,n)\left(\dfrac{1}{2}, \dfrac{1}{2}, n\right) are direction cosines of a line with n>0n > 0, find nn.

Solution:

  1. Identity: 14+14+n2=1\dfrac{1}{4} + \dfrac{1}{4} + n^2 = 1, so n2=12n^2 = \dfrac{1}{2}.
  2. Positive root: n=12n = \dfrac{1}{\sqrt{2}}.

Answer: n=12n = \dfrac{1}{\sqrt{2}} — the line makes 60∘,60∘,45∘60^\circ, 60^\circ, 45^\circ with the axes.

Batch 2 — Line Equations (Easy-Medium)

Example 6: Point and direction, both forms

Find the equation of the line through (1,2,3)(1, 2, 3) parallel to 3i^+2j^−2k^3\hat{i} + 2\hat{j} - 2\hat{k}, in vector and Cartesian form.

Solution:

  1. Vector form: r⃗=(i^+2j^+3k^)+λ(3i^+2j^−2k^)\vec{r} = \left(\hat{i} + 2\hat{j} + 3\hat{k}\right) + \lambda\left(3\hat{i} + 2\hat{j} - 2\hat{k}\right).
  2. Cartesian form: x−13=y−22=z−3−2\dfrac{x - 1}{3} = \dfrac{y - 2}{2} = \dfrac{z - 3}{-2}.

Answer: as above.


Example 7: From a position vector

Find both forms of the line through the point with position vector 2i^−j^+4k^2\hat{i} - \hat{j} + 4\hat{k} in the direction i^+2j^−k^\hat{i} + 2\hat{j} - \hat{k}.

Solution:

  1. Vector form: r⃗=(2i^−j^+4k^)+λ(i^+2j^−k^)\vec{r} = \left(2\hat{i} - \hat{j} + 4\hat{k}\right) + \lambda\left(\hat{i} + 2\hat{j} - \hat{k}\right).
  2. Cartesian form: x−21=y+12=z−4−1\dfrac{x - 2}{1} = \dfrac{y + 1}{2} = \dfrac{z - 4}{-1}.

Answer: as above — the position vector supplies the point (2,−1,4)(2, -1, 4), the direction supplies the denominators.


Example 8: Parallel to a given line

Find the Cartesian equation of the line through (−2,4,−5)(-2, 4, -5) parallel to x+33=y−45=z+86\dfrac{x + 3}{3} = \dfrac{y - 4}{5} = \dfrac{z + 8}{6}.

Solution:

  1. Borrow the direction: ratios (3,5,6)(3, 5, 6) — parallel lines share direction ratios.
  2. Anchor at the new point: x+23=y−45=z+56\dfrac{x + 2}{3} = \dfrac{y - 4}{5} = \dfrac{z + 5}{6}.

Answer: x+23=y−45=z+56\dfrac{x + 2}{3} = \dfrac{y - 4}{5} = \dfrac{z + 5}{6}.


Example 9: Cartesian to vector

The Cartesian equation of a line is x−53=y+47=z−62\dfrac{x - 5}{3} = \dfrac{y + 4}{7} = \dfrac{z - 6}{2}. Write its vector form.

Solution:

  1. Point from numerators: (5,−4,6)(5, -4, 6).
  2. Direction from denominators: (3,7,2)(3, 7, 2).

Answer: r⃗=(5i^−4j^+6k^)+λ(3i^+7j^+2k^)\vec{r} = \left(5\hat{i} - 4\hat{j} + 6\hat{k}\right) + \lambda\left(3\hat{i} + 7\hat{j} + 2\hat{k}\right).


Example 10: A line with two zero ratios

Find the equation of the line through (3,−2,−5)(3, -2, -5) and (3,−2,6)(3, -2, 6).

Solution:

  1. Direction: (0,0,11)(0, 0, 11) — only zz changes; the line is parallel to the zz-axis.
  2. Vector form: r⃗=(3i^−2j^−5k^)+λk^\vec{r} = \left(3\hat{i} - 2\hat{j} - 5\hat{k}\right) + \lambda\hat{k}.
  3. Cartesian description: x=3x = 3, y=−2y = -2, zz arbitrary (formally x−30=y+20=z+511\dfrac{x-3}{0} = \dfrac{y+2}{0} = \dfrac{z+5}{11}, with zero denominators read as "numerator identically zero").

Answer: the vertical line x=3,y=−2x = 3, y = -2 — zero direction ratios are statements, not divisions.

Batch 3 — Angles between Lines (Medium)

Example 11: A routine angle

Find the angle between the lines with direction ratios (2,5,−3)(2, 5, -3) and (−1,8,4)(-1, 8, 4).

Solution:

  1. Dot: −2+40−12=26-2 + 40 - 12 = 26.
  2. Norms: 4+25+9=38\sqrt{4 + 25 + 9} = \sqrt{38} and 1+64+16=9\sqrt{1 + 64 + 16} = 9.
  3. Angle: cos⁡θ=26938\cos\theta = \dfrac{26}{9\sqrt{38}}.

Answer: θ=cos⁡−126938\theta = \cos^{-1}\dfrac{26}{9\sqrt{38}}.


Example 12: A surd-heavy pair that collapses

Find the angle between lines with direction ratios (1,1,2)(1, 1, 2) and (3−1, −3−1, 4)\left(\sqrt{3} - 1, \ -\sqrt{3} - 1, \ 4\right).

Solution:

  1. Dot: (3−1)+(−3−1)+8=6(\sqrt{3} - 1) + (-\sqrt{3} - 1) + 8 = 6.
  2. Norms: 6\sqrt{6} and (3−1)2+(3+1)2+16=4−23+4+23+16=24=26\sqrt{(\sqrt{3}-1)^2 + (\sqrt{3}+1)^2 + 16} = \sqrt{4 - 2\sqrt{3} + 4 + 2\sqrt{3} + 16} = \sqrt{24} = 2\sqrt{6} — the cross terms cancel.
  3. Angle: cos⁡θ=66⋅26=612=12\cos\theta = \dfrac{6}{\sqrt{6}\cdot 2\sqrt{6}} = \dfrac{6}{12} = \dfrac{1}{2}.

Answer: 60∘60^\circ — designed surds; trust the algebra and the mess evaporates.


Example 13: Angle between the diagonals of a cube

Find the angle between two (space) diagonals of a cube.

Solution:

  1. Model the cube on unit axes: two diagonals have direction ratios (1,1,1)(1, 1, 1) and (1,1,−1)(1, 1, -1).
  2. Dot: 1+1−1=11 + 1 - 1 = 1; norms 3\sqrt{3} each.
  3. Angle: cos⁡θ=13\cos\theta = \dfrac{1}{3}.

Answer: cos⁡−113≈70.5∘\cos^{-1}\dfrac{1}{3} \approx 70.5^\circ — a classic result exams quote directly.


Example 14: Cube diagonal and edge

Find the angle between a space diagonal of a cube and one of its edges.

Solution:

  1. Directions: diagonal (1,1,1)(1, 1, 1), edge (1,0,0)(1, 0, 0).
  2. Compute: cos⁡θ=13\cos\theta = \dfrac{1}{\sqrt{3}}.

Answer: cos⁡−113≈54.7∘\cos^{-1}\dfrac{1}{\sqrt{3}} \approx 54.7^\circ — the equal-inclination angle from Section 1, met again from the cube's corner.


Example 15: Perpendicular to two given directions

Find the direction cosines of the line perpendicular to both lines with direction ratios (1,2,2)(1, 2, 2) and (0,2,1)(0, 2, 1).

Solution:

  1. Cross: (1,2,2)×(0,2,1)=(2−4, 0−1, 2−0)=(−2,−1,2)(1, 2, 2) \times (0, 2, 1) = (2 - 4, \ 0 - 1, \ 2 - 0) = (-2, -1, 2).
  2. Normalise: magnitude 33.

Answer: (−23,−13,23)\left(-\dfrac{2}{3}, -\dfrac{1}{3}, \dfrac{2}{3}\right) (or negated) — "perpendicular to two directions" always means the cross product.

Batch 4 — Distances and Mixed Problems (Medium-Hard)

Example 16: A clean skew distance

Find the shortest distance between r⃗=(i^+j^+k^)+λ(i^−j^)\vec{r} = \left(\hat{i} + \hat{j} + \hat{k}\right) + \lambda\left(\hat{i} - \hat{j}\right) and r⃗=(2i^−k^)+μ(i^+j^)\vec{r} = \left(2\hat{i} - \hat{k}\right) + \mu\left(\hat{i} + \hat{j}\right).

Solution:

  1. Cross: (i^−j^)×(i^+j^)=2k^\left(\hat{i} - \hat{j}\right) \times \left(\hat{i} + \hat{j}\right) = 2\hat{k}, magnitude 22.
  2. Joining vector: (1,−1,−2)(1, -1, -2).
  3. Triple product: 2k^⋅(1,−1,−2)=−42\hat{k} \cdot (1, -1, -2) = -4; modulus 44.

Answer: d=42=2d = \dfrac{4}{2} = 2.


Example 17: A line perpendicular to two lines

Find the vector equation of the line through (1,2,−4)(1, 2, -4) perpendicular to both x−83=y+19−16=z−107\dfrac{x - 8}{3} = \dfrac{y + 19}{-16} = \dfrac{z - 10}{7} and x−153=y−298=z−5−5\dfrac{x - 15}{3} = \dfrac{y - 29}{8} = \dfrac{z - 5}{-5}.

Solution:

  1. Direction = cross of the two directions: (3,−16,7)×(3,8,−5)=(80−56, 21+15, 24+48)=(24,36,72)=12(2,3,6)(3, -16, 7) \times (3, 8, -5) = (80 - 56, \ 21 + 15, \ 24 + 48) = (24, 36, 72) = 12(2, 3, 6).
  2. Anchor at the given point: r⃗=(i^+2j^−4k^)+λ(2i^+3j^+6k^)\vec{r} = \left(\hat{i} + 2\hat{j} - 4\hat{k}\right) + \lambda\left(2\hat{i} + 3\hat{j} + 6\hat{k}\right).

Answer: r⃗=i^+2j^−4k^+λ(2i^+3j^+6k^)\vec{r} = \hat{i} + 2\hat{j} - 4\hat{k} + \lambda\left(2\hat{i} + 3\hat{j} + 6\hat{k}\right) — always reduce the cross by its common factor before writing the answer.


Example 18: Do the lines meet?

Show that the lines r⃗=(i^+j^)+λi^\vec{r} = \left(\hat{i} + \hat{j}\right) + \lambda\hat{i} and r⃗=μj^\vec{r} = \mu\hat{j} intersect, and find the point of intersection.

Solution:

  1. Coplanarity test: (i^×j^)⋅(a⃗2−a⃗1)=k^⋅(−1,−1,0)=0\left(\hat{i} \times \hat{j}\right)\cdot\left(\vec{a}_2 - \vec{a}_1\right) = \hat{k}\cdot(-1, -1, 0) = 0 — coplanar; being non-parallel, they intersect.
  2. Find the point: equate (1+λ,1,0)=(0,μ,0)(1 + \lambda, 1, 0) = (0, \mu, 0): λ=−1\lambda = -1, μ=1\mu = 1.

Answer: they meet at (0,1,0)(0, 1, 0). The zero triple product predicts the meeting; the parameter equations locate it.


Example 19: Distance from a point to a line

Find the distance from the point P(1,0,0)P(1, 0, 0) to the line x=y=zx = y = z.

Solution:

  1. Set up: the line passes through A(0,0,0)A(0,0,0) with direction b⃗=(1,1,1)\vec{b} = (1, 1, 1); AP→=(1,0,0)\overrightarrow{AP} = (1, 0, 0).
  2. Cross: AP→×b⃗=(0⋅1−0⋅1, 0⋅1−1⋅1, 1⋅1−0⋅1)=(0,−1,1)\overrightarrow{AP} \times \vec{b} = (0\cdot1 - 0\cdot1, \ 0\cdot1 - 1\cdot1, \ 1\cdot1 - 0\cdot1) = (0, -1, 1), magnitude 2\sqrt{2}.
  3. Divide by ∣b⃗∣|\vec{b}|: d=23=63d = \dfrac{\sqrt{2}}{\sqrt{3}} = \dfrac{\sqrt{6}}{3}.

Answer: 63\dfrac{\sqrt{6}}{3} — the point-to-line distance is the parallel-lines formula with one "line" shrunk to a point.


Example 20: The nearest point on a line

Find the point on the line x−11=y−21=z−31\dfrac{x - 1}{1} = \dfrac{y - 2}{1} = \dfrac{z - 3}{1} closest to the origin.

Solution:

  1. Parametrise: (1+t, 2+t, 3+t)(1 + t, \ 2 + t, \ 3 + t).
  2. Perpendicularity condition: the position vector of the nearest point is perpendicular to the direction (1,1,1)(1,1,1): (1+t)+(2+t)+(3+t)=0(1 + t) + (2 + t) + (3 + t) = 0, so t=−2t = -2.
  3. Substitute: the point is (−1,0,1)(-1, 0, 1), at distance 2\sqrt{2}.

Answer: (−1,0,1)(-1, 0, 1), distance 2\sqrt{2} — parametrise, impose one perpendicularity dot, substitute: the universal "foot of perpendicular" recipe.