$\cos^2 \alpha + \cos^2 \beta + \cos^2 \gamma =1$ 
Let be $\alpha, \beta, \gamma$  the angles between a generic direction in 3D and the axes $x,y,z$, respectively.
Prove that
$\cos^2 \alpha + \cos^2 \beta + \cos^2 \gamma =1$.

PS: the 2D case is trivial. But I can't prove the 3D case.

Let $$\vec{v}=[v_1,v_2,v_3]$$ then we get
$$\cos(\alpha)=\frac{\vec{v}\cdot\vec{e_1}}{|\vec{v}|\cdot|\vec{e_1}|}=\frac{{v_1}}{|\vec{v}|}=\frac{v_1}{\sqrt{v_1^2+v_2^2+v_3^2}}$$
