One way to prove the distance between two planes is to use the equation Cos(alpha_1)^2 + Cos(alpha_2)^2 + Cos(alpha_3)^2 = 1. In this equation Cos(alpha) is the angle between the normal to the plane and the (x,y,or z axis).

My main question is why is this equation (Cos(alpha_1)^2 + Cos(alpha_2)^2 + Cos(alpha_3)^2 = 1) true?

Thanks in advance.

I have attached a figure to illustrate the problem more clearly.