LmCast :: Stay tuned in

Inverse-Square Law

Recorded: Sept. 15, 2026, 2:57 p.m.

Original Summarized

Inverse-square law - lcamtuf’s thing

lcamtuf’s thingSubscribeSign inInverse-square lawIn which Sally loses her marbles.Sep 14, 202612112ShareIf you’re dabbling in electronics, you might have heard of what’s known as the inverse-square law. This law says that the intensity of many types of physical phenomena decreases with the square of the distance to the origin. For example, if you get twice as far from a lightbulb, a handheld light meter will register a four-fold drop in luminance. The same goes for sound, radio transmissions, and so forth.But… why? Wouldn’t it be more natural if the intensity dropped in direct proportion to how far you are from the source? Or, if it’s about scattering in a three-dimensional space, shouldn’t it be the cube of distance? Let’s try to figure it out.The making of a sphereIf we want an answer that doesn’t merely kick the can down the road, we need to start with the formula for the surface area of a sphere. From school, you might recall that the equation is:\(S_{sphere} = 4 \pi r^2\)That said, I bet your teachers have never explained where the formula comes from. And as with many other “obvious” concepts in elementary mathematics, the answer is not as obvious as it seems — even though it’s been known since the times of Ancient Greeks.To get going, imagine a thin tube (a cap-less cylinder) constructed by gluing the edges of a rectangular sheet of paper:Constructing a paper cylinder.To make the cylinder, we didn’t need to squish or stretch the rectangle, so the process preserved the surface area. The outer surface of this cap-less cylinder is just height (h) multiplied by what used to be width (w) and is now circumference.Next, take a sphere with a radius r and place it inside such a fitted cylinder of the same circumference and the same height:Sphere packing.The sphere has a radius of r, so its circumference — and thus, the circumference of the cylinder — is 2𝜋r. It’s just a matter of how 𝜋 is commonly defined.The height of the cylinder is equal to the sphere’s diameter, or twice the radius. We know that the cylinder’s outer surface area is just circumference times height, so we can write that Stube = 4𝜋r2. Lo and behold — that’s the same formula as what we’ve been given in school for the inscribed sphere. But… how come?To get to the bottom of this, imagine tiling tiling flat squares on the outer surface of the cylinder, each square measuring a × a:A prison for spheres.This gives us an approximation of the cylinder; we can reduce the error of the approximation as much as we like by decreasing the size of the tiles. In the limit of this refinement process, as a becomes infinitesimal (infinitely small), we converge on the exact dimensions and curvature of the shape we intended to create.The four corners of each square in this tile-based sorta-cylinder can be projected toward the sphere’s vertical axis of symmetry, such that the horizontal coordinates converge toward the center while the vertical component remains unchanged. This projection is a wedge that intersects the surface of the sphere at an angle:The wedge.If we repeat this process for every outer square that makes up the cylinder, we end up with a neatly tessellated sphere (below, left):Tessellating a sphere.In this rendering, each of the resulting segments is markedly curved; if we replace them with flat polygonal tiles (right), the shape gets out of whack. That said, once again, we can improve the accuracy of this tiling to an arbitrary extent by projecting a finer-grained pattern of cylinder-side squares. In the limit, the flat approximation converges on a perfect sphere.A finer tessellation of a sphere.To recap what we’ve done so far: we’ve taken a cylinder with a known and easily-calculated outer surface area: Stube = 4𝜋r2. We then approximated it with some number of square tiles of size a; the number of tiles ideally “tends to” infinity, even if we still have ways to go in the illustrations accompanying this article. Each tile has a surface area of a2.We also mapped each cylinder-side tile to a polygonal tile constructed on the surface of an inscribed sphere (radius r). Each cylinder-side square maps to a sphere-side polygon of some sort; there are no gaps or overlaps. Our next task is to figure out what’s the surface area of these newly-conjured polygons.At first blush, the polygons look like rectangles, but they’re actually isosceles trapezoids; the top edge is narrower north of the equator and the opposite is true to the south. That said, through simple geometric rearrangement, we can show that the surface area of any trapezoid is equal to the surface area of a rectangle of of the same midpoint width:Surface area of an isosceles trapezoid is w × h.In other words, we only need to figure out the midpoint w and h. We can start with the horizontal dimension: viewed from the above, the wedge that cuts through the sphere is a triangle. It has an initial span of a at the surface of cylinder (always at a distance r from the center axis) and then converges toward zero as get closer to the axis:Wedge and its intersections, top view.If d is the distance from the center axis to the midpoint of the sphere-side polygon, the width at the intersection can be trivially calculated by taking a and then scaling it depending on where d is in proportion to r:\(w = a \cdot \frac{d}{r}\)We don’t know d, but we don’t actually need it; the term is going to cancel out down the line.To calculate the area of the sphere-side trapezoid, we also need to know its height. This is a bit trickier: in the side view, the wedge is is a rectangle, but the polygon on the sphere may be tilted depending on the latitude: Wedge, side view.On the drawing, I marked angle α that corresponds to the elevation of center of the polygon. From basic trigonometry, we should expect the same angle where the horizontal blue segment (d) meets the green diagonal, so I marked this location too.Together with the y axis, the segments marked d and r form an upside-down triangle shown in the inset. This right triangle has a hypotenuse of length r and an adjacent of length d; from the definition of cosine, the ratio of these values is the same as cos(α):\(cos(\alpha) = \frac{\text{adjacent}}{\text{hypotenuse}} = \frac{d}{r}\)Next, let’s zoom in on the far end of the wedge:Wedge close-up, part 1.The green diagonal originates from the center of the sphere, so it necessarily approaches the surface at an angle of 90°. From before, we know that the internal angle between this segment and the blue horizontal line is α; the sum of these angles — downward measurement from the blue horizontal line to the orange projection — is obviously 90° + α.Let’s mark that result, get rid of the radius line, and then dangle a vertical segment (light green) from the top:Wedge close-up, part 2.In this image, I also marked an unknown angle β. The angle between the horizontal line and the tilted projection is 90° + α, and β just subtracts 90° from it; in other words, β = α.We can now look at the shaded right triangle. Viewed from the top corner, its hypotenuse (orange, diagonal) is equal to the height of the tilted projection (h) and the adjacent (green, vertical) is the same as the height of the wedge (a). The angle between these segments is α, so once again, from the definition of cosine, we can write:\(cos(\beta) = cos(\alpha) = \frac{\text{adjacent}}{\text{hypotenuse}} = \frac{a}{h}\)Per the earlier analysis, we also know that cos(α) = d / r; this allows us to make a substitution that gets rid of the cosine and then solve for h:\(\begin{array}{r l}
\text{After substitution:} & \large \frac{a}{h} = \frac{d}{r} \\
\text{Dividing both sides by } a \text{:} & \large \frac{1}{h} = \frac{d}{a \cdot r} \\
\text{Flipping the fractions around:} & h = a \cdot \frac{r}{d}
\end{array}\)We have previously calculated the width of the trapezoid as w = a · d/r and we now know that h = a · r/d. But all we’re really interested is its surface area, h × w. This multiplication cancels out d and r:\(S_{trapezoid} = w \cdot h = a \cdot \cancel{\frac{d}{r}} \cdot a \cdot \cancel{\frac{r}{d}} = a^2\)To understand the significance of this result, again: we divided the outer surface of a cylinder with an area of 4𝜋r2 into some number of a × a squares. We then mapped each of these squares to a corresponding polygon on the surface of a sphere. As it turns out, each of projected polygons has the same surface area as the originating square: a2. If both the number of segments and their surface areas remain the same, we must conclude that the mapping between the square-based approximation of a cylinder and a trapezoid-based approximation of a sphere is area-preserving. So, here’s our 4𝜋r2.Sir, but the inverse-square law?…Huh… who is this? Where am I? Ah, right. Sorry.Imagine that Sally is carrying a box of marbles and accidentally drops them on the floor. The marbles spread out in all possible directions; some of them roll toward a conveniently-placed bottomless void. How many are going to fall in?Well, if Sally’s floor happens to one-dimensional — we don’t judge — the distance to the void doesn’t matter. Half the marbles are going to roll to the left and half to the right; either way, 50% is going to end up in the hole:Yes, it’s just one dimension, but the rent is affordable.In other words, “marble intensity”, as measured by the inhabitants of the bottomless void, doesn’t depend on distance to the origin. If we wanted to be truly obnoxious, we could say that the number of marbles falling into the hole drops with the zeroth power of distance. This is because d0 = 1 for any non-zero d.Now, say that Sally splurges and upgrades to a two-dimensional floor. In this situation, if the marbles are dropped perfectly, they should spread around forming a circular front:Stay at least eight feet away from bottomless voids.The circumference of the this circle grows proportionally with distance — 2𝜋r — but the number of marbles on the ground doesn’t change. It follows that if the distance doubles, the bottomless hole only gets to swallow half as many as before:The void will not feast tonight.So, in a two-dimensional world, the falloff in marble-intensity, as witnessed by those living in bottomless hole, decreases with the first power of distance to the origin.But what if Sally violently loses her marbles in zero gravity? In this case, the moving marble-front is not a circle but the surface of a three-dimensional sphere. As before, the number of marbles can’t change, but the area they spread across now grows with the square of distance, 4𝜋r2. Hence, inverse-square law.The marbles are gone. Model credit: ingate.We have d0 for one dimension, d1 for two dimensions, and d2 for three. Care to guess what would happen in 4D?I write original articles about electronics, math, computing, and more. In particular, you might enjoy:See it with your lying earslcamtuf·Jan 10Read full storyKnow your paradoxeslcamtuf·Aug 23Read full storyGödel's beavers, or the limits of knowledgelcamtuf·June 30, 2025Read full storyAll logic, no bitelcamtuf·Jun 27Read full storyIf you like it, please subscribe.Subscribe12112ShareDiscussion about this postCommentsRestackslcamtuf’s thing reply ruleslcamtuf1dPinnedAnd yes, we could've skipped the first part by just saying that the surface area of all "standard" 3D shapes has a square term in them, or we could have made a very ugly but quantitively-valid approximation using a marble-cube instead of a marble-sphere. But mostly, I just wanted to practice 3D rendering.ReplyShareBobLeponge7mEditedBTW, you can say that the energy emitted by the point light is the same (conservation of energy). Thus when you are at a distance r from the light, the energy is spread over a sphere of radius r. You are collecting a surface X of the this energy. You are collecting X / (4.pi.r²) of the emitted energy. When you double r (because you're walking away), the surface of the sphere increase in r² but since the energy is the same, from your new position, you're still collecting on the same surface X, but you are now receiving only (X / 4.pi.newR²) => the ratio is r²/newR², it decreased in inverse square law. That's why a laser, which is not emitting on a sphere but in a small cone doesn't decrease its power in square law, but only in the fraction of the cone surface / spherical surface at the given distance.ReplyShare9 more comments...TopLatestDiscussionsNo postsReady for more?Subscribe© 2026 lcamtuf · Publisher PrivacySubstack · Privacy ∙ Terms ∙ Collection notice Start your SubstackGet the appSubstack is the home for great culture

This site requires JavaScript to run correctly. Please turn on JavaScript or unblock scripts

The inverse-square law describes a physical phenomenon where the intensity of various physical phenomena diminishes with the square of the distance from the source to the observation point. This principle applies to light, sound, and radio transmissions, meaning that if the distance from a light source is doubled, the measured luminance drops to one-quarter, and similarly for other phenomena. The text explores the geometric foundation of this law by demonstrating area preservation when approximating a three-dimensional shape.

The derivation begins by examining the relationship between a cylinder and an inscribed sphere using surface area formulas. The surface area of a sphere is $S_{sphere} = 4 \pi r^2$, and the surface area of a corresponding fitted cylinder is also $S_{tube} = 4 \pi r^2$. The argument then proceeds by approximating the cylinder's surface with a tiling of small, square tiles of side length a. By mapping these tiles onto the surface of an inscribed sphere, the text establishes that the approximation is area-preserving. This process involves analyzing the geometry of the projected wedges formed when mapping the cylinder-side squares onto the sphere surface, ultimately showing that the surface area of the resulting polygons is equal to the area of the original square, $a^2$. This demonstrates that the mapping between the square-based approximation of a cylinder and the trapezoid-based approximation of a sphere is area-preserving, thereby confirming the inverse-square relationship.

The physical significance of this mathematical relationship is further illuminated through an analogy involving the spreading of marbles in different spatial dimensions. The text distinguishes the rate of falloff based on the dimensionality of the space. In one dimension, the intensity of marbles landing in a void depends on the zeroth power of distance, meaning the ratio remains constant regardless of distance. In a two-dimensional space, the marble intensity decreases with the first power of distance, meaning if the distance doubles, the number of marbles swallowed by the void is halved. In three dimensions, where particles spread across a surface, the area occupied by the marble front increases with the square of the distance, $4 \pi r^2$, leading directly to the inverse-square law.

This relationship can also be understood through the principle of energy conservation. When energy is emitted, it spreads over the surface of a sphere of radius $r$. The amount of energy collected by a surface $X$ is inversely proportional to the square of the distance, specified by the ratio $X / (4 \pi r^2)$. When the distance $r$ is doubled, the area of the collecting surface increases proportionally to $r^2$, causing the energy received per unit area to decrease by the factor of $r^2$ relative to the new distance. This confirms that the decrease in energy density is governed by the inverse-square relationship.