I recently came across this in my Vectors textbook.
I don't quite follow the logic that ends with $\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1$. I understand that unit vectors have magnitude 1, and that they are achieved by dividing a vector $\overrightarrow v$ by its magnitude $\vert \vec v \vert$ which produces the unit vector $\hat v$. Is $a$ considered a vector here, such that dividing it by $\vert \vec u \vert$ produces a unit vector?
As I am just starting to learn about vectors, a rudimentary explanation of why $\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1$ would be greatly appreciated.