
Physics V course sequence · Interactive lesson
The Hamiltonian as a self-adjoint operator
Before you solve a single Schrödinger equation you must build its left-hand side, and that is two jobs, not one: promote the classical energy to p̂²/2m + V(x̂), choosing an ordering wherever x and p mix, then pin down the domain — because hermiticity is decided at the boundary, not by the formula.
UPV-04.01 · Lesson 1 of 9 in this unit. Position is not a completion score.Build the model
An operator is a differential expression plus a domain.
The key idea
The Hamiltonian is the self-adjoint energy operator built by substituting x̂ and p̂ = −iℏ d/dx into the classical energy, together with the domain of states on which its boundary terms vanish and D(Ĥ†) = D(Ĥ).
Example. For an electron on [0, 1 nm] with Dirichlet walls ψ(0) = ψ(L) = 0, Ĥ = −(ℏ²/2m) d²/dx², and its lowest eigenvalue is π²ℏ²/2mL² = 6.02 × 10⁻²⁰ J = 0.376 eV.
The complete physical model and assumptions
Classical mechanics hands you an energy function H(x, p) = p²/2m + V(x); quantum mechanics needs the generator of time evolution, an operator on the Hilbert space L². Canonical quantisation is the bridge: x becomes multiplication by x, p becomes −iℏ d/dx, and the energy becomes Ĥ = −(ℏ²/2m) d²/dx² + V(x̂). The recipe has two costs, and this topic is about both. First, it is ambiguous wherever a classical product mixes x and p — x̂p̂ and p̂x̂ differ by iℏ, so classical xp has several quantum images, and hermiticity forces at least the symmetrised (x̂p̂ + p̂x̂)/2. Second, and deeper: what the recipe delivers is a differential expression, not yet an operator. An unbounded operator exists only together with its domain — which states it may act on, and what they do at the boundary — and the familiar check ⟨φ|Ĥψ⟩ = ⟨Ĥφ|ψ⟩ (symmetry) is strictly weaker than self-adjointness, Ĥ = Ĥ† with equal domains. The gap is not pedantry: only a self-adjoint Ĥ carries a complete real spectrum, and only a self-adjoint Ĥ exponentiates, by Stone's theorem, into the unitary evolution e(−iĤt/ℏ) that conserves probability. The boundary conditions of every wall, well and delta spike in this unit are exactly the data that finish the operator.
1Promote x and p, and the energy comes along
Canonical quantisation is a substitution with rules. Keep the classical Hamiltonian H(x, p) = p²/2m + V(x), then promote: x̂ acts as multiplication by x, p̂ as −iℏ d/dx, both on the position-basis wavefunction ψ(x) in L²(ℝ). Kinetic energy becomes −(ℏ²/2m) d²/dx² — in three dimensions the Laplacian −(ℏ²/2m)∇² — and the potential becomes multiplication by V(x). The pair is calibrated by the commutator: [x̂, p̂] = iℏ mirrors the Poisson bracket {x, p} = 1 with the factor iℏ, which is the entire content of the word 'quantisation'. Numbers anchor it: for an electron ℏ²/2mₑ = 3.81 eV Ų, so a wavefunction forced to bend on the scale of an ångström carries electron-volt kinetic energies — atomic physics fixed by one coefficient.
2Where the recipe stalls: operator ordering
The substitution is only well defined because p²/2m + V(x) never multiplies x by p. The classical observable xp has at least three quantum images — x̂p̂, p̂x̂ and (x̂p̂ + p̂x̂)/2 — differing by multiples of iℏ, since x̂p̂ − p̂x̂ = iℏ. The first two are not even Hermitian: (x̂p̂)† = p̂x̂ = x̂p̂ − iℏ. Hermiticity therefore forces the symmetrised product, and Weyl ordering extends the rule to any polynomial in x and p. Nor is the ambiguity exotic: a charged particle in a magnetic field carries (p̂ − qA(x̂))²/2m, whose expansion produces the cross term p̂⋅A + A⋅p̂, collapsing to 2A⋅p̂ only in Coulomb gauge ∇⋅A = 0, where the factors commute. Every ordering choice shifts the operator at order ℏ — invisible classically, measurable quantum mechanically.
3An operator is an expression plus a domain
In ℂⁿ every matrix acts on every vector. In L² that fails: Ĥ is unbounded and cannot act on the whole space. The function ψ = 1/(1 + |x|) is square-integrable, yet x̂ψ is not, because ∫ x²/(1 + |x|)² dx diverges; the kink e(−|x|) is normalisable, but its second derivative contains −2δ(x), which the kinetic term cannot digest. So defining Ĥ means naming its domain D(Ĥ): the dense set of states smooth enough, decaying fast enough, and — on an interval — obeying stated boundary conditions. Change the domain and you change the operator, spectrum included: −(ℏ²/2m) d²/dx² on [0, L] with Dirichlet walls has levels 1, 4, 9, … in units of π²ℏ²/2mL², while the periodic domain ψ(0) = ψ(L), ψ′(0) = ψ′(L) delivers 0, 4, 16, … in the same unit, each nonzero level twice. Same expression, different physics.
4Hermiticity is decided at the boundary
Test the kinetic term against two states φ and ψ on [0, L]. Two integrations by parts give ⟨φ|T̂ψ⟩ − ⟨T̂φ|ψ⟩ = (ℏ²/2m)[φ̄′ψ − φ̄ψ′]₀ᴸ: the interior cancels identically, and the entire question of hermiticity condenses onto four boundary numbers. The figure below computes this live: φ = sin(2πx/L) respects the Dirichlet walls, while ψ is given a leak ψ(0) = β, and the defect comes out as −4πβ in units of ℏ²/2mL — growing linearly with the leak and utterly indifferent to the interior amplitude. Killing the bracket for every pair of states in the domain is a condition on the domain, and its solutions form a four-parameter family: Dirichlet ψ = 0, Neumann ψ′ = 0, periodic identification, and the Robin interpolations ψ′ = κψ with real κ — every one a legitimate, distinct, self-adjoint Hamiltonian.
5Symmetric is not yet self-adjoint
Symmetry — ⟨φ|Ĥψ⟩ = ⟨Ĥφ|ψ⟩ on D(Ĥ) — can hold while the adjoint Ĥ†, defined on every φ for which some η satisfies ⟨φ|Ĥψ⟩ = ⟨η|ψ⟩ for all ψ in D(Ĥ), lives on a strictly larger domain. The clean counterexample is momentum on the half-line: p̂ = −iℏ d/dx on x ≥ 0 with ψ(0) = 0. The boundary term iℏφ̄(0)ψ(0) dies through ψ(0) = 0 alone, so the adjoint imposes no condition on φ — and it owns the normalisable eigenfunction e(−x/a) with the imaginary eigenvalue iℏ/a. Von Neumann's deficiency indices count the L² solutions of Ĥ†χ = ±iλχ with λ > 0: equal indices mean self-adjoint extensions exist and form a family; here they are (1, 0), so no boundary condition whatever can repair p̂. The physics is honest — momentum generates translations, and translating a half-line state pushes it off its space. A confined particle keeps a kinetic energy, since −d²/dx² there has indices (1, 1), but it has no momentum observable.
6What self-adjointness buys, and how a grid hides it
Self-adjointness is the hypothesis of the two theorems this unit runs on. The spectral theorem gives Ĥ a real spectrum and a complete spectral resolution: an orthonormal eigenbasis of levels Eₙ when the spectrum is discrete, as in a box, joined by a continuous part when it is not. Stone's theorem exponentiates Ĥ into the unitary U(t) = e(−iĤt/ℏ), and unitarity is probability conservation; a merely symmetric operator generates no such group. Numerically the issue seems to evaporate: discretise on N points and Ĥ becomes a finite real symmetric matrix, and in finite dimensions symmetric and self-adjoint coincide. But the domain has not vanished — it has moved into the stencil. Ending the three-point Laplacian at the first and last rows silently sets ψ = 0 one step beyond each wall, so scipy.linalg.eigh_tridiagonal is solving the Dirichlet extension; modelling periodic or Robin physics means editing the corner entries of the matrix, which is the boundary condition wearing numerical clothes.
Key equations
Read the units, assumptions and limits before substituting.
Canonical quantisation
Ĥ = p̂²/2m + V(x̂), with p̂ = −iℏ d/dx
Turns the classical energy function H(x, p) into the operator that will generate the dynamics; [x̂, p̂] = iℏ is what calibrates the pair.
x̂ multiplies by x (m); p̂ carries kg m s⁻¹; ℏ = 1.055 × 10⁻³⁴ J sKinetic operator in the position basis
p̂²/2m = −(ℏ²/2m) d²/dx² → −(ℏ²/2m)∇² in 3D
Curvature is kinetic energy: the faster ψ bends, the more the state costs. 3.81 eV Ų is why atoms, bonded on ångström scales, trade in electron-volts.
ℏ²/2mₑ = 6.10 × 10⁻³⁹ J m² = 3.81 eV Ų for an electronOrdering ambiguity
x̂p̂ − p̂x̂ = iℏ → classical xp ↦ (x̂p̂ + p̂x̂)/2
Classical mechanics cannot order what commutes; hermiticity demands a symmetrised ordering wherever a Hamiltonian mixes x with p, fixing (x̂p̂ + p̂x̂)/2 for xp but leaving several Hermitian choices for higher products.
x̂p̂ alone is not Hermitian: (x̂p̂)† = p̂x̂ = x̂p̂ − iℏSymmetry lives at the boundary
⟨φ|Ĥψ⟩ − ⟨Ĥφ|ψ⟩ = (ℏ²/2m)[φ̄′ψ − φ̄ψ′]ₐᵇ
For real V everything interior cancels: hermiticity of Ĥ is decided entirely by four boundary numbers, so it is a condition on the domain.
φ̄ is the conjugate; the bracket is evaluated at the interval's endpoints a, bSelf-adjoint, not just symmetric
Ĥ = Ĥ† requires D(Ĥ†) = D(Ĥ)
Only self-adjointness delivers the spectral theorem and, via Stone's theorem, the unitary e(−iĤt/ℏ); a merely symmetric Ĥ generates no unitary evolution at all.
symmetric means Ĥ ⊂ Ĥ†: the adjoint's domain may still be strictly biggerOne expression, two spectra
ψ(0) = ψ(L) = 0 → Eₙ = n²π²ℏ²/2mL²periodic → 4n² × π²ℏ²/2mL²
Changing only the domain changes the measured energies: the boundary condition is physical data, not decoration.
Dirichlet levels 1, 4, 9, …; periodic gives 0, 4, 16, …, each nonzero one doubly degenerateInteractive lab
Predict first. Explore the model. Compare the result.
Explore the model
Try this. Drive β to 0 and the two matrix elements snap together as the defect bar collapses — then slide α anywhere: the interior amplitude reshapes the curve but never moves the defect, because hermiticity lives at the walls, not in the bulk.
Live results
- ψ AT LEFT WALL β
- 0.30
- ⟨φ|T̂ψ⟩
- 1.26 ℏ²/2mL
- ⟨T̂φ|ψ⟩
- 5.03 ℏ²/2mL
- DEFECT (DIFFERENCE)
- -3.77 ℏ²/2mL
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. Wall leak β = ψ(0): 0.30; Interior amplitude α: 1.00
This experiment is kept only while this page is open. It does not change saved course progress.
Catch the common trap
Students import the finite-dimensional theorem — a matrix equal to its conjugate transpose is Hermitian, done — into L², and conclude that any Ĥ with real V is self-adjoint because a formal integration by parts works. But the integration by parts is exactly where the claim leaks: it leaves the bracket (ℏ²/2m)[φ̄′ψ − φ̄ψ′] at the endpoints, which vanishes only on a chosen domain, and different choices are different operators — Dirichlet walls on [0, L] give levels 1, 4, 9 × π²ℏ²/2mL², periodic identification gives 0, 4, 16. Worse, a domain can make an operator symmetric while its adjoint keeps a strictly bigger domain: −iℏ d/dx on the half-line with ψ(0) = 0 passes every formal check yet has no self-adjoint version at all. Formal hermiticity is a property of the formula; self-adjointness is the formula plus the right domain, and only the second is an observable.
Practice & worked examples
3 authored examples. Make an attempt, then reveal the reasoning one step at a time.
EasyExample 1
Quantise the classical energy H = p²/2m + ½mω²x² for an electron in a trap with ω = 2.00 × 10¹⁵ s⁻¹. Write Ĥ in the position basis and evaluate both coefficients, the kinetic one in eV Ų and the potential one in eV Å⁻².
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.
- Promote: x → x̂ (multiplication by x) and p → p̂ = −iℏ d/dx. No term mixes x with p, so no ordering choice arises and Ĥ = −(ℏ²/2m) d²/dx² + ½mω²x̂² is unambiguous.
- Kinetic coefficient: ℏ²/2mₑ = (1.0546 × 10⁻³⁴)²/(2 × 9.109 × 10⁻³¹) = 6.10 × 10⁻³⁹ J m². Dividing by 1.602 × 10⁻¹⁹ J eV⁻¹ and multiplying by 10²⁰ Ų m⁻² gives 3.81 eV Ų.
- Potential coefficient: ½mω² = 0.5 × 9.109 × 10⁻³¹ × (2.00 × 10¹⁵)² = 1.82 J m⁻², which is 1.82 × 10⁻²⁰ J Å⁻² = 0.114 eV Å⁻².
- Check the operator by balance: the kinetic scale 3.81/d² eV equals the potential scale 0.114 d² eV at d = (3.81/0.114)^¼ = 2.4 Å — precisely √(ℏ/mω), the trap's natural width, read off before solving anything.
Answer. Ĥ = −(3.81 eV Ų) d²/dx² + (0.114 eV Å⁻²) x², with x in Å; balancing the two coefficients gives the natural width (3.81/0.114)^¼ ≈ 2.4 Å = √(ℏ/mω).
MediumExample 2
The classical observable A = xp is proposed as the operator x̂p̂. Show that in every normalised state its expectation value has imaginary part ℏ/2, and write the operator that actually represents A.
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.
- Conjugate the expectation value: ⟨x̂p̂⟩* = ⟨ψ|(x̂p̂)†|ψ⟩ = ⟨ψ|p̂x̂|ψ⟩, using x̂† = x̂ and p̂† = p̂ and the reversal of order under the adjoint.
- Subtract: ⟨x̂p̂⟩ − ⟨x̂p̂⟩* = ⟨ψ|[x̂, p̂]|ψ⟩ = ⟨ψ|iℏ|ψ⟩ = iℏ for any normalised ψ — the commutator is a multiple of the identity, so the state drops out.
- Since z − z* = 2i Im z, the imaginary part is ℏ/2 = 5.27 × 10⁻³⁵ J s, state-independent. A measured value must be real, so x̂p̂ represents no observable.
- Symmetrise:  = (x̂p̂ + p̂x̂)/2 is Hermitian by construction. Writing p̂x̂ = x̂p̂ − iℏ shows  = x̂p̂ − iℏ/2 — exactly the offending imaginary part subtracted off.
Answer. Im⟨x̂p̂⟩ = ℏ/2 ≈ 5.27 × 10⁻³⁵ J s in every normalised state; the observable is the symmetrised (x̂p̂ + p̂x̂)/2, which equals x̂p̂ − iℏ/2.
HardExample 3
A particle lives on the half-line x ≥ 0 with ψ(0) = 0. Show that p̂ = −iℏ d/dx is symmetric on this domain but admits no self-adjoint version, using the trial function χ(x) = √(2/a) e(−x/a) with a = 1.00 nm.
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.
- Symmetry: ⟨φ|p̂ψ⟩ − ⟨p̂φ|ψ⟩ = −iℏ[φ̄ψ]₀^∞ = iℏ φ̄(0)ψ(0) = 0, because every ψ in the domain has ψ(0) = 0. The formal hermiticity check passes.
- But it passes through ψ(0) = 0 alone: φ needed no condition, so the adjoint's domain D(p̂†) carries no boundary condition and is strictly larger than D(p̂).
- χ is normalised and admissible for the adjoint: ∫₀^∞ (2/a) e(−2x/a) dx = (2/a)(a/2) = 1, and χ(0) = √(2/a) ≠ 0 is now allowed.
- Apply the adjoint: p̂†χ = −iℏ(−1/a)χ = (iℏ/a)χ — a normalisable eigenfunction with the purely imaginary eigenvalue iℏ/a = i × 1.05 × 10⁻²⁵ kg m s⁻¹, impossible for any self-adjoint operator.
- Von Neumann's test makes it terminal: p̂†χ = +iλχ with λ = ℏ/a > 0 has the one L² solution e(−x/a), while p̂†χ = −iλχ gives e(+x/a), which diverges. Deficiency indices (1, 0) are unequal, so no self-adjoint extension exists.
- Physics: momentum generates translations, and a translation pushes a half-line state off its space. Kinetic energy survives confinement — −d²/dx² there has equal indices (1, 1) and the family ψ′(0) = κψ(0), κ real — but momentum itself does not.
Answer. Symmetric, yes; self-adjoint, never: p̂† owns the normalisable eigenfunction χ with imaginary eigenvalue iℏ/a ≈ i × 1.05 × 10⁻²⁵ kg m s⁻¹, and deficiency indices (1, 0) forbid every extension. A half-line particle has no momentum observable.
Quick check
Select an answer and explain it before checking.
Review & continue
The Hamiltonian is the self-adjoint energy operator built by substituting x̂ and p̂ = −iℏ d/dx into the classical energy, together with the domain of states on which its boundary terms vanish and D(Ĥ†) = D(Ĥ).
- 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.