Angle between two lines
The angle θ between two lines is the angle between their direction vectors: cos θ = |b⃗₁ · b⃗₂| / (|b⃗₁||b⃗₂|). A zero dot product means perpendicular lines.
Why only the directions matter
The angle between two lines depends only on their directions, not on where they are. So use the direction vectors b⃗₁ and b⃗₂ (or their DRs) and the dot product. The modulus in the formula gives the acute angle between the lines. The same formula works for skew lines: their angle is the angle between lines drawn parallel to each through one point.
Conditions at a glance
| Situation | With direction ratios | With direction vectors |
|---|---|---|
| Angle θ | cos θ = |a₁a₂ + b₁b₂ + c₁c₂| / (√(a₁² + b₁² + c₁²) √(a₂² + b₂² + c₂²)) | cos θ = |b⃗₁ · b⃗₂| / (|b⃗₁||b⃗₂|) |
| Perpendicular (θ = 90°) | a₁a₂ + b₁b₂ + c₁c₂ = 0 | b⃗₁ · b⃗₂ = 0 |
| Parallel (θ = 0°) | a₁/a₂ = b₁/b₂ = c₁/c₂ | b⃗₁ = kb⃗₂ for some scalar k |
Example 1: angle between two vector lines
Find the angle between r⃗ = (î + ĵ) + λ(2î − ĵ + 2k̂) and r⃗ = (2ĵ − k̂) + μ(3î + 4k̂).
- b⃗₁ = 2î − ĵ + 2k̂, b⃗₂ = 3î + 0ĵ + 4k̂
- b⃗₁ · b⃗₂ = 6 + 0 + 8 = 14
- |b⃗₁| = √(4 + 1 + 4) = 3, |b⃗₂| = √(9 + 16) = 5
- cos θ = 14/(3 × 5) = 14/15
θ = cos⁻¹(14/15).
Example 2: angle between two Cartesian lines
Find the angle between x/1 = (y − 1)/1 = (z + 2)/2 and (x − 3)/2 = (y + 1)/(−1) = z/1.
- DRs: 1, 1, 2 and 2, −1, 1
- a₁a₂ + b₁b₂ + c₁c₂ = 2 − 1 + 2 = 3
- √(1 + 1 + 4) = √6 and √(4 + 1 + 1) = √6
- cos θ = 3/(√6 × √6) = 3/6 = 1/2
θ = 60°, that is π/3.
Example 3: find k for perpendicular lines
Find k so that the lines (x − 1)/2 = (y + 3)/k = (z − 2)/(−1) and (5 − x)/1 = (y − 1)/4 = (2z + 1)/6 are perpendicular.
- Rewrite the second line: (x − 5)/(−1) = (y − 1)/4 = (z + 1/2)/3
- DRs: 2, k, −1 and −1, 4, 3
- Perpendicular: (2)(−1) + (k)(4) + (−1)(3) = 0
- −2 + 4k − 3 = 0, so 4k = 5
k = 5/4.
Extra example (not in your rationalised textbook): foot of the perpendicular from a point to a line
Find the foot of the perpendicular from P(4, 5, −1) to the line (x − 1)/2 = (y − 2)/1 = (z + 1)/2. Find the length of the perpendicular and the image of P in the line.
- General point on the line: Q(1 + 2λ, 2 + λ, −1 + 2λ)
- DRs of PQ: 2λ − 3, λ − 3, 2λ
- PQ is perpendicular to the line (DRs 2, 1, 2): 2(2λ − 3) + 1(λ − 3) + 2(2λ) = 0
- 9λ − 9 = 0, so λ = 1 and Q = (3, 3, 1)
- PQ = √((3 − 4)² + (3 − 5)² + (1 + 1)²) = √(1 + 4 + 4) = 3
- Q is the midpoint of P and its image P′: P′ = (2 × 3 − 4, 2 × 3 − 5, 2 × 1 + 1) = (2, 1, 3)
Foot (3, 3, 1); length 3 units; image (2, 1, 3).
Builders of metro stations check that a steel column is perpendicular to a beam by testing a₁a₂ + b₁b₂ + c₁c₂ = 0 for their directions. A non-zero answer means the joint is tilted.
1 marks: “Find k if the lines with direction ratios 2, −1, 3 and 1, k, 1 are perpendicular.” 2(1) + (−1)(k) + 3(1) = 0, so 5 − k = 0 and k = 5.
2 marks: “Find the angle between the lines r⃗ = λ(î + 2ĵ + 2k̂) and r⃗ = (3î − k̂) + μ(2î + 2ĵ − k̂).” b⃗₁ · b⃗₂ = 2 + 4 − 2 = 4; |b⃗₁| = |b⃗₂| = 3. cos θ = 4/9, so θ = cos⁻¹(4/9).
3 marks: “Find the vector and Cartesian equations of the line through (2, −1, 3) that is perpendicular to both the lines r⃗ = (î + ĵ) + λ(î + 2ĵ − k̂) and r⃗ = (2î − k̂) + μ(2î − ĵ + 3k̂).” A direction perpendicular to both is b⃗₁ × b⃗₂ = 5î − 5ĵ − 5k̂, or î − ĵ − k̂. Check: 1 − 2 + 1 = 0 and 2 + 1 − 3 = 0. So r⃗ = (2î − ĵ + 3k̂) + λ(î − ĵ − k̂); (x − 2)/1 = (y + 1)/(−1) = (z − 3)/(−1).
Dot product zero, the lines meet at ninety; ratios in proportion, the lines run parallel.