On this page
This classic 3D geometry question is hard to picture. Don't try to see the angle. Put the cube on axes, write each diagonal as a vector, and let the dot product do the work.
How do you set up the cube on axes?
Take a cube of edge a and put one corner at the origin O(0, 0, 0), with three edges running along the x, y and z axes. Every other corner now has coordinates made only of 0 and a: (a, 0, 0), (0, a, a), (a, a, a) and so on.
A body diagonal (also called a space diagonal) joins two corners that do not share a face, as the Wikipedia article on the cube puts it. A cube has four of them, and each has length a√3, from Pythagoras applied twice.
Pick two of them:
OG, from O(0, 0, 0) to G(a, a, a)
AF, from A(a, 0, 0) to F(0, a, a)
How does the dot product give cos θ = 1/3?
The dot product of two vectors equals the product of their lengths times the cosine of the angle between them, and in coordinates it is the sum of the products of matching components, as set out on Wolfram MathWorld's dot product page. So cos θ = (u · v) / (|u| |v|).
Here is the worked example, step by step:
Write the vectors by subtracting start from end: u = OG = (a, a, a) and v = AF = (0 − a, a − 0, a − 0) = (−a, a, a).
Dot product: u · v = (a)(−a) + (a)(a) + (a)(a) = −a² + a² + a² = a².
Lengths: |u| = √(a² + a² + a²) = a√3, and |v| = a√3 as well.
Divide: cos θ = a² / (a√3 × a√3) = a² / 3a² = 1/3.
So θ = cos⁻¹(1/3).
Notice that a cancels. The angle does not depend on the size of the cube, so the answer needs no edge length, and you can take a = 1.
Why is the answer the same for every pair of diagonals?
Write all four diagonals as direction vectors: (1, 1, 1), (−1, 1, 1), (1, −1, 1) and (1, 1, −1). Pairs that include (1, 1, 1) differ in one sign, so their dot product is 1 + 1 − 1 = 1. Pairs from the other three differ in two signs, so their dot product is −1. Each vector has length √3, so cos θ is 1/3 or −1/3. A −1/3 only means one vector is reversed. Every pair meets at the same acute angle.
Is the angle 70.53° or 109.47°?
Two lines that cross make two angles that add up to 180°. If you had written v the other way round, from F to A, you would have got cos θ = −1/3, the obtuse angle. The Wikipedia article on tetrahedral molecular geometry gives arccos(−1/3) as 109.4712206°, so the acute angle is 180° − 109.47° = 70.53°.
That obtuse angle is the bond angle of methane. The same article puts carbon at the centre of a cube and the hydrogens at corners where no two share an edge, so the bonds lie along half-diagonals, and gets cos θ = −1/3 from the same dot product. Unless a question asks for the obtuse angle, give cos⁻¹(1/3).
Which diagonals is the question asking about?
It is easy to answer a different question from the one asked. Check which pair you have:
Two body diagonals: cos θ = 1/3, using (a, a, a) and (−a, a, a).
A body diagonal and a face diagonal from the same corner: use (a, a, a) and (a, a, 0). The dot product is 2a², the lengths are a√3 and a√2, so cos θ = 2/√6 = √(2/3).
Two face diagonals on adjacent faces, meeting at a corner: use (a, a, 0) and (0, a, a). The dot product is a² and both lengths are a√2, so cos θ = 1/2 and θ = 60°.
What should you practise next?
If the dot product felt shaky, start with finding the angle between vectors using the dot product. The length a√3 also solves the longest rod in a cuboid problem, and line equations bring their own trap with direction ratios in reversed symmetric form.
When you are stuck on a 3D problem and unsure which vector to write, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. To revise the idea behind it, the Fermi Concept Library gives each concept in mathematics its own lesson and its place in the map.
Try it now on a blank page: prove that a body diagonal and a face diagonal from the same corner meet at cos⁻¹(√(2/3)).



