Subject: Class 12 Mathematics Chapter: Angle Between Two Lines Topic: 12.5 Angle Between Two Lines – Calculate angles between spatial lines
When two lines lie in space, they may be parallel, they may intersect, or they may be skew lines that never meet. In every case it is meaningful to speak of the angle between them: the angle between two parallel lines is zero, and for intersecting lines it is the angle between the lines when drawn from their common point. The tool that measures this angle is the direction of the lines, and direction cosines were invented precisely for this purpose.
The connection between direction and angle is beautifully simple. Since the direction cosines are the components of a unit vector along the line, the cosine of the angle between two lines is simply the dot product of their direction cosines. This single formula handles all cases uniformly, and it reduces to an even simpler algebraic condition for the special cases of parallel and perpendicular lines.
In this chapter we will derive the formula for the cosine of the angle between two lines in terms of direction cosines and in terms of direction ratios, learn the conditions for two lines to be parallel or perpendicular, and apply the formula in several worked examples. Special attention will be given to the acute angle convention, which requires taking the absolute value so that we always report the smaller of the two possible angles.
Let two lines have direction cosines (l1, m1, n1) and (l2, m2, n2). If θ is the angle between the lines, then:
cos θ = l1 l2 + m1 m2 + n1 n2
This is just the dot product of the two unit vectors pointing along the lines. Since direction cosines are components of unit vectors, the dot product automatically lies between −1 and 1. The acute angle between the lines is obtained by taking the absolute value:
cos θ = |l1 l2 + m1 m2 + n1 n2|
Example 1: Find the angle between the lines whose direction cosines are (1/2, √3/2, 0) and (√3/2, 1/2, 0).
Solution: Using the formula:
cos θ = (1/2)(√3/2) + (√3/2)(1/2) + (0)(0) cos θ = √3/4 + √3/4 = √3/2
Hence θ = cos⁻¹(√3/2) = 30°.
Example 2: Show that the lines with direction cosines (1/√2, 1/√2, 0) and (1/√2, −1/√2, 0) are perpendicular.
Solution: Compute the dot product:
l1 l2 + m1 m2 + n1 n2 = (1/√2)(1/√2) + (1/√2)(−1/√2) + 0 = 1/2 − 1/2 = 0
Since the cosine of the angle is zero, the angle is 90° and the lines are perpendicular.
When the direction ratios (a1, b1, c1) and (a2, b2, c2) of the two lines are known, the direction cosines are obtained by normalising each set. Substituting into the cosine formula and simplifying gives:
cos θ = |a1 a2 + b1 b2 + c1 c2| / (√(a1² + b1² + c1²) √(a2² + b2² + c2²))
This is the most commonly used form in examinations, because direction ratios are usually given directly or are easy to find from the equations of the lines.
Example 3: Find the angle between the lines with direction ratios (1, 2, 2) and (2, −1, 2).
Solution: The numerator is:
a1a2 + b1b2 + c1c2 = 1(2) + 2(−1) + 2(2) = 2 − 2 + 4 = 4
The denominators are √(1 + 4 + 4) = 3 and √(4 + 1 + 4) = 3. Hence:
cos θ = |4| / (3 × 3) = 4/9
So θ = cos⁻¹(4/9).
Example 4: Find the angle between the lines (x − 1)/2 = (y − 2)/3 = (z + 1)/4 and (x + 2)/4 = (y − 1)/6 = (z − 3)/8.
Solution: The direction ratios are (2, 3, 4) and (4, 6, 8). Observe that (4, 6, 8) = 2 × (2, 3, 4), so the direction ratios are proportional and the lines are parallel. Therefore the angle between them is 0°.
Example 5: Find the angle between the lines r = (i + 2j + k) + λ(2i − j + 3k) and r = (3i + j) + μ(−i + 3j + 2k).
Solution: The direction vectors are (2, −1, 3) and (−1, 3, 2). The numerator is 2(−1) + (−1)(3) + 3(2) = −2 − 3 + 6 = 1. The denominators are √(4 + 1 + 9) = √14 and √(1 + 9 + 4) = √14. Hence:
cos θ = |1| / 14 = 1/14
The angle is θ = cos⁻¹(1/14).
The angle formula immediately gives two important special conditions:
These conditions allow us to answer questions about parallelism and perpendicularity without ever computing the angle itself.
Example 6: Show that the lines with direction ratios (3, 4, 5) and (6, 8, 10) are parallel.
Solution: The ratios are proportional because (6, 8, 10) = 2 × (3, 4, 5). Hence the lines are parallel and the angle between them is 0°.
Example 7: Find the value of p for which the lines with direction ratios (1, 2, 3) and (2, p, 6) are perpendicular.
Solution: Perpendicular lines satisfy a1a2 + b1b2 + c1c2 = 0:
1(2) + 2(p) + 3(6) = 0 2 + 2p + 18 = 0 2p = −20 ⇒ p = −10
Hence the lines are perpendicular when p = −10.
Example 8: Find the direction ratios of a line perpendicular to both the lines with direction ratios (1, 2, 3) and (2, 3, 4).
Solution: Let the required direction ratios be (a, b, c). Since the line is perpendicular to both lines:
a + 2b + 3c = 0 and 2a + 3b + 4c = 0
Cross multiplying gives a/[(2)(4) − (3)(3)] = b/[(3)(2) − (1)(4)] = c/[(1)(3) − (2)(2)]. That is a/(8 − 9) = b/(6 − 4) = c/(3 − 4), so a/(−1) = b/2 = c/(−1). Hence the direction ratios are (−1, 2, −1), or equivalently (1, −2, 1).
| Given data | Formula for cos θ |
|---|---|
| Direction cosines (l1, m1, n1) and (l2, m2, n2) | l1l2 + m1m2 + n1n2 |
| Direction ratios (a1, b1, c1) and (a2, b2, c2) | (a1a2 + b1b2 + c1c2) / (√(a1²+b1²+c1²) √(a2²+b2²+c2²)) |
| Acute angle convention | cos θ = |
| Condition | Algebraic test |
|---|---|
| Lines parallel | a1/a2 = b1/b2 = c1/c2 |
| Lines perpendicular | a1a2 + b1b2 + c1c2 = 0 |
| Same direction cosines | Lines parallel, angle 0° |
| Dot product zero | Lines perpendicular, angle 90° |
flowchart TD
A[Angle Between Two Lines] --> B[Using Direction Cosines]
A --> C[Using Direction Ratios]
A --> D[Special Cases]
B --> B1[cos theta = l1l2 + m1m2 + n1n2]
B --> B2[Take absolute value for acute angle]
C --> C1[cos theta = a1a2 + b1b2 + c1c2 over product of norms]
D --> D1[Parallel if ratios proportional]
D --> D2[Perpendicular if dot product zero]
D --> D3[Angle 0 deg or 90 deg]
The angle between two lines in space is completely determined by their directions, and it is measured through the dot product of their direction vectors. In terms of direction cosines the formula is simply l1l2 + m1m2 + n1n2, and in terms of direction ratios it takes the slightly longer algebraic form that normalises each line first. Parallel lines are detected by proportional direction ratios and perpendicular lines by a zero dot product. This clean formula connects the geometry of lines to the algebra of vectors, and it prepares us for the next chapter where we will measure the shortest distance separating lines that do not meet.