Electromagnetism

The potential is where the wanderers stop

Start a random walker at a point between charged conductors and let it wander until it touches one of them. The average potential of the surfaces the walkers touch is the potential at the starting point — exactly, with no equation solved — and the charge a conductor keeps at each place on its surface is the chance that a walker arriving from far away touches it there first.

Assumes: Nothing can be held still by a static field · One number for every point, and nothing at all is lost

Nothing can be held still by a static field proved Earnshaw’s theorem from one property of the electric potential in empty space: its value at any point equals its average over any sphere around that point. That is the mean value property, and it forbade a trap. It says more than that. Read as arithmetic it is a statement about averages, and an average is what a gambler computes. The potential at a point turns out to be the expected payoff of a game played by a walker who knows no physics at all.

The game is this. Start a walker at a point inside a region bounded by conductors held at known potentials. Let it wander at random — a step in a random direction, then another — until it touches a boundary, and pay it the potential of the surface it touched. Repeat with many walkers. The average payment is the potential at the starting point. Not an approximation to it, in the limit of many walkers: the potential is defined by the same averaging the walkers perform.

Averaging is a way of walking

The cleanest version lives on a grid. On a square lattice, Laplace’s equation becomes the statement that the value at every interior node is the average of the values at its four neighbours — the discrete mean value property. A walker on the same lattice steps to one of those four neighbours with equal probability. So the expected payoff from a node is the average of the expected payoffs from its neighbours, which is the same equation with the same boundary values. The two problems have one solution because they are one problem.

The potential at a point is where its walkers end up. A square divided into a 24-step grid, with its top edge held at a potential of 1 and the other three edges at 0. From the probe point (0.29, 0.71), 4000 random walkers each step to one of their four neighbours with equal chance until they touch an edge; six of them are drawn, each ending with a dot on the edge it reached. The fraction that end on the held edge is 0.405 ± 0.008, one standard error, after an average of 122 steps. Solving Laplace's equation on the same grid by repeatedly replacing every value with the average of its four neighbours gives 0.408, and the series solution for the continuous square gives 0.408. The walkers were never told the equation: a value that is the average of its neighbours and a probability of ending somewhere are the same arithmetic.
Fig. 1 A square on a 24-step grid with its top edge held at a potential of 1 and the other three at 0. Six random walks from the probe point are drawn, each ending with a dot where it met an edge. Of 4,000 walkers, 0.405 ± 0.008 end on the held edge; replacing every grid value with the mean of its neighbours until nothing changes gives 0.408, and the series solution for the continuous square gives 0.408.

The walkers in the figure are never told about Laplace’s equation. Each one takes an average of 122 steps, most of them apparently aimless, and ends somewhere on the edge. Of four thousand, 40.5 per cent end on the top edge, and the potential at the probe point, computed by relaxing the whole grid — sweeping across it again and again replacing each value with the mean of its neighbours — is 0.408. The difference is inside one standard error.

The relaxation and the walk are the same calculation run in opposite directions. Relaxation spreads the boundary values inward, all at once, until every interior point has settled. The walk carries a single interior point outward until it finds the boundary, and repeats. One finds the potential everywhere at the cost of iterating everywhere; the other finds it at one point at the cost of sampling. This correspondence between Laplace’s equation and random walks was made rigorous by Shizuo Kakutani in 1944 for continuous Brownian motion — the motion the jiggle that proved atoms turned into a measurement — and it is the same mathematics as the equation that only runs forwards: the diffusion equation describes a crowd of walkers spreading, and Laplace’s equation is that crowd when it has stopped changing.

Why the boundary decides everything

The walk representation turns one of electrostatics’ foundational theorems from a statement into a construction.

The uniqueness theorem says that if the potential is specified everywhere on the boundary of a charge-free region, the potential inside is determined. Usually it is proved by assuming two solutions and showing that their difference, which is zero on the boundary, has no interior maximum or minimum and is therefore zero everywhere. The argument is correct and gives no picture of why.

