Pluck a guitar string that is fixed at both ends and only certain notes ring out: the string can swing as one hump, two humps, three humps — but never one-and-a-half. A tiny particle trapped between two walls behaves in exactly the same way. Pin an electron inside a little box and it can only hold certain special amounts of energy, never anything in between. We call those allowed amounts energy levels and number them $n = 1, 2, 3, \ldots$
From a wave that has to fit
The trapped particle acts like a wave, and that wave must fit perfectly inside the box — pinned to zero at both walls, just like the guitar string. The longest wave that fits stretches one hump across the box width $L$, so its wavelength is $\lambda = 2L$. The next fits two humps ($\lambda = L$), and in general $\lambda_n = 2L/n$. A shorter wave means more energy, so the levels climb. The simplest way to say it: $E_n = n^2 E_1$, where the lowest rung $E_1$ is set by the box itself. For an electron in a $1\text{ nm}$ box (about ten atoms wide), $E_1 \approx 0.38$ eV, so $E_2 = 4E_1 \approx 1.5$ eV and $E_3 = 9E_1 \approx 3.4$ eV. Notice the gaps grow — the rungs are not evenly spaced.
The precise law
Energy ladder
$$E_n = \frac{n^2\pi^2\hbar^2}{2mL^2}, \qquad n = 1, 2, 3, \ldots$$
This packs in two facts. Energy scales as $1/L^2$: squeeze the box and every level shoots upward — that is why the slider L moves the whole ladder so dramatically. And energy scales as $1/m$: a heavier particle (slider m, in electron masses) has a gentler ladder. Even the ground state $n=1$ has $E_1 > 0$: a quantum particle can never sit perfectly still in a box, because confining it to a small region forces a spread of momentum ($\Delta x\,\Delta p \ge \hbar/2$). That irreducible zero-point energy is why liquid helium refuses to freeze even at absolute zero.
Try this in the sim above
First, drag L from $1.0$ down to $0.3$ nm and watch $E_n$ rocket up — squeezing a particle costs energy. Second, raise the mass m from $1$ to $20\,m_e$ and see the whole ladder collapse toward the floor; heavy objects behave "classically" because their levels crowd together. Third, switch to Superposition mode, mix $n=1$ with $n=2$, and watch $|\Psi|^2$ slosh back and forth: a single level sits frozen, but a blend of two comes alive at the beat frequency $(E_2-E_1)/\hbar$.
Section 03
Equations & Derivation
The particle in a one-dimensional infinite square well — confined between $x=0$ and $x=L$ with $V=0$ inside and $V=\infty$ outside — is the simplest non-trivial quantum system. It demonstrates the three signature features of quantum mechanics: energy quantisation, standing-wave eigenfunctions, and zero-point energy.
Outside the well, $V=\infty$ forces $\psi=0$. Continuity of $\psi$ at the walls gives the boundary conditions:
$$\psi(0)=0, \qquad \psi(L)=0$$
2. General Solution Inside
Let $k=\sqrt{2mE}/\hbar$. Then $\psi'' = -k^2\psi$, with general solution $\psi(x) = A\sin(kx) + B\cos(kx)$. The first boundary condition $\psi(0)=0$ kills the cosine term, so $\psi(x) = A\sin(kx)$.
3. Quantisation from the Right Wall
The condition $\psi(L)=0$ requires $\sin(kL)=0$, i.e., $kL = n\pi$ for integer $n$. Plugging back:
Quantised Energy Levels
$$\boxed{\;E_n = \frac{n^2\pi^2\hbar^2}{2mL^2}, \qquad n = 1, 2, 3, \ldots\;}$$
The lowest energy $E_1 \neq 0$ is the zero-point energy, a direct consequence of the uncertainty principle.
4. Normalised Wavefunctions
Requiring $\int_0^L |\psi_n|^2\,dx = 1$ gives the normalisation $A=\sqrt{2/L}$:
Adding time dependence via $|\Psi_n(x,t)\rangle = \psi_n(x)\,e^{-iE_n t/\hbar}$ gives a state whose probability density $|\Psi_n|^2$ is independent of time. Hence the name "stationary state". Only superpositions $\Psi = c_1\psi_1 e^{-iE_1 t/\hbar} + c_2\psi_2 e^{-iE_2 t/\hbar}$ have $|\Psi|^2$ that oscillates with beat frequency $\omega_{12}=(E_2-E_1)/\hbar$.
6. Expectation Values
Observable
Result
$\langle x\rangle$
$L/2$ (for any pure $n$)
$\langle x^2\rangle$
$L^2/3 - L^2/(2n^2\pi^2)$
$\langle p\rangle$
$0$
$\langle p^2\rangle$
$n^2\pi^2\hbar^2/L^2 = 2mE_n$
$\Delta x\,\Delta p$
$\frac{\hbar}{2}\sqrt{\frac{n^2\pi^2}{3} - 2}$
For $n=1$, $\Delta x\Delta p = \hbar\sqrt{\pi^2/12 - 1/2}/1 \approx 0.568\,\hbar$, just above the Heisenberg minimum $\hbar/2$.
For a square box ($L_x=L_y$), states like $(n_x,n_y)=(1,2)$ and $(2,1)$ are degenerate — same energy, different wavefunctions. This degeneracy is broken when symmetry is broken (e.g., asymmetric box).
Symbol Table
Symbol
Meaning
SI Unit / Value
$\psi(x)$
Wavefunction (probability amplitude)
m⁻¹/²
$|\psi|^2$
Probability density
m⁻¹
$E_n$
Quantised energy of level $n$
J (often eV)
$L$
Box width
m
$m$
Particle mass
kg
$\hbar$
Reduced Planck constant
$1.055\times 10^{-34}$ J·s
$n$
Quantum number
integer ≥ 1
$k_n = n\pi/L$
Wavenumber
m⁻¹
Mapping to the simulation
Slider n picks the eigenstate; L sets the box width (0.1-5 nm covers atomic to nanostructure scales); m is in units of the electron mass (0.5-20 mₑ). For $n=1$, $L=1$ nm, $m=m_e$, the simulation gives $E_1 \approx 0.376$ eV — exactly matching $\pi^2\hbar^2/(2m_eL^2)$. The Superposition mode mixes states $n$ and $n_2$; you can watch $|\Psi|^2$ oscillate at the difference frequency.
Reference: Griffiths — Introduction to Quantum Mechanics, 3rd Ed., §2.2 'The Infinite Square Well'; Cohen-Tannoudji, Diu & Laloë — Quantum Mechanics, Vol. I, Complement HII; Sakurai & Napolitano — Modern Quantum Mechanics, 2nd Ed., §A.2.
Section 04
Frequently Asked Questions
Eigenstate mode plots ψₙ(x) as the real part (cyan), imaginary part (green when time-evolved), and |ψ|² (magenta) — all updated continuously. The shaded region between x=0 and x=L is the box; the walls (V=∞) are shown as red barriers. Probability density mode shows only |ψ|², which is what experiment can actually measure. Superposition mode evolves a 2-state mix and you can literally see the wave packet oscillate back and forth at the beat frequency (E₂−E₁)/ℏ — the famous 'quantum sloshing'. The 2D mode renders ψ as a colour map for the rectangular well.
Quantum dots (semiconductor nanocrystals 2-10 nm across) behave almost exactly like 3D boxes — their colour depends on size via Eₙ ∝ 1/L². CdSe quantum dots are tuned by varying L to emit any colour from blue (small) to red (large). Conjugated π-electron systems in dye molecules (carotenoids, polyenes) are well-modelled as 1D boxes — the lowest absorption matches E₂−E₁. Electrons in metallic nanoparticles, neutrons in atomic nuclei (rough approximation), and even acoustic modes in flutes are particle-in-a-box analogues.
Localising a particle in a finite region forces a non-zero momentum spread (Δp ≥ ℏ/2Δx). Since ⟨p⟩=0 by symmetry, ⟨p²⟩ = (Δp)² > 0, so KE = ⟨p²⟩/(2m) > 0. This is the Heisenberg uncertainty principle made manifest: confinement creates kinetic energy. The same reason hydrogen's electron doesn't crash into the proton — the resulting tight localisation would give it more kinetic energy than is favourable.
Because V=∞ outside the box, finding the particle there would require infinite energy. So ψ=0 outside. Continuity of the wavefunction (otherwise ψ' would be infinite, violating the Schrödinger equation in a non-pathological way) forces ψ(0)=ψ(L)=0. This boundary condition is what discretises the allowed wavelengths to λₙ=2L/n — a quantum cousin of standing waves on a guitar string.
Single eigenstates have time dependence e^(−iEₙt/ℏ), but |e^(−iEₙt/ℏ)|² = 1 — so |Ψₙ|² is time-independent. With a superposition c₁ψ₁ + c₂ψ₂, the cross-term has e^(−i(E₁−E₂)t/ℏ), giving |Ψ|² a beat at frequency (E₂−E₁)/ℏ. This is exactly how molecular wave packets, Rabi oscillations, and quantum-information operations work — coherent superposition is the resource, eigenstates are inert.
In a square box (Lₓ=Lᵧ), the symmetry x↔y is exact, so states (nₓ,nᵧ)=(1,2) and (2,1) have the same energy E ∝ 1²+2² = 5. This is a symmetry degeneracy. Break the symmetry (Lₓ ≠ Lᵧ, or add an asymmetric perturbation) and the levels split — exactly how external fields lift atomic degeneracies (Zeeman, Stark effects). Without symmetry, no degeneracy.
The particle does not 'travel' between the walls in the classical sense. In a stationary state, the wavefunction is everywhere at once — a standing wave. There's no 'where the particle is right now'; only a probability density. In a time-dependent superposition, the probability density can shift back and forth, but at no moment is it a localised classical particle. This is the deepest conceptual jump in QM: the wavefunction is the system, not a description of a hidden classical trajectory.
Resources: MIT OpenCourseWare 8.04 'Quantum Physics I' Lecture 6; HyperPhysics — 'Particle in a Box' (hyperphysics.phy-astr.gsu.edu/hbase/quantum/pbox.html); Khan Academy — 'The Schrödinger Equation'; PhET — 'Quantum Bound States'.
Section 05
Common Misconceptions
❌ Misconception: 'The particle bounces back and forth between the walls.'
✅ Correction: There is no classical bouncing trajectory. In an eigenstate the wavefunction is a stationary standing wave — the probability density |ψ|² is time-independent. The particle has no definite position, no trajectory, and (for n=1) zero average momentum. Picturing the particle as 'a tiny ball ricocheting' makes wrong predictions for measurement statistics, which always follow |ψₙ(x)|² with its characteristic nₙ−1 nodes.
📖 Reference: Griffiths, Introduction to Quantum Mechanics, 3rd Ed., §2.2 'The Infinite Square Well'
❌ Misconception: 'The ground state energy is zero — like a particle at rest classically.'
✅ Correction: The ground state has E₁ = π²ℏ²/(2mL²), strictly positive. A classical particle confined and 'at rest' would have zero KE, but quantum confinement forbids that — the uncertainty principle requires Δp ≥ ℏ/(2L), giving minimum KE ≈ ℏ²/(8mL²). Numerically, for L=1 nm and an electron, E₁ ≈ 0.376 eV — far from zero. This zero-point energy is real and measurable (e.g., in helium that doesn't freeze even at 0 K).
📖 Reference: Cohen-Tannoudji, Quantum Mechanics, Vol. I, Complement HII §3 'Particle in an Infinite One-Dimensional Well'
❌ Misconception: 'The wavefunction has units of probability.'
✅ Correction: ψ has units of (length)⁻¹/² in 1D so that |ψ|² has units of probability density (length)⁻¹. The probability of finding the particle in [a,b] is ∫|ψ|²dx, which is dimensionless. ψ itself is a complex amplitude — it can be negative, complex, or zero — and individual values of ψ have no direct probabilistic meaning. Only |ψ|² is observable.
📖 Reference: Sakurai, Modern Quantum Mechanics, 2nd Ed., §1.4 'Position, Momentum, and Translation'
❌ Misconception: 'Higher n means the particle is more energetic and so moves faster between walls.'
✅ Correction: Higher n means more nodes in the wavefunction and higher kinetic energy via Eₙ ∝ n². But it does NOT mean the particle 'moves faster'. The wavefunction has more nodes (n−1 of them), the spatial period is 2L/n, and the average kinetic energy ⟨p²⟩/(2m) is bigger. The classical concept of velocity does not apply to a stationary state — it applies only in the limit of a localised wave packet, which requires combining many n-states.
📖 Reference: Liboff, Introductory Quantum Mechanics, 4th Ed., §6.4 'Particle in a Box'
❌ Misconception: 'In a 2D box, the (n,m) states all have unique energies.'
✅ Correction: Only in an asymmetric box (Lₓ ≠ Lᵧ). In a square box, (n,m) and (m,n) are degenerate when n ≠ m: E ∝ n²+m². This includes (1,2)/(2,1), (1,3)/(3,1), (2,3)/(3,2), and accidental degeneracies like (1,7)=(5,5)=(7,1) all at n²+m²=50. Counting unique energy levels from n²+m² (the Gauss circle problem) is a classic number-theory question.
📖 Reference: Griffiths, Introduction to Quantum Mechanics, 3rd Ed., §6.2 'Degenerate Perturbation Theory' & Problem 4.2
❌ Misconception: 'A measurement of energy collapses the wavefunction to its position.'
✅ Correction: Energy and position are different observables and don't share eigenstates (they don't commute — [Ĥ, x̂] ≠ 0). Measuring energy collapses the wavefunction to an energy eigenstate ψₙ — a delocalised standing wave. To collapse to a position, you must measure x̂. After an energy measurement giving Eₙ, the position is then maximally uncertain (consistent with that ψₙ). Conflating the two is one of the most common errors in introductory QM.
📖 Reference: McKagan et al. — 'Deeper look at student learning of quantum mechanics', Phys. Rev. ST PER 4, 020103 (2008)
Misconception research: McKagan, S. B. et al. — 'Deeper look at student learning of quantum mechanics', Phys. Rev. ST PER 4, 020103 (2008); Singh, C. — 'Student understanding of quantum mechanics', Am. J. Phys. 69, 885 (2001); Styer, D. — 'Common misconceptions regarding quantum mechanics', Am. J. Phys. 64, 31 (1996); Müller & Wiesner — Am. J. Phys. 70, 200 (2002).