Find the cosines of the angles the lines make with the axes…
Find the cosines of the angles the lines make with the axes: a) $\tfrac{x-1}{2}=\tfrac{y-1}{1}=\tfrac z2$; b) $x=y-2=z+1$.
Explanation of Method
The cosines of the angles two lines make with the coordinate axes.
Step 1: Formula
\[ \cos\alpha=\frac{l}{|\vec d|},\quad \cos\beta=\frac{m}{|\vec d|},\quad \cos\gamma=\frac{n}{|\vec d|},\qquad \cos^2\alpha+\cos^2\beta+\cos^2\gamma=1 . \]
A line has two opposite directions, so all three cosines may also change sign together.
Step 2: a)
$\vec d=\{2,1,2\}$ and $|\vec d|=3$: \[\cos\alpha=\tfrac23,\ \cos\beta=\tfrac13,\ \cos\gamma=\tfrac23\qquad(\alpha=\gamma\approx48^\circ11',\ \beta\approx70^\circ32')\]
Step 3: b)
$\tfrac x1=\tfrac{y-2}1=\tfrac{z+1}1$, so $\vec d=\{1,1,1\}$ and $|\vec d|=\sqrt3$: \[\cos\alpha=\cos\beta=\cos\gamma=\tfrac{\sqrt3}{3}\qquad(\approx54^\circ44')\]
Result
\[\boxed{\,\cos\alpha=\tfrac23,\ \cos\beta=\tfrac13,\ \cos\gamma=\tfrac23\qquad(\alpha=\gamma\approx48^\circ11',\ \beta\approx70^\circ32')\,}\]
\[\boxed{\,\cos\alpha=\cos\beta=\cos\gamma=\tfrac{\sqrt3}{3}\qquad(\approx54^\circ44')\,}\]