The walkers supply one. The potential at an interior point is the average of the boundary potentials, weighted by the probabilities that a walker from that point stops at each part of the boundary. Those probabilities depend only on the shape of the region — on where walls are, not on what they are held at. So two potentials that agree on the boundary are two averages of the same numbers with the same weights, and they are equal. The boundary decides the interior because the interior’s only contact with the boundary is through the places its walkers end.

The same picture makes the inside of a conductor obvious rather than derived. A cavity inside a conductor is bounded by one surface at one potential; every walker from inside it ends on that surface and receives the same payment; so the potential inside is that value everywhere, whatever charges sit outside. A Faraday cage is a region every walker from inside must leave through the same wall. And when a charge is brought near a grounded conductor, the charge that has to be somewhere else on its surface is distributed like the landing places of walkers started at the charge.

What the walkers weigh the boundary with

The probability that a walker from a point stops on a given piece of boundary has a name — the harmonic measure of that piece, seen from that point — and on a disc it can be written down.

Where walkers leave a disc is the Poisson kernel. Walkers started 0.6 of the way from the centre of a disc to its edge, each jumping to a random point on the largest circle that fits around it until it is within 10⁻⁵ of the rim. Two walks are drawn with the circles they jumped across. Of 20000 walkers, the distribution of the angle at which they reach the rim is the histogram, and the curve is the Poisson kernel, (1 − r²)/2π(1 − 2r cos θ + r²), which is the weight with which a boundary potential at each angle contributes to the potential at the probe. The two agree to a Kolmogorov distance of 0.0051. Giving the rim a potential of cos θ, the walkers' average is 0.599 against the exact 0.6; for cos 2θ it is 0.352 against 0.360. The walkers took 16.2 jumps on average. The probe sees the near side of the rim 16 times as strongly as the far side.
Fig. 2 Walkers started at 0.6 of the radius of a disc, each jumping to a random point on the largest circle that fits around it until it is within 10⁻⁵ of the rim; two walks are drawn with the circles they jumped across. The distribution of the angle at which 20,000 walkers reach the rim matches the Poisson kernel to a Kolmogorov distance of 0.0051. Holding the rim at cos θ, the walkers average 0.599 against the exact 0.6; at cos 2θ, 0.352 against 0.360.

The walkers here use a faster version of the game, due to Mervin Muller in 1956. From any point, instead of taking many small steps, a walker jumps directly to a random point on the largest circle that fits inside the region around it. That is legitimate because a walker starting at the centre of a circle is equally likely to leave through any point of it — the mean value property again, now used as a shortcut — so the whole wander inside the circle can be replaced by one jump to its edge. The walkers reach the rim in 16 jumps on average.

Where they arrive follows the Poisson kernel,

P(θ)=1r22π(12rcosθ+r2),P(\theta) = \frac{1 - r^2}{2\pi\,(1 - 2r\cos\theta + r^2)},

the function with which the classical theory weights boundary values to produce the potential at a point rr from the centre. From 0.6 of the way out, the near side of the rim is sixteen times as heavily weighted as the far side. A walker started near a boundary is likely to hit the part of it that is near, and that is all the kernel is: the potential at a point listens mostly to the boundary close by, with a weight that falls off in a definite way.

Paying the walkers cosθ\cos\theta at the rim gives an average of 0.599, and the exact potential inside with that boundary value is rcosθr\cos\theta, which is 0.6 at the probe. Paying cos2θ\cos 2\theta gives 0.352 against the exact r2cos2θ=0.36r^2\cos 2\theta = 0.36. The walkers were given boundary values and nothing else, and they returned the harmonic function the boundary values determine.

The cost does not grow with the dimension

A random estimate is noisy, and the noise obeys a law that has nothing to do with electrostatics.

