Find the direction cosines of the line joining $\left(2, -3, 1\right)$ and $\left(3, 1, -2\right)$.
Let the given points be $\;$ $A \left(2, -3, 1\right)$ and $B \left(3, 1, -2\right)$.
Then,
$\begin{aligned}
\overrightarrow{AB} & = \text{position vector of B} - \text{position vector of A} \\\\
& = \left(3 \hat{i} + \hat{j} - 2 \hat{k}\right) - \left(2 \hat{i} - 3 \hat{j} + \hat{k}\right) \\\\
& = \hat{i} + 4 \hat{j} -3 \hat{k}
\end{aligned}$
$\therefore$ $\;$ direction ratios of $\overrightarrow{AB}$ are $\;\;$ $1, \; 4, \; -3$
Let the direction cosines of $\overrightarrow{AB}$ be $\;\;$ $k, \; 4k, \; -3k$ $\;$ where $k$ is a constant.
Then, $\;$ $\left(k\right)^2 + \left(4k\right)^2 + \left(-3k\right)^2 = 1$
i.e. $\;$ $26 k^2 = 1$ $\implies$ $k = \pm \dfrac{1}{\sqrt{26}}$
$\therefore$ $\;$ The direction cosines of $\overrightarrow{AB}$ are $\;$ $\pm \left(\dfrac{1}{\sqrt{26}}, \; \dfrac{4}{\sqrt{26}}, \; \dfrac{-3}{\sqrt{26}}\right)$