2D Particle in a Box
Quantum mechanics in two dimensions — watch probability density patterns emerge as standing waves in a rectangular well. Adjust quantum numbers to see the beautiful nodal patterns that constrain where a particle can exist.
Quantum State
About this experiment
The infinite square well is the simplest exactly solvable quantum system, and extending it to two dimensions reveals rich physics that the one-dimensional case only hints at. In one dimension, the wavefunctions are simple sine waves: ψn(x) = √(2/L) sin(nπx/L), and the energy levels go as n². In two dimensions, the solution factorizes beautifully via separation of variables — because the x and y coordinates are independent, the two-dimensional wavefunction is simply the product of two one-dimensional solutions: ψ(x,y) = (2/L) sin(nxπx/L) sin(nyπy/L). The energy becomes E = (ℏ²π²/2mL²)(nx² + ny²), the sum of the independent contributions from each dimension. This separability is a deep feature of the rectangular geometry and is what makes the system exactly solvable.
The most striking phenomenon in two dimensions is degeneracy: different quantum states can share the same energy. For a square box (Lx = Ly), the states (nx, ny) = (1, 2) and (2, 1) both have energy E = 5E0, but their probability density patterns are completely different — one has a vertical nodal line, the other horizontal. This degeneracy is a consequence of the square's rotational symmetry (its invariance under 90-degree rotations), and breaking that symmetry by making the box rectangular lifts the degeneracy, splitting previously equal energy levels apart. The swap button in this simulation lets you see both degenerate partners and appreciate how the same energy produces strikingly different spatial patterns. Nodal lines — the curves where |ψ|² = 0 exactly — are places where the particle can never be found, quantum-mechanical forbidden zones carved out by the wave nature of matter.
These probability density patterns are the quantum analog of vibrating drumhead modes, known classically as Chladni patterns (after Ernst Chladni, who made them visible by sprinkling sand on vibrating plates in 1787). The mathematical connection is exact: both systems satisfy the same Helmholtz equation with Dirichlet boundary conditions, and the standing-wave solutions are identical sine products. Clicking on the visualization activates "measurement mode," which simulates wavefunction collapse: the particle is found at a random position weighted by the probability density |ψ|², demonstrating Born's rule. Before measurement, the particle exists as a spread-out probability distribution; upon measurement, it localizes to a single point. Repeated measurements build up a distribution that converges to the theoretical probability density — quantum mechanics makes statistical predictions, never deterministic ones for individual events.