Quantum Mechanics

Particle in a Box

Confine a particle to 0 < x < L with infinite walls — energy quantizes as E_n = n²π²ℏ²/(2mL²)

The particle in a box is the simplest non-trivial bound-state problem in quantum mechanics. A particle confined to a 1D region 0 < x < L with infinite walls has only standing-wave solutions ψ_n(x) = √(2/L) sin(nπx/L). Boundary conditions ψ(0) = ψ(L) = 0 force quantized energies E_n = n²π²ℏ²/(2mL²). Ground state is non-zero: E₁ > 0 — pure quantum confinement. For an electron in a 1 Å well, E₁ = 37.6 eV. Underpins quantum-dot color tuning and semiconductor nanostructures.

  • EnergiesE_n = n²π²ℏ²/(2mL²)
  • Wavefunctionsψ_n = √(2/L) sin(nπx/L)
  • Ground stateE₁ > 0 from confinement
  • ScalingE ∝ 1/L² — smaller box, higher E
  • Electron, 1 Å boxE₁ = 37.6 eV
  • ApplicationsQuantum dots, QW lasers, π-electrons

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Why the particle-in-a-box matters

Every undergraduate quantum mechanics class opens here. The system has just enough physics to teach quantization, just little enough math to fit on a single chalkboard. Solve a free Schrödinger equation, apply boundary conditions, count standing waves — and you have a complete bound-state spectrum, eigenfunctions and all. Once you see how ψ(0) = ψ(L) = 0 forces sin(nπx/L), the rest of bound-state QM is variations on this theme.

  • Pedagogy. The cleanest demonstration that boundary conditions cause quantization. No magic — just sine waves that have to fit. The same logic works for organ pipes and guitar strings; the only difference is what's vibrating (here, ψ rather than air pressure).
  • Quantum dots and nanocrystals. Semiconductor nanoparticles (CdSe, CdTe, InP, perovskites) confine excitons in roughly cubic boxes 2–10 nm wide. The optical band gap shifts with size as 1/L² — measured in absorption spectra and exploited commercially in QLED displays and bio-imaging probes.
  • Quantum well lasers. Semiconductor laser diodes use planar GaAs/AlGaAs structures where electrons are confined in one direction (well thickness ~5–10 nm). The lasing wavelength is set by the n=1 to n=2 quantum-well transition energy — engineered by tuning L.
  • π-electron systems. Conjugated molecules (polyenes, dyes) approximate as 1D particle-in-a-box for delocalized π electrons. Cyanine dyes' colors correlate with chain length — the textbook example of particle-in-a-box predicting molecular spectra to within a factor of two.
  • Nuclear shell model (precursor). The 3D infinite square well is the simplest model of nucleons confined to a nucleus. It predicts magic numbers approximately (2, 8, 20, ...) — refined by adding spin-orbit coupling to recover the experimental magic numbers (2, 8, 20, 28, 50, 82, 126).

Setting up and solving

Inside the box (0 < x < L), V(x) = 0. Outside, V = ∞. The Schrödinger equation inside is the free-particle equation:

−(ℏ²/2m) ψ''(x) = E ψ(x)

→ ψ''(x) = −k² ψ(x), with k = √(2mE)/ℏ

→ ψ(x) = A sin(kx) + B cos(kx)

Outside the box, ψ(x) = 0 (infinite walls). For ψ to be continuous: ψ(0) = 0 and ψ(L) = 0. The first forces B = 0. The second forces sin(kL) = 0 → kL = nπ, n = 1, 2, 3, ... (n=0 gives the trivial ψ ≡ 0 — not a state).

Normalize ∫₀^L |ψ_n|² dx = 1 → A = √(2/L). Putting it together:

ψ_n(x) = √(2/L) sin(nπx/L)

E_n = (ℏ²k²)/(2m) = n²π²ℏ²/(2mL²),  n = 1, 2, 3, ...

E_1 = π²ℏ²/(2mL²)   (ground state)
E_2 = 4 E_1
E_3 = 9 E_1
E_n = n² E_1

Numerical examples

SystemLmE₁Notes
Electron in atomic-size box1 Å (10⁻¹⁰ m)9.11 × 10⁻³¹ kg37.6 eVAtomic-scale ionization energies
Electron in CdSe quantum dot5 nm~0.13 m_e~120 meVVisible emission tuning
Electron in QW laser10 nm0.067 m_e (GaAs)~56 meV1.55 μm telecom wavelength
Hydrogen atom in 0.1 mm trap10⁻⁴ m1.67 × 10⁻²⁷ kg2 × 10⁻¹⁸ eVBEC trap, ultracold
1 g ball in 1 cm box10⁻² m10⁻³ kg5 × 10⁻⁴³ JVastly negligible (classical)

The 1/L² scaling is dramatic: shrinking a box by 100× lifts E₁ by 10⁴×. This is why quantum effects appear at nanoscale: chemistry happens because L ~ Å gives eV-scale energies (comparable to room temperature thermal scrambling is 25 meV → atoms barely care).

Worked example — confining an electron

An electron is trapped in a box of width L = 1 Å. Compute the photon emitted in the n=2 → n=1 transition.

E₁ = π²ℏ²/(2m_e L²)
   = π² · (1.055 × 10⁻³⁴ J·s)² / (2 · 9.11 × 10⁻³¹ kg · (10⁻¹⁰ m)²)
   = 6.03 × 10⁻¹⁸ J = 37.6 eV

E₂ = 4 E₁ = 150.4 eV
ΔE = E₂ − E₁ = 112.8 eV  (UV / soft X-ray photon)

