#### Question

Find the direction cosines of the line passing through two points (−2, 4, −5) and (1, 2, 3) .

#### Solution

\[\text{The direction cosines of the line passing through two points }P \left( x_1 , y_1 , z_1 \right) \text{ and} \ Q \left( x_2 , y_2 , z_2 \right) \text{are} \frac{x_2 - x_1}{PQ}, \frac{y_2 - y_1}{PQ}, \frac{z_2 - z_1}{PQ} . \]\[Here, \]

\[PQ = \sqrt{\left( x_2 - x_1 \right)^2 + \left( y_2 - y_1 \right)^2 + \left( z_2 - z_1 \right)^2}\]

\[P = \left( - 2, 4, - 5 \right) \]

\[Q = \left( 1, 2, 3 \right)\]

\[ \therefore PQ = \sqrt{\left[ 1 - \left( - 2 \right) \right]^2 + \left( 2 - 4 \right)^2 + \left[ 3 - \left( - 5 \right) \right]^2} = \sqrt{77}\]

\[\text{Thus, the direction cosines of the line joining two points are }\frac{1 - \left( - 2 \right)}{\sqrt{77}}, \frac{2 - 4}{\sqrt{77}}, \frac{3 - \left( - 5 \right)}{\sqrt{77}}, \text{i . e }. \frac{3}{\sqrt{77}}, \frac{- 2}{\sqrt{77}}, \frac{8}{\sqrt{77}} .\]