The Big Picture
Take a region of empty space and sprinkle some electric charge into it. Two questions immediately arise: where is the voltage high, where is it low, and which way will a test charge accelerate? Both questions are answered by a single scalar field, the electric potential . And that potential is locked to the charge distribution by exactly one equation, Poisson's equation:
Here is the charge per unit volume, is the permittivity of free space, and is the Laplacian. Read it left-to-right: tell me how the potential curves at a point, and I'll tell you how much charge is sitting there. Read it right-to-left: tell me where the charges are, and I'll tell you how the potential bends.
Why this equation is so powerful. All of static electricity — every capacitor, every semiconductor device, every lightning rod, every MRI gradient coil — is governed by this single PDE. Solve it once for your geometry, and you know the voltage everywhere, the field everywhere (), and the energy stored in the system. There is no "step 2."
The Curvature-Equals-Source Intuition
Forget the Greek letters for a moment. The Laplacian of a function at a point compares the function's value there to the average of its immediate neighbours:
If a point is exactly at the average of its surroundings, . If it's a peak (higher than average), the Laplacian is negative. If it's a valley, the Laplacian is positive. Now look at Poisson:
Wherever there is positive charge (), the right-hand side is negative, so the left-hand side is negative — the potential at that point sits above the average of its neighbours. Positive charge pushes the voltage up locally; negative charge pulls it down. No charge? Then the potential is exactly the average of its surroundings (this is Laplace's equation, and the "mean value property" of harmonic functions).
Analogy 1 — the rubber sheet. Imagine a tight rubber sheet. Now press your finger up from below at some location. The sheet bulges up there and gently flattens far away. That bulge is the potential ; your finger is the positive charge. Press from above and you get a dip — that's negative charge. Multiple fingers? Their bulges and dips superpose linearly (because Poisson is linear).
Analogy 2 — temperature with heaters. Replace voltage by temperature and charge by heat sources. In steady state, the temperature distribution in a slab satisfies : heat sources push the temperature above the local average; cold spots are sinks. Exactly the same equation, different letters. This is why the same numerical solver works for both physics problems.
From Gauss's Law to Poisson's Equation
Poisson's equation isn't pulled out of a hat — it is a one-line consequence of Gauss's law plus the definition of the potential. The chain is short enough to memorize.
- Gauss's law (differential form). The divergence of the electric field equals the charge density divided by : .
- Electric field from a potential. In electrostatics there are no time-varying magnetic fields, so the field is curl-free, which means it can be written as the gradient of a scalar: . The minus sign is convention so that points from high voltage to low voltage (positive test charges roll downhill in ).
- Substitute step 2 into step 1. . Setting that equal to and flipping signs gives the result:
Notice what got hidden: the operator is the Laplacian. In Cartesian coordinates it expands to second partial derivatives:
The reason every interesting electrostatics problem boils down to second derivatives is precisely this substitution chain. The field is a gradient; the source rule is on the divergence; chained together, you get a second-order operator on the potential.
Boundary Conditions Make It Concrete
Poisson's equation by itself has infinitely many solutions: you can add any harmonic function (a solution to ) to a particular solution and get another valid one. What pins down the unique physical answer is the boundary data:
| Type | What you specify | Physical situation |
|---|---|---|
| Dirichlet | V = V_0 on the boundary | Conductor held at fixed voltage (battery terminal, ground plane) |
| Neumann | \partial V/\partial n = E_n on the boundary | Specified surface charge on a conductor (insulated or biased) |
| Robin (mixed) | a V + b \,\partial V/\partial n = c | Imperfect contact, leakage, lossy coatings |
Practical rule of thumb. Inside any solid conductor in electrostatic equilibrium, is constant. This means the surface of every conductor in your problem becomes a Dirichlet boundary at the conductor's voltage. Most engineering problems reduce to: "solve Poisson in the air/insulator region, with the metal boundaries held at known voltages."
Worked Example: Uniformly Charged Sphere
This single example unlocks an entire class of problems. Take a ball of radius with total charge spread uniformly through its volume. By spherical symmetry, the potential depends only on the distance from the centre, so the Laplacian in spherical coordinates collapses to:
Inside the sphere the charge density is the constant . Outside there is no charge, so Poisson reduces to Laplace. We solve the two regions separately and glue them together at by demanding and match (no surface charge at the boundary, no sudden jump in field).
Uniformly charged sphere:
Inside the sphere the potential is parabolic; outside it falls as . The yellow band marks the sphere's interior.
After integrating twice in each region and applying the matching conditions plus the physical requirement , you get the famous piecewise answer:
Three things to notice in the visualization above:
- Outside the sphere, the answer is identical to a point charge sitting at the centre. The sphere's extended structure is invisible from outside — Newton's "shell theorem," rediscovered electrically.
- Inside, the potential is a downward-opening parabola in , peaking at the centre. The electric field grows linearly from zero at the centre to its maximum at the surface.
- At the surface (), both pieces give and both derivatives match — that's the gluing condition working.
Expand: do the integration by hand (try it yourself first!)
Step 1 — write the ODE in each region. Spherical Laplacian on a radial function: . Multiply by : . Now we just antidifferentiate twice.
Step 2 — inside (), constant density .
- Integrate once: . For to be finite (and to be zero) at the centre, we need . So .
- Integrate again: . The constant will be fixed by the matching at .
Step 3 — outside (), zero density.
- Integrate twice with : . Demanding kills . So with still to find.
Step 4 — match at .
- Match values: .
- Match slopes: and . Setting equal: .
- Use to simplify . Plug back into the value-match to get .
Step 5 — assemble. Substituting back:
Sanity check with numbers. Take , . Using :
- At centre: .
- At surface: .
- At twice the radius: . Note exactly — outside, the potential is the point-charge potential, so it drops as .
Interactive: Charges → Potential Field
Reading the equation is one thing; seeing the potential field rearrange itself as you drop charges is something else. The widget below solves the 2D Poisson equation on a 64×64 grid in real time using Jacobi relaxation (the same algorithm you'll see in Python next). Click anywhere to drop a charge; toggle between positive and negative; watch the equipotential contours and the field arrows reorganize themselves around every new source.
Click anywhere to place charges
The grid solves in real time using Jacobi relaxation. Red = high potential, blue = low. Arrows show ; gray dots mark equipotential contours.
What to play with. Place two charges far apart — see how their influences add (superposition). Place +/- close together — that's a dipole, and the field becomes strongly directional. Place a ring of positive charges — the interior becomes nearly equipotential (a model for a Faraday cage). Crank iterations up: more iterations means closer to the true solution. Drop it way down to see how Jacobi propagates information one cell per sweep (look at the early-iteration speckle pattern near isolated charges).
Parallel-Plate Capacitor with Bulk Charge
Here is a problem you can do entirely by hand, and which models a real device. Take two large flat conductors separated by a gap . Hold the left plate at and the right plate at . Suppose the space between them is filled with a uniform space charge of density (think: electron cloud in a vacuum tube, or doped semiconductor depletion region). What does the potential look like in between?
Far from the edges of the plates, the field only depends on (the direction across the gap). Poisson reduces to a 1D ODE:
Integrate twice: . The boundary conditions and fix and :
Two limiting cases make this physical:
| Case | Result |
|---|---|
| No bulk charge (\rho = 0) | V(x) = V_0\,x/d — linear voltage drop, uniform field E = -V_0/d. |
| Bulk charge \rho \ne 0 | Voltage profile bends into a parabola; field is no longer uniform — it is stronger at one plate than the other. |
Numbers for the second case. Take , , . Then at the midplane (not 50 V — the parabola bulges upward). The field at the negatively-biased plate is and at the positive plate . The asymmetry is the signature of bulk charge — and it's why semiconductor depletion-region calculations all start with Poisson.
Computing It: Finite-Difference Jacobi Solver
For anything more complicated than a sphere or parallel plates, you go numerical. The most transparent approach is finite differences + Jacobi relaxation:
- Replace the continuous Laplacian by its three-point (1D) or five-point (2D) stencil.
- Solve algebraically for the centre cell: in 1D, in 2D.
- Sweep that update across the grid over and over until nothing changes. Because the discrete Laplacian is a strict contraction (after fixing the boundary), this loop converges from any starting guess.
Below is a complete, runnable Python implementation. It includes a manufactured-solution test: pick , compute , feed that into the solver, and verify it recovers back. The max error of is the discretization error from the finite stencil (it shrinks as as you refine the grid).
Why Jacobi? It is the cleanest possible expression of "curvature equals source." Each grid cell literally averages its neighbours and adds a charge bump. The downside is it is slow: information about boundary conditions diffuses by one cell per sweep, so a grid of points takes iterations to converge in 1D. Real-world solvers use multigrid (which fixes this to ) or conjugate-gradient methods. But every one of those advanced methods is built on top of the relaxation idea you see here.
PyTorch on the GPU
The exact same Jacobi update vectorizes trivially to 2D, and PyTorch lets you run it on a GPU with one line change. Why bother? Two reasons. First, modern problems with millions of grid points are GPU-natural — the inner loop is just neighbour-averaging, which is exactly what convolutional kernels do. Second, the iteration is differentiable: PyTorch's autograd lets you backpropagate through it, which means you can use Poisson's equation as a layer inside a neural network (physics-informed networks, learned PDE solvers, neural-style Poisson image editing).
Running this on the two-charge dipole above gives , , and the potential at the geometric centre is nearly zero (). The small asymmetry between the two extrema comes from the fact that the two charges aren't equally far from the boundary — the Dirichlet edge pulls the potential slightly more strongly toward zero on whichever side is closer.
Method of Images: A Trick from Symmetry
Before computers, a generation of physicists used a beautiful trick to solve otherwise-hard Poisson problems: the method of images. Suppose you have a single positive charge sitting at height above an infinite grounded conducting plane ( on the plane). The potential in the upper half-space is hard — there are induced surface charges on the plane that you don't know in advance.
The trick: replace the conductor by an imaginary charge at depth . The plane becomes the perpendicular bisector of the line joining and , and by symmetry the potential along that bisector is exactly zero — exactly the boundary condition we need! Now there's no conductor anywhere: just two free-space charges, and the potential in the upper half-plane is simply the sum of their Coulomb potentials.
Why this works mathematically: Poisson's equation has unique solutions given the sources and the boundary conditions. The image construction reproduces both the correct sources (only the real charge is in the physical region) and the correct boundary ( on the plane). Uniqueness then guarantees it's the right answer.
Try this in the interactive widget above. Place a positive charge somewhere in the upper half of the grid and a negative charge of the same magnitude directly below it, mirrored across the horizontal midline. Crank up the iterations. You'll see the equipotential line along the midline is essentially zero — the widget reproduces the method-of-images solution from first principles.
Connections to Machine Learning
Poisson's equation isn't just a physics curiosity — it appears in modern machine learning in surprisingly direct ways.
- Poisson image editing. When you paste a region from one photo into another, the seam usually shows. The Perez/Gangnet 2003 algorithm solves a Poisson equation where the source is the gradient of the source patch and the Dirichlet boundary is the destination image at the seam. The result blends seamlessly — and the solver is exactly the 2D Jacobi (or multigrid) you saw above. Modern photo editors (including the "Healing Brush") use this.
- Physics-informed neural networks (PINNs). A PINN trains a neural network by minimizing the residual at sampled points, plus a boundary loss. The Laplacian inside the loss is computed by autograd — exactly the same tool that backpropagates through every other neural net. The PyTorch code above is the "classical" teacher; a PINN is the neural student.
- Graph Laplacian regularization. In semi-supervised learning, you spread labels across a graph by solving where is the graph Laplacian. This is exactly Laplace's equation on a discrete graph — Poisson's equation with zero source. The labelled nodes act as Dirichlet boundary conditions, and the propagation rule is the discrete "average of neighbours" you saw at the start of this section.
- Diffusion models. Score-based generative models can be reframed as solving a partial differential equation related to the heat (Fokker-Planck) equation, and the steady-state of that equation is Poisson's equation. The same mathematics that places voltage around charges places probability mass around training data points.
Summary
| Idea | What you should remember |
|---|---|
| Poisson's equation | \nabla^2 V = -\rho/\varepsilon_0 — Laplacian of potential equals minus charge density over permittivity. |
| Intuition | Positive charge sits above the average of its neighbours; negative charge sits below; no charge means the potential is the local average (mean value property). |
| Derivation | Gauss's law plus E = -\nabla V collapses to Poisson in one substitution. |
| Boundary conditions | Dirichlet (fixed voltage on conductors) is the most common; Neumann fixes surface charge; both make the solution unique. |
| Canonical worked example | Uniformly charged sphere: parabolic V inside, 1/r outside, glued at r = R. Outside is indistinguishable from a point charge. |
| Numerical workhorse | Finite difference + Jacobi relaxation: each cell averages its neighbours plus a charge bump. Slow but bulletproof; foundation for multigrid. |
| ML connection | Poisson image blending, PINNs, graph Laplacian semi-supervision, diffusion-model steady states. |
The takeaway in one sentence. Once you can read as "the potential at a point exceeds the average of its neighbours in proportion to the local charge," every numerical method, every analytic trick, and every machine-learning application of this equation becomes a variation on a single, intuitive theme.