1. A cube has opposite vertices at \((0, 0, 0)\) and \((a, a, a)\). The diagonal connects these points.
2. Cube diagonals form vectors:
\[ \vec{d}_1 = (a, a, a), \quad \vec{d}_2 = (-a, a, a). \]
3. The angle between two diagonals is calculated as:
\[ \cos \theta = \frac{\vec{d}_1 \cdot \vec{d}_2}{|\vec{d}_1||\vec{d}_2|}. \]
4. Calculations:
\[ \vec{d}_1 \cdot \vec{d}_2 = -a^2 + a^2 + a^2 = a^2. \]
\[ |\vec{d}_1| = |\vec{d}_2| = \sqrt{3}a. \]
5. Substitution:
\[ \cos \theta = \frac{a^2}{3a^2} = \frac{1}{3}. \]
6. Conclusion:
\[ \theta = \cos^{-1}\left(\frac{1}{3}\right). \]