
Quantum core · institution-dependent · Interactive lesson
Hilbert space and operator domain
Before you can solve Ĥ|ψ⟩ = E|ψ⟩ in a box you have to say what Ĥ is, and the differential expression is only half of it. Here we name the space, the domain and the boundary form — and find that the choice which makes Ĥ an observable is the same choice that costs you momentum.
UPV-05.01 · Lesson 1 of 9 in this unit. Position is not a completion score.Quantum core · institution-dependent. Your university determines the required depth of these quantum topics, including the use of operators, differential equations and computation. Institution-dependent does not automatically mean optional.
Build the model
An operator is a formula plus a domain, and the domain fixes the spectrum.
The key idea
The box's state space is L²([0, L]) with ⟨f|g⟩ = ∫₀ᴸ f*(x)g(x) dx, and an operator on it is a differential expression together with a domain — the boundary conditions that kill the surface term from integration by parts and make the operator self-adjoint.
Example. On [0, 1.00 nm] the expression −(ħ²/2m)d²/dx² with ψ(0) = ψ(L) = 0 gives an electron 0.376, 1.504 and 3.384 eV; with ψ′(0) = ψ′(L) = 0 the very same expression gives 0, 0.376 and 1.504 eV.
The complete physical model and assumptions
An operator in quantum mechanics is a formula together with the set of vectors it is allowed to act on, and on a bounded interval the second half does the work. The space is L²([0, L]) with ⟨f|g⟩ = ∫₀ᴸ f*g dx. Two integrations by parts turn ⟨f|Ĥg⟩ − ⟨Ĥf|g⟩ into a single surface term, −(ħ²/2m)[f*g′ − f*′g] evaluated at the walls, so Hermiticity is nothing more than the demand that this bracket vanish: its value at x = L must equal its value at x = 0. That demand does not pick one operator. Dirichlet, Neumann, Robin, periodic and antiperiodic walls all kill it; the deficiency indices are (2,2), and the self-adjoint extensions form a U(2) family with four real parameters — one expression, one interval, genuinely different spectra. Physics, not mathematics, chooses among them: sending V₀ → ∞ in a finite well collapses the penetration depth 1/κ to zero and leaves ψ(0) = ψ(L) = 0. The cost is momentum. p̂ = −iħ d/dx stays symmetric on that domain, but its adjoint acts on every H¹ function with no wall condition at all; its deficiency indices are (1,1), and every self-adjoint extension is quasi-periodic, ψ(L) = e(iθ)ψ(0), with plane-wave eigenfunctions of constant modulus 1/√L that never vanish at a wall. The box therefore has a Hamiltonian and no momentum observable, and forgetting that produces flat contradictions such as ⟨p⁴⟩ = 0.
1The space comes before the operator
States in the box are vectors in L²([0, L]): square-integrable functions on the interval, identified when they agree almost everywhere, paired by ⟨f|g⟩ = ∫₀ᴸ f*(x)g(x) dx. It is a separable infinite-dimensional Hilbert space, and ψ carries units of m(−1/2) so that ⟨ψ|ψ⟩ = 1 is a pure number. One thing is easier here than on the whole line: the interval is bounded, so every bounded function is automatically square-integrable and e(ikx) is an honest vector of this space for every real k, with no delta normalisation needed. The functions √(2/L) sin(nπx/L) are one orthonormal basis of the space, not the space itself, and they arrive only after a particular Hamiltonian has been chosen. At this stage the space knows nothing about walls.
2A differential expression is not yet an operator
Write τ = −(ħ²/2m) d²/dx². By itself τ is a recipe, and it cannot be an operator on all of L²: by the Hellinger–Toeplitz theorem an everywhere-defined symmetric operator is bounded, and τ is not bounded. So an operator is a pair (τ, D) with D a dense subspace, and you must say what D is. Symmetric means ⟨f|τg⟩ = ⟨τf|g⟩ for every f, g ∈ D — this is what physicists call Hermitian. Self-adjoint is strictly stronger. The adjoint τ† is defined on every f for which g ↦ ⟨f|τg⟩ is continuous on D, and self-adjointness demands D(τ†) = D(τ), not merely D(τ†) ⊇ D(τ). Only the equality buys you the spectral theorem: a real spectrum, not merely real eigenvalues, which symmetry alone already guarantees; a complete spectral resolution, which on the box is an orthonormal eigenbasis; and a unitary e(−iĤt/ħ) that conserves the norm. In finite dimensions the distinction is empty, because every domain is the whole space. In L²([0, L]) it is the entire subject.
3The boundary form, and the family that kills it
Integrate by parts twice and everything collapses to the walls: ⟨f|τg⟩ − ⟨τf|g⟩ = −(ħ²/2m)[f*g′ − f*′g]₀ᴸ. Symmetry is exactly the vanishing of that Wronskian-type bracket, and many domains achieve it — Dirichlet ψ(0) = ψ(L) = 0; Neumann ψ′(0) = ψ′(L) = 0; Robin ψ′(0) = ψ(0)/a₀ and ψ′(L) = −ψ(L)/aL for real lengths a; periodic ψ(0) = ψ(L) with ψ′(0) = ψ′(L); antiperiodic, with a sign. Counting the family is the deficiency-index calculation: τ†ψ = ±iλψ is a second-order ODE whose two solutions are both square-integrable on a bounded interval, so n₊ = n₋ = 2 and the self-adjoint extensions form a U(2), four real parameters wide. These are different operators with different physics. For an electron on [0, 1.00 nm], Dirichlet gives 0.376, 1.504, 3.384 eV; Neumann gives 0, 0.376, 1.504 eV with a constant ground state; periodic gives 0, then 1.504 and 6.016 eV each twofold degenerate. The spectrum belongs to the domain.
4Why the infinite wall picks Dirichlet
The choice among that family is made by physics, not by taste. In a finite well of depth V₀ the exterior solution decays as e(−κ|x|) with κ = √(2m(V₀ − E))/ħ, and matching ψ and ψ′ at the left wall gives ψ′(0)/ψ(0) = κ — a Robin condition whose parameter is the penetration depth a = 1/κ. Put numbers on it: an electron near 0.376 eV in a 10.0 eV well has κ = 1.59 × 10¹⁰ m⁻¹, so a = 0.063 nm, more than 6% of a 1.00 nm box, and the honest operator there is Robin, not Dirichlet. Deepening the wall helps only as V₀(−1/2): at 100 eV, a = 0.020 nm. Sending V₀ → ∞ drives a → 0 and delivers ψ(0) = ψ(L) = 0 in the limit. Dirichlet is therefore a limit, and the kink in ψ at each wall is the fingerprint of that limit — continuity of ψ survives it, continuity of ψ′ does not.
5Momentum is symmetric and nothing more
One integration by parts gives ⟨f|p̂g⟩ − ⟨p̂f|g⟩ = −iħ[f*g]₀ᴸ. On the Dirichlet domain g(0) = g(L) = 0, the bracket vanishes, and p̂ = −iħ d/dx is symmetric. But notice what that argument does to the adjoint: the bracket vanishes for every f whatsoever, because g is already zero at both walls, so D(p̂†) is the whole of H¹([0, L]) with no wall condition — strictly larger than D(p̂). Self-adjointness needs equality, so p̂ fails. The deficiency count says the same thing arithmetically. Solving p̂†ψ = ±i(ħ/L)ψ gives ψ± = e(∓x/L), both square-integrable because the interval is bounded, so n₊ = n₋ = 1 and the extensions form a U(1) circle: ψ(L) = e(iθ)ψ(0), with eigenvalues pₙ = ħ(θ + 2πn)/L and eigenfunctions e(ipₙx/ħ)/√L. Every one of them has |ψ| = 1/√L at both walls, so none can satisfy ψ(0) = 0. No self-adjoint momentum operator lives on the Dirichlet domain.
6Boundedness is what creates the ambiguity
Run the same deficiency calculation on three geometries and the pattern is clear. On the whole line e(∓x/L) is not square-integrable, the indices are (0,0), and p̂ is already self-adjoint with spectrum ℝ. On the half-line [0, ∞) only e(−x/L) survives, the indices are (1,0), and because they are unequal there is no self-adjoint extension at all — a radial momentum operator simply does not exist. On [0, L] both survive, the indices are (1,1), and you inherit a circle of choices. What does survive on the Dirichlet domain is 2mĤ = p̂†p̂, the expression p̂² with Dirichlet walls, which is self-adjoint even though p̂ is not, so ⟨p²⟩ = (nπħ/L)² and the product Δx Δp are legitimate — x̂ maps the Dirichlet domain into itself, so ⟨[x̂, p̂]⟩ = iħ picks up no boundary term. What fails is applying p̂² twice. For ψ ∝ x(L − x), p̂²ψ is a nonzero constant that does not vanish at the walls, so p̂⁴ψ is undefined and the naive answer ⟨p⁴⟩ = ħ⁴∫ψ*ψ⁗ dx = 0 is meaningless; the spectral sum gives 120ħ⁴/L⁴.
Key equations
Read the units, assumptions and limits before substituting.
Inner product on L²([0, L])
⟨f|g⟩ = ∫₀ᴸ f*(x) g(x) dx
One integral fixes adjoints, orthogonality and normalisation for everything that follows.
ψ has units m(−1/2), so ⟨ψ|ψ⟩ = 1 is a pure number; the interval is bounded, so e(ikx) is in the space.An operator is expression plus domain
Ĥ = (τ, D), τ = −(ħ²/2m) d²/dx²
Names the thing you must supply before Ĥ|ψ⟩ = E|ψ⟩ has an answer at all.
D ⊂ H²([0, L]), the functions with ψ″ square-integrable, and D is dense in L². Same τ on two domains is two different operators, not one operator twice.The boundary form symmetry must kill
⟨f|τg⟩ − ⟨τf|g⟩ = −(ħ²/2m)[f*g′ − f*′g]₀ᴸ
Turns 'is it Hermitian?' into a two-point algebraic test on the boundary values.
A Wronskian-type surface term with units of energy, evaluated only at x = 0 and x = L.Self-adjoint extensions of τ
n₊ = n₋ = 2 ⟹ a U(2) family
Counts how much freedom the walls leave, and warns that τ alone has no spectrum.
n± count the square-integrable solutions of τ†ψ = ±iλψ, with λ > 0 an energy. Four real parameters; Dirichlet, Neumann, Robin, periodic and antiperiodic are all members.The Dirichlet member
ψ(0) = ψ(L) = 0 ⟹ Eₙ = n²π²ħ²/(2mL²)
The V₀ → ∞ limit of the finite well, reached as the penetration depth 1/κ → 0.
n = 1, 2, 3, … ; electron with L = 1.00 nm gives E₁ = 0.376 eV and E₂ = 1.504 eV.Momentum's circle of extensions
n₊ = n₋ = 1 ⟹ ψ(L) = e(iθ)ψ(0), pₙ = ħ(θ + 2πn)/L
Shows no extension of p̂ meets Dirichlet, so momentum is not an observable in the box.
θ ∈ [0, 2π), n ∈ ℤ. Every eigenfunction is e(ipₙx/ħ)/√L, of modulus 1/√L at both walls.Interactive lab
Predict first. Explore the model. Compare the result.
Explore the model
Try this. Sweep θ and watch the two right-wall dots rotate by e(iθ) while the envelope stays pinned at ±1/√L; step the branch n to add a whole wavelength without moving either wall value. Dirichlet needs ψ = 0 at both walls, and no setting of θ or n ever gets there.
Live results
- WAVENUMBER k L / π
- 0.50
- MOMENTUM p L / ħ
- 1.57
- Re ψ(L) / ψ(0)
- 0.000
- |ψ(L)| / |ψ(0)|
- 1.000
Results follow this lesson’s model and assumptions. Displayed values are rounded.
Predict → change one variable → check
Plan a change before running it. Every other input stays at the saved baseline.
Saved baseline. Extension phase θ / π: 0.50; Branch index n: 0
This experiment is kept only while this page is open. It does not change saved course progress.
Catch the common trap
The usual slip is to fix the operator first and impose the boundary condition afterwards, as a condition on the answer: Ĥ = p̂²/2m is Hermitian, and then, separately, ψ must vanish at the walls. In infinite dimensions that ordering is wrong, because the condition is part of the operator. The same expression on [0, 1.00 nm] gives an electron a ground state of 0.376 eV with Dirichlet walls, exactly 0 with Neumann walls, and a twofold-degenerate first excited level at 1.504 eV with periodic ones; nothing separates those three operators but their domains. The companion slip is treating 'Hermitian' as one property. Symmetry, ⟨f|Âg⟩ = ⟨Âf|g⟩ for f, g ∈ D, is cheap, and p̂ has it on the Dirichlet domain. Self-adjointness also demands D(†) = D(Â), and p̂ fails that — which matters, because a real spectrum, a complete eigenbasis and unitary evolution are theorems about self-adjoint operators, while symmetry alone guarantees only that any eigenvalues are real.
Practice & worked examples
3 authored examples. Make an attempt, then reveal the reasoning one step at a time.
EasyExample 1
An electron is confined to 0 ≤ x ≤ 1.00 nm. Keeping the expression −(ħ²/2m)d²/dx² fixed throughout, find the two lowest energies under (a) Dirichlet walls, (b) Neumann walls, and (c) periodic walls, and say where the first degeneracy appears.
Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.
0 of 4 steps revealed.
- Fix the scale once: ħ²/(2mₑL²) = (1.0546 × 10⁻³⁴)² / (2 × 9.109 × 10⁻³¹ × 1.00 × 10⁻¹⁸) = 6.105 × 10⁻²¹ J = 0.0381 eV. Every energy below is this number times (kL)².
- (a) Dirichlet: ψ = A sin(kx) + B cos(kx) with ψ(0) = 0 kills B, and ψ(L) = 0 forces sin(kL) = 0, so kL = nπ with n ≥ 1. E₁ = π² × 0.0381 = 0.376 eV and E₂ = 4π² × 0.0381 = 1.504 eV. Here n = 0 gives ψ ≡ 0, which is no state at all.
- (b) Neumann: ψ′(0) = 0 kills A, ψ′(L) = 0 forces sin(kL) = 0 again — but now k = 0 survives, because ψ = constant has ψ′ = 0 at both walls and normalises to 1/√L. So E₀ = 0 and E₁ = 0.376 eV.
- (c) Periodic: ψ = e(ikx) with e(ikL) = 1, so kL = 2πn with n ∈ ℤ. E = 4n²π² × 0.0381 eV gives 0 from n = 0 alone, then 1.504 eV from n = ±1 — the first degeneracy, twofold, one state circulating each way.
Answer. Dirichlet 0.376 and 1.504 eV; Neumann 0 and 0.376 eV; periodic 0 and 1.504 eV, the second twofold degenerate. One differential expression, three operators, three spectra.
MediumExample 2
On the Dirichlet domain D = (ψ ∈ H¹([0, L]) : ψ(0) = ψ(L) = 0), show that p̂ = −iħ d/dx is symmetric but not self-adjoint. Then take the self-adjoint extension with θ = π/2 and, for L = 1.00 nm, give the momentum eigenvalue nearest zero and its kinetic energy.
Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.
0 of 5 steps revealed.
- Symmetry: ⟨f|p̂g⟩ − ⟨p̂f|g⟩ = −iħ∫₀ᴸ (f*g′ + f*′g) dx = −iħ[f*g]₀ᴸ. For f, g ∈ D both endpoint values vanish, so the bracket is zero and p̂ is symmetric on D.
- Not self-adjoint: that same bracket vanishes for any f at all, since g is already zero at both walls. So D(p̂†) = H¹([0, L]) with no boundary condition — strictly larger than D, and self-adjointness requires equality, not containment.
- The extensions: p̂†ψ = ±i(ħ/L)ψ gives ψ± = e(∓x/L), both in L²([0, L]) because the interval is bounded, so the deficiency indices are (1,1) and the extensions are p̂θ on the domain ψ(L) = e(iθ)ψ(0), θ ∈ [0, 2π).
- Eigenvalues: e(ipL/ħ) = e(iθ) forces pL/ħ = θ + 2πn, so pₙ = ħ(θ + 2πn)/L. At θ = π/2 the ladder in units of ħ/L reads …, −3.5π, −1.5π, 0.5π, 2.5π, …, and ħ/L = 1.0546 × 10⁻²⁵ kg m s⁻¹, so the nearest zero is p = 0.5π × 1.0546 × 10⁻²⁵ = 1.657 × 10⁻²⁵ kg m s⁻¹.
- Its kinetic energy is p²/2m = (0.5π)² × 0.0381 eV = 0.0940 eV. But |ψ| = 1/√L = 3.16 × 10⁴ m(−1/2) at both walls, so this eigenfunction is not in D: the extension and the box are incompatible.
Answer. p = 0.5πħ/L = 1.657 × 10⁻²⁵ kg m s⁻¹, with p²/2m = 0.0940 eV. p̂ is symmetric on D, but D(p̂†) = H¹ is strictly larger, and no extension's eigenfunction vanishes at a wall.
HardExample 3
Take the normalised state ψ(x) = √(30/L⁵) x(L − x) in a Dirichlet box. Compute ⟨p²⟩ and ⟨Ĥ⟩, then compute ⟨p⁴⟩ twice — once directly as ħ⁴∫ψ*ψ⁗ dx, once as ‖p̂²ψ‖² — and decide which answer is right and why.
Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.
0 of 6 steps revealed.
- Normalisation: ∫₀ᴸ x²(L − x)² dx = L⁵(1/3 − 1/2 + 1/5) = L⁵/30, so N = √(30/L⁵) is right.
- ⟨p²⟩ = ‖p̂ψ‖² = ħ²∫₀ᴸ|ψ′|² dx with ψ′ = N(L − 2x) and ∫₀ᴸ(L − 2x)² dx = L³/3, giving ⟨p²⟩ = ħ²(30/L⁵)(L³/3) = 10ħ²/L². Hence ⟨Ĥ⟩ = 5ħ²/(mL²) = (10/π²)E₁ = 1.0132 E₁, a 1.32% excess — for L = 1.00 nm, 0.381 eV against 0.376 eV.
- Now the two routes. ψ⁗ = 0 everywhere, so ħ⁴∫₀ᴸ ψ*ψ⁗ dx = 0. But p̂²ψ = −ħ²ψ″ = 2ħ²N is a nonzero constant, so ‖p̂²ψ‖² = 4ħ⁴N²L = 4ħ⁴(30/L⁵)L = 120ħ⁴/L⁴. The two disagree completely.
- Arbitrate in the eigenbasis: cₙ = 4√60/(n³π³) for odd n and 0 for even n, so |cₙ|² = 960/(n⁶π⁶) and |c₁|² = 0.9986. Then ⟨p⁴⟩ = Σ|cₙ|²(nπħ/L)⁴ = (960ħ⁴/π²L⁴) Σodd n⁻² = (960ħ⁴/π²L⁴)(π²/8) = 120ħ⁴/L⁴.
- Zero was impossible in any case: ⟨p⁴⟩ ≥ ⟨p²⟩² = 100ħ⁴/L⁴, because the variance of the observable p̂² cannot be negative. It is 20ħ⁴/L⁴ here.
- The integration by parts that should link the two routes failed because p̂²ψ = 2ħ²N does not vanish at the walls, so it leaves the Dirichlet domain and p̂⁴ψ is undefined on this state. The surface term thrown away is ħ⁴[ψ*ψ‴ − ψ*′ψ″]₀ᴸ = −4ħ⁴N²L = −120ħ⁴/L⁴ — exactly the missing amount.
Answer. ⟨p²⟩ = 10ħ²/L² and ⟨Ĥ⟩ = 5ħ²/(mL²) = 1.0132 E₁; ⟨p⁴⟩ = 120ħ⁴/L⁴. The zero is wrong: p̂² carries ψ out of the domain, so p̂⁴ is not defined on it.
Quick check
Select an answer and explain it before checking.
Review & continue
The box's state space is L²([0, L]) with ⟨f|g⟩ = ∫₀ᴸ f*(x)g(x) dx, and an operator on it is a differential expression together with a domain — the boundary conditions that kill the surface term from integration by parts and make the operator self-adjoint.
- Explain the relationship without looking at the equation.
- Check a sign, a unit and a model assumption in your working.
- Return to the lab or worked example if a step is still unclear.