The error falls as one over the square root, in any number of dimensions. How far a walker estimate of the potential lands from the exact value, against the number of walkers, on logarithmic axes, for the centre of a square with one side held at 1 — exactly ¼ by symmetry, on a 24-step grid — and the centre of a cube with one face held at 1 — exactly ⅙, on a 12-step grid. Each dot is one independent run. The lines are one standard error of a proportion, √(p(1 − p)/N), which falls by a factor of ten for every hundred times more walkers. 10 walkers: 0.1500 in the square, 0.0667 in the cube; 40 walkers: 0.0500 in the square, 0.0083 in the cube; 160 walkers: 0.0000 in the square, 0.0229 in the cube; 640 walkers: 0.0187 in the square, 0.0214 in the cube; 2560 walkers: 0.0023 in the square, 0.0064 in the cube; 10240 walkers: 0.0071 in the square, 0.0009 in the cube. A walk from the square's centre took 169 steps on average and one from the cube's 48. The number of walkers needed for a given accuracy does not depend on the number of dimensions, which is why a potential at one point in a complicated three-dimensional region can be had without solving for it everywhere.
Fig. 3 The distance of a walker estimate from the exact potential against the number of walkers, for the centre of a square with one side held at 1 — exactly ¼ — and the centre of a cube with one face held at 1 — exactly ⅙. Each dot is an independent run; the dashed lines are one standard error, falling as 1/N1/\sqrt{N}. A walk took 169 steps on average in the square and 48 in the cube.

The two exact values come from symmetry rather than from solving anything. A square with all four sides held at 1 has a potential of 1 everywhere inside, and by symmetry each side contributes a quarter of that at the centre, so one side held at 1 gives exactly ¼. A cube’s six faces give ⅙ in the same way. That makes these clean tests of the walkers, and both follow the same law. The error of a proportion estimated from NN independent trials is p(1p)/N\sqrt{p(1-p)/N}: a hundred times more walkers buy ten times the accuracy, in a square, in a cube, and in any number of dimensions.

That independence from dimension is the practical point. Solving Laplace’s equation on a grid in three dimensions costs work proportional to the number of grid points, which grows as the cube of the resolution; to know the potential at one point, a grid method must still solve for all of them. A walk estimate costs work proportional to the number of walkers and the length of each walk, and the second grows only slowly with the complexity of the region. This is how the capacitance between the thousands of wires in an integrated circuit is extracted in practice: by walkers launched from each conductor, a method that handles geometry no grid could afford to resolve, because each estimate only ever asks about the surfaces a walker actually reaches.

Charge sits where walkers from outside land first

The most surprising reading of the correspondence concerns not the potential but the charge.

Take an isolated conductor and let walkers arrive from very far away. They must eventually touch it — in two dimensions a walk returns with certainty, as the walk that comes home shows — and where they touch has a distribution. That distribution is the harmonic measure of the conductor’s surface seen from infinity, and it is exactly proportional to the charge density the conductor carries when it is charged and left alone.

Where walkers from far away land is where a conductor keeps its charge. 20000 walkers started from far away — uniformly on a circle three half-widths out, which is how a walk from infinity first crosses it — and walked on circles until they touched a thin conducting strip. The histogram is where along the strip they landed, per unit length, with both faces counted together. The curve is the charge density on an isolated charged strip, 1/π√(1 − x²), the arcsine law, and the two agree to a Kolmogorov distance of 0.0050. A walker is 6.4 times as likely to land in the outermost 5 per cent of the width as in the same length at the centre, and the charge on a conductor crowds towards its edges for exactly that reason: it sits where a walker arriving from outside is most likely to touch first. Mean jumps per walk: 32.9.
Fig. 4 Twenty thousand walkers from far away, started uniformly on a circle three half-widths out and walked on circles until they touched a thin conducting strip. The histogram is where they landed; the curve is the charge density on an isolated charged strip, 1/π1x21/\pi\sqrt{1 - x^2}. They agree to a Kolmogorov distance of 0.0050, and the outermost bins receive 6.4 times the landings of the same width at the centre.

