If a line makes angles $\alpha, \beta, \gamma$ with the $x, y, z$ axes, then $\sin^2{\alpha} + \sin^2{\beta} + \sin^2{\gamma} = 2 $ The following is the question in my textbook:-

If a straight line makes  angle $\alpha$, $\beta$, $\gamma$ with the $x, y, z$ axes respectively, then show that $\sin^2{\alpha} + \sin^2{\beta} + \sin^2{\gamma} = 2 $? 

Here is what I have done:-
Since $\alpha$, $\beta$, $\gamma$ are the angles made by the line with the axes so $\cos\alpha$, $\cos\beta$, $\cos\gamma$ are the direction cosines of the line
now 
$$\sin^2\theta + \cos^2\theta = 1$$
$$\sin^2\theta = 1 - \cos^2\theta$$
so 
$$\sin^2\alpha + \sin^2\beta + \sin^2\gamma = 1 - \cos^2\alpha + 1 - \cos^2\beta + 1 - \cos^2\gamma$$$$ =3 - (\cos^2\alpha + \cos^2\beta + \cos^2\gamma)$$
now since $\cos\alpha$, $\cos\beta$, $\cos\gamma$ are the direction cosines of the line so $\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1$
so
$$3 - \cos^2\alpha + \cos^2\beta + \cos^2\gamma= 3 - 1$$ 
$$=2- answer$$
My question was that have I done it correctly and if not what is the correct way of doing it. 
 A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
It's completely general when we choose that the line contains the origin of coordinates.
In spherical coordinates
$\ds{\pars{~0 \leq \theta < \pi\,,\quad 0 \leq \phi < 2\pi~}}$: 
\begin{align}
&\color{#66f}{\large\sin^{2}\pars{\alpha} + \sin^{2}\pars{\beta} + \sin^{2}\pars{\gamma}}
\\[3mm]&=\overbrace{\bracks{1 - \sin^{2}\pars{\theta}\cos^{2}\pars{\phi}}}
^{\ds{\sin^{2}\pars{\alpha}}}\ +\
\overbrace{\bracks{1 - \sin^{2}\pars{\theta}\sin^{2}\pars{\phi}}}
^{\ds{\sin^{2}\pars{\beta}}}\ +\
\overbrace{\bracks{1 - \cos^{2}\pars{\theta}}}^{\ds{\sin^{2}\pars{\gamma}}}
\\[3mm]&=3 - \sin^{2}\pars{\theta}
\bracks{\cos^{2}\pars{\phi} + \sin^{2}\pars{\phi}} - \cos^{2}\pars{\theta}
\\[3mm]&=3 - \sin^{2}\pars{\theta} - \cos^{2}\pars{\theta}
=3 - 1 = \color{#66f}{\Large 2}
\end{align}
A: Yes, the solution is correct. Turning $\sin^2$ into $1-\cos^2 $ reduces the problem to the sum of squared cosines being $1$, and the latter fact is essentially the distance formula. Indeed, move the line so that it passes through the origin and pick a point $(u,v,w)$ on the line at distance $1$ from the origin. Then $u^2+v^2+w^2=1$. On the other hand, $u,v,w$ are exactly the direction cosines.
