# Find the direction cosines of the line passing through the following points (-2,4,-5),(1,2,3)

Toolbox:
• The cosines of the angle made by the vector with the coordinate axes is called direction cosines.
• Direction cosine (D.C) of vector $x\hat i + y\hat j + 2\hat k$ is $\large\frac{x}{\sqrt{x^2+y^2+z^2}}, \large\frac{y}{\sqrt{x^2+y^2+z^2}}, \large\frac{z}{\sqrt{x^2+y^2+z^2}}$
Step 1:
Let $\overrightarrow {OA}=-2\hat i+4\hat j-5\hat k$
$\quad\overrightarrow {OB}=\hat i+2\hat j+3\hat k$
$\therefore \overrightarrow {AB}=\overrightarrow {OB}-\overrightarrow {OA}$
$\qquad=(\hat i+2\hat j+3\hat k)-(-2\hat i+4\hat j-5\hat k)$
$\qquad=3\hat i-2\hat j+8\hat k$
Step 2:
$\mid\overrightarrow {AB}\mid=\sqrt{(3)^2+(-2)^2+(8)^2}$
$\qquad\;=\sqrt{9+4+64}$
$\qquad\;=\sqrt{77}$
Step 3:
The direction cosines are
$\large\frac{3}{\sqrt{77}},\frac{-2}{\sqrt{77}},\frac{8}{\sqrt{77}}$