The reason is the same theorem read once more. The charge density at a point on a conductor’s surface is proportional to the field there — the local form of counting what comes out — which is the rate at which the potential changes as one steps off the surface. Stepping just off the surface and starting a walker, the probability that it escapes far away rather than returning to the conductor is proportional to that rate. Reversing the walk — which, for Brownian motion, has the same statistics forwards and backwards — turns the chance of escaping from a point into the chance of arriving there from far away. A conductor’s charge is distributed like the first footprints of walkers coming in from outside.

On a strip, the walkers crowd towards the edges, and the charge does: the density grows without limit at each edge, as 1/1x21/\sqrt{1-x^2}. This is the distribution how much charge a shape will hold is ultimately about, and it explains a fact that looks like a paradox — that like charges spreading as far apart as they can manage end up concentrated rather than even. The middle of the strip is shielded by its own edges. A walker heading for the middle must pass close to an edge, and it usually touches the edge first.

In three dimensions the connection becomes a measurement. A walker there does not always return; a third of walks never come home. Released from a sphere, the probability that a walker escapes to infinity rather than returning is proportional to the sphere’s capacitance. The same number, in a different guise, is the rate at which a sphere absorbs particles diffusing towards it from a surrounding gas, which is why the rate constant Smoluchowski wrote for diffusion-limited chemical reactions in 1916, 4πDR4\pi DR, has exactly the form of the capacitance of a sphere, 4πε0R4\pi\varepsilon_0 R. A reacting droplet and a charged ball of the same shape solve one equation.

Sharp edges and lightning conductors

The strip’s edges are infinitely sharp, and its charge density diverges there as the inverse square root of the distance. A thicker shape with a less extreme corner concentrates charge less violently, and the walkers measure how much less.

The sharper the edge, the more charge it keeps. Where walkers from far away land near the edges of two conductors, as landings per unit length against distance from the nearest corner or end, on logarithmic axes. 60000 walkers onto a square, whose corners are right angles seen from outside, and 30000 onto a thin strip, whose ends are knife edges. Fitted between 0.003 and 0.1 of a half-side, the square's landings rise towards the corner as distance to the power −0.338, against the −⅓ a right-angled corner forces on the potential, and the strip's as −0.480, against −½ for an edge of zero angle. Both are the local charge density on the conductor, which diverges at an exposed corner and more strongly the sharper it is — the reason a lightning conductor is pointed and a high-voltage terminal is round.
Fig. 5 Landings per unit length against distance from the nearest corner or end, on logarithmic axes, for 60,000 walkers onto a square and 30,000 onto a thin strip. Fitted between 0.003 and 0.1 of a half-side, the square’s landings rise towards its corner as distance to the power −0.338 and the strip’s towards its end as −0.480, against the −⅓ a right-angled corner forces and the −½ of a knife edge.

Near a corner whose exterior angle is α, a potential satisfying Laplace’s equation behaves as distance to the power π/α, and the field and charge as that power minus one. A square’s corner, seen from outside, spans three right angles, 3π/23\pi/2, giving 2/31=1/32/3 - 1 = -1/3. A knife edge spans a full turn, 2π2\pi, giving 1/2-1/2. A flat surface spans π and gives zero — no concentration at all. The walkers find −0.338 and −0.480 over two decades of distance, where nothing about corners was put in except the shape.

The consequence is the oldest practical application of electrostatics. The field at the surface of a conductor is proportional to its charge density, and so, as the pressure a charge puts on its own metal records, is the outward stress on the surface — and the field at which air breaks down is a fixed number. A sharp point on a charged conductor reaches that field long before the rest of the surface does, so it discharges into the air first, which is why Franklin’s lightning conductors are pointed and why every high-voltage terminal from a Van de Graaff generator to a transmission-line fitting is smooth and round. The walkers arrive at the tip first, so the charge does, so the spark does.

