Direction cosines are the cosines of the angles that a line makes with the x, y, and z axes. If a line makes angles α, β, and γ with the three axes, the direction cosines are:
l=cosα (angle with x-axis)
m=cosβ (angle with y-axis)
n=cosγ (angle with z-axis)
These satisfy the relation: l2+m2+n2=1
The line makes equal angles with all three coordinate axes, so:
α=β=γ=θ
The direction cosines become:
l=cosθ
m=cosθ
n=cosθ
Using l2+m2+n2=1:
(cosθ)2+(cosθ)2+(cosθ)2=1
3cos2θ=1
cos2θ=31
cosθ=±31
Since l=m=n=cosθ:
Direction cosines =(±31,±31,±31)
The ± sign accounts for the line pointing in two opposite directions.