λ = hc / ΔE = (1240 eV·nm) / 112.8 eV = 11 nm  (extreme UV)

For a 10 nm box (quantum dot), the same calculation gives E₁ ≈ 3.8 meV, ΔE = 11 meV, λ ≈ 110 μm (far-IR) — but realistic dots have additional band-gap energy from the underlying semiconductor, so visible emission requires combining the dot's particle-in-a-box energies with the bulk band gap.

Common mistakes

  • Including n = 0. ψ_0(x) = sin(0) = 0 everywhere is not a state — it's no probability anywhere, which violates normalization. The lowest allowed n is 1.
  • Forgetting the π². E_n = ℏ²k²/(2m) with k = nπ/L gives the π² factor. Dropping it gives wrong numbers by an order of magnitude.
  • Using infinite-well results for finite barriers. Real quantum dots have finite walls; the wave function leaks into the barrier as an exponential decay. Energies are smaller than infinite-well predictions. For deep wells, the lowest states are well-approximated; higher states require corrections.
  • Conflating 1D with 3D. A 3D box L×L×L has E_{n_x,n_y,n_z} = (n_x²+n_y²+n_z²)·E_1^{1D}. The ground state has n_x=n_y=n_z=1, energy 3·E_1^{1D}. Higher-level degeneracies appear: E = 6 has (1,1,2), (1,2,1), (2,1,1).
  • Believing the particle has definite position. Inside the box, the particle is in a stationary wave state — probability density |ψ_n|² oscillates with x but is constant in time. The classical picture of bouncing back and forth doesn't apply to energy eigenstates; it applies only to superpositions.
  • Forgetting orthogonality of different n. ⟨m|n⟩ = (2/L) ∫₀^L sin(mπx/L) sin(nπx/L) dx = δ_mn. Different eigenstates are orthogonal — a measurement in one eigenstate has zero probability of "leaking" into another.

Frequently asked questions

Why does confinement produce quantized energies?

Inside the box, the Schrödinger equation is ψ''(x) = −(2mE/ℏ²)ψ — sinusoidal solutions sin(kx) or cos(kx) with k = √(2mE)/ℏ. Boundary conditions at the infinite walls force ψ(0) = ψ(L) = 0. Only sines with nodes at both ends fit: sin(kL) = 0 → kL = nπ. This selects discrete k-values, hence discrete E_n. Quantization is geometric: only certain wavelengths fit the room. Same principle as a guitar string fixed at both ends — only specific harmonics resonate.

Why does E_n scale as n²?

Because momentum is quantized in units of πℏ/L (boundary condition) and kinetic energy goes as p². State n has wavelength 2L/n — fits n half-wavelengths in the box. Momentum p_n = nπℏ/L. Energy E_n = p_n²/(2m) = n²π²ℏ²/(2mL²). Level spacing E_{n+1} − E_n grows as 2n+1 — not constant like the QHO. Higher levels get farther apart. This means transition wavelengths shift to bluer values for excited states — the basis of quantum dot color tuning.

What is the ground state energy of an electron in a 1 Å box?

E₁ = π²ℏ²/(2m_e L²) with m_e = 9.11 × 10⁻³¹ kg, L = 10⁻¹⁰ m. Plugging in: E₁ = π² · (1.055 × 10⁻³⁴)² / (2 · 9.11 × 10⁻³¹ · (10⁻¹⁰)²) = 6.03 × 10⁻¹⁸ J = 37.6 eV. Significant — comparable to atomic ionization energies, which is the right scale because atoms are ~Å-size confined-electron systems. For a 10 nm quantum dot (semiconductor nanocrystal scale), E₁ drops to ~3.8 meV — observable as optical absorption edge shifts. For a 1 cm macroscopic box, E₁ ≈ 6 × 10⁻¹⁵ eV — utterly negligible, consistent with classical behavior.

Why is the ground state energy non-zero?

The lowest allowed n is n=1, not n=0 — because ψ_0(x) = sin(0·πx/L) = 0 everywhere, which is no state at all (no probability of finding the particle anywhere). The smallest non-trivial standing wave has one half-wavelength fitting the box, giving k_1 = π/L. Energy E_1 = π²ℏ²/(2mL²) > 0 is the zero-point energy from confinement: a localized particle must have momentum spread Δp ~ ℏ/L (uncertainty principle), so kinetic energy ~ Δp²/(2m) ~ ℏ²/(2mL²). The factor of π² is the geometric correction for the exact boundary problem.

How does it relate to real quantum dots?

Semiconductor quantum dots are tiny crystals (2–10 nm) that confine electrons in three dimensions. The energy spectrum is roughly 3D particle-in-a-box: E_n ~ n²π²ℏ²/(2m*L²) with m* the effective mass (smaller than m_e in most semiconductors). Smaller dots → higher energies → bluer emission. CdSe dots tunably emit from red (large) through green to blue (small). This effect is commercially exploited in quantum-dot displays (QLED TVs), bio-imaging fluorophores, and quantum-dot solar cells. The particle-in-a-box model is the leading-order physics — corrections from finite barriers, electron-hole binding (excitons), and surface effects follow.

What happens with finite walls?

If the walls have finite height V₀ instead of infinity, the wave function leaks into the classically forbidden region as a decaying exponential. The boundary condition becomes ψ' continuous, not ψ = 0. This shifts energy levels down (the wave function has more room) and allows quantum tunneling out of the box for sufficiently thin walls. Real quantum dots have finite barriers — typical conduction band offsets ~100–300 meV. The infinite-square-well approximation is good for the lowest few states; higher states approach the barrier and require numerical treatment of the finite-well Schrödinger equation.