Angle between two lines in space
NCERT Class 12 Mathematics Chapter 11 Section 11.4
Quick answer
If two lines have direction ratios a, b, c and a, b, c, the smaller angle θ (0 ≤ θ ≤ π/2) between them has cos θ = |aa + bb + cc| / (√(a + b + c) √(a + b + c)); for r = a + λb and r = a + μb this is |b · b| / (|b| |b|). Their directions are perpendicular when aa + bb + cc = 0 and parallel when their nonzero direction triples are proportional.
With your textbook
NCERT Mathematics Part II (Class 12), Chapter 11 “Three Dimensional Geometry”, Section 11.4 “Angle between Two Lines”, pages 383–385.
Open the official NCERT chapter (PDF, 2.1 MB, ncert.nic.in) (opens in a new tab)
Checked against the 2026-27 reprint on .
What is the angle between two lines?
Angle between two lines
Angle between skew lines is the angle between two intersecting lines drawn from any point (preferably through the origin) parallel to each of the skew lines.
NCERT Mathematics Part II (Class 12), Chapter 11, Summary, page 391
- For lines through the origin along OP and OQ, NCERT takes θ as the acute angle between OP and OQ (Section 11.4, page 383, Fig 11.4).
In plain words: two lines in space need not meet, but their directions still make an angle. Move each line parallel to itself through the origin, and take the smaller angle between them, in 0 ≤ θ ≤ π/2 (pages 383–384). If the lines have direction ratios a, b, c and a, b, c, those are the components of vectors along them, and the dot product of these vectors (NCERT Section 10.6.1) gives the angle:
Angle from direction ratios (NCERT page 383)
cos θ = |aa + bb + cc| / (LL)
L = √(a + b + c)
L = √(a + b + c)
The absolute value chooses the smaller angle, including 0 for parallel directions and π/2 for orthogonal ones: two directions at 120° give lines at 60°, as in the figure. NCERT also gives sin θ, with (ab − ab)2 + (bc − bc)2 + (ca − ca)2 under the root on top (page 383). With direction cosines, the denominators are 1, so cos θ = |ll + mm + nn| (page 384).
NCERT slip (page 383): the text sends the reader to “Fig 11.6”, but the figure beside it, of two lines through O, is labelled Fig 11.4. It does not change the working.
Perpendicular and parallel lines
Conditions (NCERT page 384)
perpendicular: aa + bb + cc = 0
parallel directions: (a,b,c) = k(a,b,c), k ≠ 0
NCERT gets these from θ = 90° and θ = 0 (page 384). Both direction triples must be nonzero. Component quotients can be used when their denominators are nonzero; otherwise use the proportional-vector condition. Parallel directions allow either distinct parallel lines or coincident lines. A 90° angle here compares directions even for skew lines; a common perpendicular must additionally meet both.
Vector and Cartesian forms
For r = a + λb and r = a + μb, only the directions matter (page 384):
Angle between r = a + λb and r = a + μb
cos θ = |b · b| / (|b| |b|)
In Cartesian form, read the direction ratios off the denominators and use the first formula. NCERT Example 7 (pages 384–385): the lines along î + 2ĵ + 2k̂ and 3î + 2ĵ + 6k̂ make cos θ = 19/21. NCERT Example 8 (page 385): direction ratios 3, 5, 4 and 1, 1, 2 give cos θ = 16/(√50 √6) = 8√3/15.
Solved examples
Example 1: Two lines in Cartesian form (NCERT Exercise 11.2, Q9 (i), page 390)
Find the angle between (x − 2)/2 = (y − 1)/5 = (z + 3)/(−3) and (x + 2)/(−1) = (y − 4)/8 = (z − 5)/4.
The direction ratios are 2, 5, −3 and −1, 8, 4. Then −2 + 40 − 12 = 26, √(4 + 25 + 9) = √38 and √(1 + 64 + 16) = 9.
Answer: θ = cos−1 (26/(9√38)).
Example 2: A neat cosine (NCERT Exercise 11.2, Q9 (ii), page 390)
Find the angle between x/2 = y/2 = z/1 and (x − 5)/4 = (y − 2)/1 = (z − 3)/8.
8 + 2 + 8 = 18, and the lengths are 3 and 9, so cos θ = 18/27 = 2/3.
Answer: θ = cos−1 (2/3).
Example 3: A parameter for right angles (NCERT Exercise 11.2, Q10, page 390)
Find p so that (1 − x)/3 = (7y − 14)/(2p) = (z − 3)/2 and (7 − 7x)/(3p) = (y − 5)/1 = (6 − z)/5 are at right angles.
First make x, y, z stand alone. The first line is (x − 1)/(−3) = (y − 2)/(2p/7) = (z − 3)/2, with ratios −3, 2p/7, 2. The second is (x − 1)/(−3p/7) = (y − 5)/1 = (z − 6)/(−5), with ratios −3p/7, 1, −5. Perpendicular means 9p/7 + 2p/7 − 10 = 0.
Answer: 11p/7 = 10, so p = 70/11.
Example 4: Perpendicular lines through given points (NCERT Exercise 11.2, Q2, page 389)
Show that the line through (1, −1, 2) and (3, 4, −2) is perpendicular to the line through (0, 3, 2) and (3, 5, 6).
The direction ratios are 2, 5, −4 and 3, 2, 4, and 6 + 10 − 16 = 0.
Answer: the lines are perpendicular.
Example 5: Parallel lines (NCERT Exercise 11.2, Q3, page 389)
Show that the line through (4, 7, 8) and (2, 3, 4) is parallel to the line through (−1, −2, 1) and (1, 2, 5).
The direction ratios are −2, −4, −4 and 2, 4, 4, which are proportional (factor −1).
Answer: the lines are parallel.
Example 6: Symbols only (NCERT Miscellaneous Exercise on Chapter 11, Q1, page 390)
Find the angle between the lines with direction ratios a, b, c and b − c, c − a, a − b.
a(b − c) + b(c − a) + c(a − b) = ab − ac + bc − ab + ca − bc = 0.
Answer: 90°, provided a, b, c are not all equal. If a = b = c, the second direction triple is (0, 0, 0), which defines no line and hence no angle.
Common mistakes to avoid
Common mistake
Forgetting the absolute value
Without it, the formula can give an obtuse angle, the angle between two directions rather than between the lines. The lines in Example 1 make cos−1 (26/(9√38)), whichever way each is directed.
Common mistake
Reading direction ratios from an unsimplified equation
In (1 − x)/3 or (7y − 14)/(2p), the denominators are not direction ratios until x and y stand alone with coefficient 1 (Example 3).
Common mistake
Using a point instead of a direction
Only b and b enter the angle. The points a and a decide where the lines are, not the angle between them.
Quick revision summary
- The smaller angle between the lines (0 ≤ θ ≤ π/2): cos θ = |aa + bb + cc| divided by the product of the lengths √(a + b + c) and √(a + b + c).
- With direction cosines, cos θ = |ll + mm + nn|; for r = a + λb and r = a + μb, cos θ = |b · b| / (|b| |b|).
- Perpendicular: aa + bb + cc = 0. Parallel directions: the two nonzero direction triples are proportional.
Formula sheet
- cos θ = |aa + bb + cc| / (LL)
- L = √(a + b + c), L = √(a + b + c)
- perpendicular: aa + bb + cc = 0
- parallel directions: (a,b,c) = k(a,b,c), k ≠ 0
Questions students ask
Can two skew lines be perpendicular?
Their directions can make a right angle. In NCERT’s convention for the angle between lines, the angle between lines in space depends only on their directions: NCERT defines the angle between skew lines as the angle between lines drawn parallel to them through one point (Summary, page 391), so lines with aa + bb + cc = 0 have orthogonal directions whether or not they meet. In geometry terminology that reserves “perpendicular lines” for intersecting lines, these are instead called skew lines with perpendicular directions. For example, the z-axis and the line through (0, 6, 0) parallel to the x-axis are not parallel and never meet, so they are skew, yet their directions k̂ and î are at 90°. In a room, an edge where the ceiling meets the front wall and an upright edge at the back are skew and perpendicular too.
How is the angle between two lines in 3D related to the Class 11 slope formula?
The angle between two lines in 3D is found from direction ratios instead of slopes, since a line in space has no single slope, but for lines in the XY-plane the two methods agree, because a line of slope m there has direction ratios 1, m, 0. For slopes 2 and 3, the Class 11 formula gives tan θ = 1/7, and the 3D formula with direction ratios 1, 2, 0 and 1, 3, 0 gives cos θ = 7/(5√2), the same acute angle, about 8.1°. The perpendicular conditions agree too: aa + bb + cc = 0 becomes 1 + mm = 0, and a vertical line, which has no slope, simply has direction ratios 0, 1, 0.
How do you find the direction ratios of a line perpendicular to two given lines?
A line perpendicular to two non-parallel lines with direction ratios a, b, c and a, b, c has direction ratios bc − bc, ca − ca, ab − ab, the components of the cross product b × b, which make both sums of products in the perpendicular condition 0. For direction ratios 1, 4, −3 and 2, 1, 1, they are 4 + 3, −6 − 1 and 1 − 8, that is, 7, −7, −7, or simply 1, −1, −1, and the checks 1 − 4 + 3 = 0 and 2 − 1 − 1 = 0 confirm it. If the two lines are parallel, all three come out 0, and any direction perpendicular to them will do.
Practice questions
Try each question first, then open the answer to check your working.
-
Q1. Show that the three lines with direction cosines 12/13, −3/13, −4/13; 4/13, 12/13, 3/13; and 3/13, −4/13, 12/13 are mutually perpendicular (NCERT Exercise 11.2, Q1, page 389).
Show answerHide answer
The three sums of products are (48 − 36 − 12)/169, (36 + 12 − 48)/169 and (12 − 48 + 36)/169, all 0.
-
Q2. Show that (x − 5)/7 = (y + 2)/(−5) = z/1 and x/1 = y/2 = z/3 are perpendicular (NCERT Exercise 11.2, Q11, page 390).
Show answerHide answer
7 × 1 + (−5) × 2 + 1 × 3 = 7 − 10 + 3 = 0.
-
Q3. Find the angle between r = 3î + ĵ − 2k̂ + λ(î − ĵ − 2k̂) and r = 2î − ĵ − 56k̂ + μ(3î − 5ĵ − 4k̂) (NCERT Exercise 11.2, Q8 (ii), page 390).
Show answerHide answer
b · b = 3 + 5 + 8 = 16, |b| = √6 and |b| = √50, so cos θ = 16/√300 = 8√3/15, the same angle as NCERT Example 8. (Q8 (i) has the directions of NCERT Example 7, with cos θ = 19/21.)
-
Q4. Find k if the lines (x − 1)/2 = y/k = (z + 1)/3 and x/1 = (y − 2)/4 = z/(−2) are perpendicular.
Show answerHide answer
2 + 4k − 6 = 0, so k = 1.