The same arithmetic shapes things that grow. A crystal or a metal deposit growing from a solution by diffusion adds material fastest wherever diffusing particles arrive first, and particles arriving from far away reach protruding tips before sheltered hollows. The tips grow, become sharper, and grow faster still. That instability is why electroplating left unchecked produces dendrites, and why the aggregates produced by diffusion-limited growth are branched fractals rather than lumps. It is the lightning conductor’s corner exponent, applied to a surface that keeps adding to wherever the exponent is largest.

Where walking stops being a solution

The region must be free of charge. Laplace’s equation holds only where there is no charge density. With charge present, Poisson’s equation replaces it, and the walk representation survives only by making the walker collect a contribution from the charge it passes along its path. The simple game of paying at the boundary is the charge-free case.

The boundary must fix the potential. A conductor fixes the potential on its surface, and walkers stop there. A boundary that instead fixes the field — an insulating wall with no charge on it, a plane of symmetry — requires walkers to reflect rather than stop, and a boundary between two dielectrics requires them to choose which side to continue on with probabilities set by the permittivities. Both work and both complicate the game.

The grid is not the continuum. The lattice walkers in the first figure solve the discrete equation on a 24-step grid, which differs from the continuous square by an error that shrinks as the square of the grid spacing. At this resolution the difference is below the third decimal place, which is why the relaxed grid and the series solution agree to three figures; on a coarse grid near a sharp corner they would not.

The walkers must be unbiased. Every statement here depends on each step being equally likely in every direction. A walker with a drift is solving a different equation, one with a first-derivative term, which describes a potential in a flowing medium or a charge carrier in a field — not wrong, but not Laplace’s.

The estimates are noisy by construction. A walk estimate at a point carries an uncertainty that falls only as the square root of the effort, so a walk method suits a question about one value or a few, and a grid suits a question about the whole map. Capacitance extraction uses walkers because it needs a few numbers in an enormously complicated geometry; a picture of the field lines around a simple electrode is better computed by relaxation.

What a cloud of paths does not show

The first figure draws six walks and they look like nothing — tangles on a grid with no visible relation to the smooth potential they compute. That is exactly the character of the method and it is hard to picture: the potential is not visible in any walk, only in the statistics of many, and a drawing of forty thousand walks is a grey square. The figure shows the mechanism and cannot show the average, which is the only thing with physical meaning.

Nor do the landing histograms show the reversal that connects walkers from infinity to a conductor’s charge. That step — the equivalence between the chance of escaping from a point and the chance of arriving there — rests on Brownian motion looking the same forwards and backwards in time, and it is an argument about paths rather than about where paths end. The figures measure its consequence and cannot draw its reason.

Still open: a walk for a wave

Laplace’s equation has a walker because its solutions are averages with positive weights, and a probability must be positive. A screened potential — the potential around a charge in a plasma, which falls off exponentially — still has one: the walker dies with a fixed probability per unit time, and a screened field is the payment a walker collects if it survives to the boundary. Screening is mortality.

An oscillating field has no such walker. The equation for a field varying sinusoidally in time, Helmholtz’s, has weights that change sign from one distance to the next, and a probability cannot be negative. Random methods for oscillating electromagnetic fields exist, but they either pay each walker a signed and complex amount, with an error that can grow rather than shrink with distance, or they give up the independence from dimension that makes walks worth using. Whether a probabilistic method can compute a high-frequency field in a complicated three-dimensional structure as efficiently as walkers compute a static one is an open question in computational electromagnetics, and it matters for exactly the integrated circuits where the static walkers already do the work.

The habit worth carrying away is to ask what an equation’s solution averages. An equation whose solution at a point is a positive average over its surroundings is a statement about where a random process ends, and every property of the process — its insensitivity to dimension, its crowding at sharp tips, its return or escape — becomes a property of the field.

Part 3 of 3

This essay is one argument about Potential. The others:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

The objects named here

The third axis, after the field and the reading path: the things themselves, and every essay that touches each one.

Boundary conditionsCapacitanceHarmonic functionHarmonic measureLaplace equationMonte carlo methodRandom walkSurface chargeUniqueness theorem