Books · Problem of the Week: Solutions
Chapter 2
An Average Shadow
Aunit cube hangs above a horizontal plane. Light arrives in parallel rays from directly overhead, so the shadow is the vertical projection of the cube. Turn the cube to a random orientation. What is the average area of the shadow?
The answer is , and it is not really a fact about cubes. It is a case of a theorem of Cauchy: for any convex body, the mean area of the shadow, averaged over orientations, is a quarter of the surface area. The cube has surface area .
Stan Wagon’s Problem of the Week 1417, circulated 29 July 2026, which attributes the result to A.-L. Cauchy, 1850.
Everything depends on one vector
Fix the plane and turn the cube. Let be the rotation that carries the cube from its starting position to where it now sits, and let so that is the vertical direction expressed in the cube’s own frame. If you were sitting inside the cube, is where you would point to say “up”. Its three components are the cosines of the angles between the vertical and the cube’s three edge directions.
The area of the shadow is .
Proof. The argument is a double count. Take a point in the interior of the shadow and send a vertical line up through it. Because the cube is convex, that line meets the boundary in exactly two points, one where it enters and one where it leaves, unless it happens to graze an edge or a vertex. Those exceptional points form a set of area zero, so almost every interior point of the shadow is covered twice as the boundary is projected down, which gives where is the unit outward normal of the face . The factor is the ordinary rule that a flat plate of area tilted so its normal makes angle with the vertical throws a shadow of area .
For the unit cube the six faces each have area , and their outward normals are the six vectors . Now , so the six terms pair off and the sum is . Halve it. ■
For the cube the double count has a concrete reading. From each pair of opposite faces exactly one is turned upwards, so three faces are lit; their projections tile the shadow without overlapping, and they contribute , and . Three orientations are worth carrying forward:
| a face level | an edge up | a diagonal upright | |
| area |
The middle one looks like a throwaway, and it is not: turns out to be the threshold at which the distribution changes character.
The whole problem has now collapsed. There is no geometry left, only a vector on the unit sphere and the function . Write for it.
What the extremes are
Both bounds come straight from . Squaring the sum gives , and Cauchy-Schwarz in the other direction gives . So the lower bound holding when is a coordinate direction and the upper when the three components are equal in absolute value. In the cube those are a face lying level, whose shadow is the unit square, and a space diagonal standing upright, whose shadow is a regular hexagon of area . In linear-algebra language is the norm of , and this is the standard comparison with the norm.
For a generic orientation the shadow is a centrally symmetric hexagon. When one component of vanishes the hexagon degenerates to a rectangle, as it does for both extreme cases above and for the edge-up orientation. The area varies continuously with the orientation, though not smoothly: the absolute values put a corner wherever a component crosses zero.
The mean, without evaluating an integral
The natural move now is to average over the sphere. It is worth resisting, because there is a route that never computes an average of at all, and it delivers the general theorem rather than the cube.
Let be a convex body with surface area . The mean area of the vertical projection of , over a uniformly random orientation, is .
Proof. Go back to the double count, which used nothing about cubes. For any convex body a vertical line still meets the boundary twice above almost every point of the shadow, so for a fixed light direction with the outward unit normal, which exists at almost every boundary point of a convex body. The identity is immediate for polytopes and for smooth bodies, and the general case follows by approximation.
Now average over a uniform orientation. Averaging is linear, so it passes through the integral and lands on alone. Here is the step that does the work: is the same number for every unit vector . A uniform orientation is by definition invariant under rotation, so no direction is distinguishable from any other, and the average cannot depend on which normal it is looking at. Call that common value . Then so the average shadow is proportional to the surface area, with one constant good for every convex body, and so far nothing has been integrated.
The constant is then fixed by any single body whose shadows are known without calculation. The sphere of radius is the obvious candidate: turn it however you like and the shadow is a disc of area , while its surface area is . So , giving and a mean shadow of . ■
The cube has , so its average shadow is . The sphere did the work that an integral would otherwise have had to do.
It is worth seeing the cube computed directly as well, since the two routes are independent. Under a uniform orientation is a uniform point on the sphere, and its three coordinates have the same distribution, so the average shadow is . Archimedes settles that: his hat-box theorem says the vertical coordinate of a uniform point on the sphere is itself uniform on , because the sphere and the circumscribed cylinder have equal areas between any two horizontal planes. Hence and the mean is again.
The distribution, not just the mean
The mean is the question asked, but the distribution is where the problem becomes interesting, because it has a closed form on most of its range.
Replacing by leaves alone and lands in the positive octant, and the eight octants have equal area, so it is enough to take uniform on the positive octant, where . Write for the fraction of orientations whose shadow has area at least .
The set is the part of the octant on the far side of the plane . On the whole sphere that plane cuts off a cap whose pole is the space diagonal and whose angular radius satisfies ; what we want is that cap intersected with the octant.
A full spherical cap of angular radius has area . So as long as the cap sits entirely inside the octant, its area is , and dividing by the octant’s area gives
When does the cap fit? The nearest point of the octant’s boundary to the pole lies on one of the three walls , , , at angular distance from the diagonal. The cap fits precisely when , that is when , and at it is inscribed, touching all three walls at once.
The three points where it touches are worth naming: they are and its two permutations, which are exactly the edge-up orientations from the table earlier. That is where the in the third column came from. The threshold is not a coincidence of the algebra but the moment the level set reaches the orientations with an edge vertical.
So on the tail is a straight line and the density is the constant . That stretch is no thin sliver of the range:
So carries about per cent of the probability with a constant density: conditional on , the area is uniformly distributed on that interval. Two more values fall out of the same formula. Putting gives , so the mean sits below the median, and solving puts the median at
Below the octant walls clip the cap and the linear formula fails. What survives is a closed form for the density. Differentiating the tail gives and on . The arccosine is exactly the angular correction for the part of the cap the walls cut away. Integrating this density gives the tail values
and integrating across the whole range returns , as it must.
The two pieces agree at : the arccosine vanishes there, so the rising branch arrives at exactly and the density is continuous. What it is not is smooth. The approach has a vertical tangent, and the curve turns a corner onto the plateau, which is why sampling the density a little short of is so misleading: at it still reads against a limit of , and it only closes the gap in the last thousandth.
A trap in the sampling
The problem statement offers a recipe for simulating a random orientation. Plainly stated, it is: choose a rotation axis uniformly on the unit sphere, then choose the rotation angle uniformly from to . It is an inviting prescription, and it does not sample orientations uniformly. A simulation that follows it converges to , not .
The discrepancy is easy to see. By Rodrigues’ formula, rotating by an angle about a unit axis gives a vector whose vertical component is Under the recipe, is uniform on and is independent of it, so and Under a genuinely uniform orientation is uniform on the sphere, so upward and downward tilts are equally likely and . A value of is therefore proof of bias, with no further calculation needed. The recipe leaves the cube leaning towards where it started, and since shadows are smallest near the starting position, the average shadow comes out too small.
The cause is the angle, not the axis. Uniform measure on , written in axis-angle coordinates, is a uniform axis together with an angle drawn from the density on , not a uniform one. Small rotations are rarer than a flat angle supposes. Keep the uniform axis, replace the flat angle by that density, and the simulation returns to within its standard error. Drawing a unit quaternion uniformly on the -sphere does the same job in fewer lines.
How wrong is the recipe? Its construction never refers to any direction but the vertical, so its law for is invariant under rotations about the vertical; the azimuth is therefore uniform and independent, and the mean shadow is , with distributed as above. Both expectations are integrals of an explicit function of and over . The second is exactly ; the first has no closed form I could find, and numerical integration gives . The mean shadow is therefore a shortfall of per cent.
That is not a subtle error. The standard deviation of the shadow area under the recipe is , so the shortfall of is about standard errors at a thousand samples, and only about samples are needed before it reaches two. The bias could pass for noise in a few dozen draws and should be conspicuous well before a thousand.
The lesson generalises past this problem. “Uniformly at random” is a statement about a measure, and on a group the invariant measure is rarely the one that a natural-looking construction produces. Building the rotation out of two independently uniform ingredients feels symmetric, and the feeling is misleading. Cauchy’s answer is exact and holds for every convex body; whether a simulation finds it depends entirely on which measure the sampler was quietly using.
An interactive version of the cube and its shadow, where the two samplers can be compared directly, is at vamshij.com/mathematics/average_shadow.
shadow area 1.732 samples 0 running mean —