A brief note on Lines in Space . Read it before a test. Try each question at the end before you open its answer.
Direction Direction cosines: l = cos α l = \cos\alpha l = cos α , m = cos β m = \cos\beta m = cos β , n = cos γ n = \cos\gamma n = cos γ , the cosines of the angles with the three axes. They satisfy l 2 + m 2 + n 2 = 1 l^2 + m^2 + n^2 = 1 l 2 + m 2 + n 2 = 1 . Two sets: a line has ( l , m , n ) (l, m, n) ( l , m , n ) and ( − l , − m , − n ) (-l, -m, -n) ( − l , − m , − n ) , one for each direction. Direction ratios: any numbers a a a , b b b , c c c in proportion to l l l , m m m , n n n . Then l = a a 2 + b 2 + c 2 l = \dfrac{a}{\sqrt{a^2 + b^2 + c^2}} l = a 2 + b 2 + c 2 a , and the same for m m m and n n n . Through two points: the direction ratios are the differences of the coordinates. Equations of a line Vector form: r ⃗ = a ⃗ + λ b ⃗ \vec{r} = \vec{a} + \lambda\vec{b} r = a + λ b , through the point a ⃗ \vec{a} a and parallel to b ⃗ \vec{b} b . Cartesian form: x − x 1 a = y − y 1 b = z − z 1 c \dfrac{x - x_1}{a} = \dfrac{y - y_1}{b} = \dfrac{z - z_1}{c} a x − x 1 = b y − y 1 = c z − z 1 . A zero denominator means that coordinate stays fixed. Through two points: use the differences of the coordinates as direction ratios. The angle between two lines Formula: cos θ = ∣ a 1 a 2 + b 1 b 2 + c 1 c 2 ∣ a 1 2 + b 1 2 + c 1 2 a 2 2 + b 2 2 + c 2 2 \cos\theta = \dfrac{\lvert a_1a_2 + b_1b_2 + c_1c_2 \rvert}{\sqrt{a_1^2 + b_1^2 + c_1^2}\,\sqrt{a_2^2 + b_2^2 + c_2^2}} cos θ = a 1 2 + b 1 2 + c 1 2 a 2 2 + b 2 2 + c 2 2 ∣ a 1 a 2 + b 1 b 2 + c 1 c 2 ∣ . The angle is acute. Perpendicular: the dot product of the directions is 0 0 0 . Parallel: the direction ratios are proportional. A worked example Find the acute angle between the lines x − 1 3 = y 4 = z + 4 12 \dfrac{x - 1}{3} = \dfrac{y}{4} = \dfrac{z + 4}{12} 3 x − 1 = 4 y = 12 z + 4 and x 1 = y − 2 2 = z 2 \dfrac{x}{1} = \dfrac{y - 2}{2} = \dfrac{z}{2} 1 x = 2 y − 2 = 2 z .
The directions. ( 3 , 4 , 12 ) (3, 4, 12) ( 3 , 4 , 12 ) and ( 1 , 2 , 2 ) (1, 2, 2) ( 1 , 2 , 2 ) . The dot product. 3 + 8 + 24 = 35 3 + 8 + 24 = 35 3 + 8 + 24 = 35 . The lengths. 13 13 13 and 3 3 3 . The cosine. cos θ = 35 39 \cos\theta = \dfrac{35}{39} cos θ = 39 35 , and θ ≈ 26.18 ∘ \theta \approx 26.18^\circ θ ≈ 26.1 8 ∘ . Practice with new numbers
A program to try The program finds the direction cosines of the first line and the angle between the two lines of the worked example.
Run it. Does the printed angle match the worked example?
1. Change b2 to np.array([3, 4, 12]). What are the cosine and the angle now, and why?
Mistakes to avoid Stopping at the ratios. Divide by the length to get direction cosines. Dropping the modulus. The angle between two lines is the acute one. Reading the point with the wrong sign. In y + 1 3 \dfrac{y + 1}{3} 3 y + 1 the coordinate is y 1 = − 1 y_1 = -1 y 1 = − 1 . Check yourself Can 1 3 \dfrac{1}{3} 3 1 , 2 3 \dfrac{2}{3} 3 2 and 2 3 \dfrac{2}{3} 3 2 be direction cosines of a line? Stuck? Show a hint Show the answerFind the direction cosines of the line through ( 0 , 0 , 0 ) (0, 0, 0) ( 0 , 0 , 0 ) and ( 4 , 4 , 7 ) (4, 4, 7) ( 4 , 4 , 7 ) . Stuck? Show a hint Show the answerWrite the line through ( 2 , 0 , − 1 ) (2, 0, -1) ( 2 , 0 , − 1 ) parallel to i ^ + 3 j ^ − 2 k ^ \hat{i} + 3\hat{j} - 2\hat{k} i ^ + 3 j ^ − 2 k ^ in Cartesian form. Stuck? Show a hint Show the answerAre the lines with direction ratios ( 2 , 1 , − 2 ) (2, 1, -2) ( 2 , 1 , − 2 ) and ( 1 , 2 , 2 ) (1, 2, 2) ( 1 , 2 , 2 ) perpendicular? Stuck? Show a hint Show the answerA student finds a negative cosine for the angle between two lines. What should she do? Stuck? Show a hint Show the answerSources OpenStax, Calculus Volume 3 , Chapter 2, section on equations of lines and planes in space. NCERT, Mathematics Part II for Class XII, Chapter 11, sections on direction cosines, the equation of a line and the angle between two lines.