Consider a cube of side a units, with sides along x, y and z axis and one vertex at origin, as in the figure.
Here AB and CD are two diagonals of the cube, because A and B are diagonally opposite corners, also C and D.
In the figure, coordinates of A is (0, 0, 0) and that of B is (a, a, a). Then vector AB is given by,
[tex]\vec{\rm{AB}}=\rm{\left < a,\ a,\ a\right > }[/tex]
Coordinates of C is (a, 0, 0) and that of D is (0, a, a). Then vector CD is given by,
[tex]\vec{\rm{CD}}=\rm{\left < -a,\ a,\ a\right > }[/tex]
The diagonals each have a magnitude of a√3.
[tex]|\vec{\rm{AB}}|=|\vec{\rm{CD}}|=\rm{a\sqrt3}[/tex]
In the figure θ is the angle between the diagonals.
We take the dot product of the vectors AB and CD to get angle between them.
[tex]\longrightarrow\vec{\rm{AB}}\cdot\vec{\rm{CD}}=|\vec{\rm{AB}}|\cdot|\vec{\rm{CD}}|\cdot\cos\theta[/tex]
[tex]\longrightarrow\rm{\left < a,\ a,\ a\right > \cdot\left < -a,\ a,\ a\right > =a\sqrt3\cdot a\sqrt3\cdot \cos\theta}[/tex]
[tex]\longrightarrow\rm{-a^2+a^2+a^2=3a^2\cos\theta}[/tex]
[tex]\longrightarrow\rm{a^2=3a^2\cos\theta}[/tex]
[tex]\longrightarrow\rm{\cos\theta=\dfrac{a^2}{3a^2}}[/tex]
[tex]\longrightarrow\rm{\underline{\underline{\cos\theta=\dfrac{1}{3}}}}[/tex]
The angle between the diagonals satisfy this equation.
Hence Proved!