
Operators: linear instructions that act on a wavefunction
Linear instructions on functions, applied in a definite order.
From this week every observable enters a calculation as an operator acting on ψ. Before meeting any particular one, settle what the word means: an instruction that returns a new function, tested for linearity before it is trusted, composed in a definite order, and pictured as a matrix, with a precise account of where that picture fails.
Build the model
An operator turns one function into another; linearity is what lets superposition survive.
1The big idea
Quantum mechanics acts on a wavefunction through operators: an operator is a rule that takes the whole function ψ(x) and returns a new function Âψ(x), such as multiplying by x, differentiating, reflecting x → −x or sliding the graph along the axis. Every operator that stands for an observable is linear, Â(af + bg) = aÂf + bÂg for all complex a and b, and the reason is superposition. The Schrödinger equation is linear, so any combination c₁ψ₁ + c₂ψ₂ of solutions is a state, and an instruction applied to that state must give the same answer however the state is split into pieces. Linearity is also what makes the algebra familiar. Wavefunctions add and scale like vectors; sample one on N points and it is a column of N numbers; a linear operator becomes an N × N matrix, and a product of operators becomes a product of matrices, order included, so operators need not commute. The picture is a guide, not an identity, because the space of wavefunctions is infinite-dimensional. The central-difference matrix for d/dx misjudges every wave by the factor sin(kh)/(kh), finite traces force tr(DX − XD) = 0 where the operators demand the identity, and multiplication by x can carry a normalisable function out of the space altogether. Matrices are how we compute with operators; they are not what operators are.
2In one sentence
An operator  is a rule that turns a function f(x) into a new function Âf(x); it is linear when Â(af + bg) = aÂf + bÂg for every pair of functions f, g it can act on and every pair of complex numbers a, b.
Example. d/dx is linear: acting on 3x² + 2 sin x it returns 6x + 2 cos x, which is 3 times (2x) plus 2 times (cos x). Squaring is not: (x + x)² = 4x² but x² + x² = 2x², so at x = 0.5 the two sides read 1.00 and 0.50.
3An operator returns a whole new function
An operator is a rule with a function going in and a function coming out. Write it with a hat: Âf is the new function, and it is found before anything is evaluated at a point. Four instructions carry most of this course. Multiplication by x: x̂f(x) = x f(x). Differentiation: D̂f = df/dx. Reflection, the parity operator: P̂f(x) = f(−x). Translation by a fixed length s: T̂f(x) = f(x − s), which slides the graph a distance s to the right. Feed each the Gaussian f(x) = e(−x²/b²) and you get x e(−x²/b²), −(2x/b²) e(−x²/b²), the same Gaussian back because it is even, and the same Gaussian recentred on x = s. Dimensions travel with the instruction: x̂ multiplies the units of f by metres, D̂ divides them by metres, and P̂ and T̂ leave them alone, a first check on any operator result you write. The momentum operator of the next topic is D̂ multiplied by −iħ.
4The linearity test, and four instructions that fail it
 is linear when Â(af + bg) = aÂf + bÂg for every pair of functions f, g it can act on and every pair of complex numbers a, b. Split the test in two to diagnose a failure: additivity (a = b = 1) and homogeneity (g = 0). x̂, D̂, D̂², P̂, T̂ and multiplication by any fixed function V(x) all pass. Squaring fails additivity, because (f + g)² carries the cross term 2fg. Adding a fixed function, f → f + f₀, fails the quickest screen there is: a linear operator sends the zero function to zero, and this one returns f₀. Normalising, f → f/√(∫|f|² dx), fails homogeneity, since doubling f leaves the output unchanged. Complex conjugation is the subtle case: (f + g)* = f* + g* passes additivity, but (if)* = −if*, so homogeneity fails for complex a. Such a rule is called antilinear. Antilinear rules have a narrow role in advanced work on time reversal, but no observable is represented by one, because the numbers in front of wavefunctions are complex and the operator must carry them through unchanged.
5Why observables are represented by linear operators
The Schrödinger equation is linear: if ψ₁ and ψ₂ solve it, so does c₁ψ₁ + c₂ψ₂ for any complex c₁ and c₂, and that combination is a legitimate state. An instruction applied to such a state must give the same result however the state is split into pieces, and that requirement is linearity. It pays at once. Once  is known on a set of building-block functions it is known on every combination of them, with no new calculation: D̂ acting on ψ = 3 sin 2x + 4i cos 5x is 6 cos 2x − 20i sin 5x, obtained term by term. A non-linear rule would demand a fresh calculation for every superposition, and splitting the same ψ two different ways would give two different answers. What a measurement of an observable returns, and with what probability, is the business of Unit 4; this unit is about the algebra the operators themselves obey.
6Operators combine, and order is part of the instruction
Operators add and scale like the functions they act on: (Â + B̂)f = Âf + B̂f, and two operators can be added only if they carry the same dimensions, just as two terms can. The product ÂB̂ means apply B̂, then Â: the operator nearest the function acts first. Powers are repeated application, so D̂² = d²/dx². Because the instructions run in sequence, swapping them can change the outcome. With f = sin 3x, x̂D̂f = 3x cos 3x, while D̂x̂f = d(x sin 3x)/dx = sin 3x + 3x cos 3x. At x = 0.50 these are 0.106 and 1.104. The two orders differ by exactly f, for every f, because the product rule adds it. Parity and position disagree as well: P̂x̂f = −x f(−x) while x̂P̂f = x f(−x), so there the two orders differ by a sign. The last topic of this unit gives such differences their own notation; here they are a warning that operator algebra is not number algebra.
7On a grid, functions are vectors and operators are matrices
Sample f on a grid xⱼ = jh and it becomes a column of N numbers fⱼ. Adding two functions adds their columns and multiplying by c scales one, so the sampled functions form an N-dimensional vector space. A linear operator then becomes an N × N matrix: column j is the operator's output on the spike that is 1 at xⱼ and 0 elsewhere, and linearity assembles every other f from those spikes. x̂ becomes the diagonal matrix diag(x₁, …, xN). D̂ becomes the central-difference matrix, (Df)ⱼ = (fⱼ₊₁ − fⱼ₋₁)/(2h), with +1/(2h) just right of the diagonal and −1/(2h) just left, in m⁻¹. Composition becomes matrix multiplication, which is why order mattered: DX and XD are different matrices. Try it on f = sin(x/c) with c = 1 nm and h = 0.1 nm: at x = 0 the matrix gives [sin 0.1 − sin(−0.1)]/(0.2 nm) = 0.9983 nm⁻¹, against the exact 1 nm⁻¹.
8Where the matrix picture stops: infinite dimensions
Three facts show that no finite matrix is the operator. Accuracy: on sin(kx) the central-difference matrix returns (sin kh / h) cos(kx), under-reporting k by the factor sin(kh)/(kh) ≈ 1 − (kh)²/6. At 20 points per wavelength, kh = 0.314 and the matrix is 1.6% low; at 2 points per wavelength, kh = π and it returns zero. Refining h rescues any one function, never all of them at once. A theorem: for N × N matrices tr(AB) = tr(BA), so tr(DX − XD) = 0, whereas on functions D̂x̂ − x̂D̂ is the identity, whose N × N version has trace N. No finite pair of matrices reproduces x̂ and D̂ together. Domain: a matrix acts on every vector, but x̂ does not act on every normalisable function. ψ(x) = (πb)⁻¹⁄² (1 + x²/b²)⁻¹⁄² has ∫|ψ|² dx = 1, yet xψ tends to ±√(b/π) as |x| grows and cannot be normalised. An operator is an instruction together with the set of functions it may act on.
Key equations
What each relation says, and the units it is written in.
The linearity test
Â(a f + b g) = a Âf + b Âg
It must hold for every pair, so one failing pair disproves it. Check additivity (a = b = 1) and homogeneity (g = 0) separately: complex conjugation passes the first and fails the second.
f, g: any functions in Â's domain, in m⁻¹⁄² for a normalised 1D wavefunction; a, b: any complex numbers
A product is a composition, read right to left
(ÂB̂)f = Â(B̂f)
The operator nearest the function acts first, and swapping the order can change the answer: D̂x̂ and x̂D̂ differ by exactly the identity.
B̂ acts first. Dimensions multiply, [ÂB̂] = [Â][B̂], so x̂D̂ is dimensionless and D̂² = d²/dx² carries m⁻²
A linear operator on N samples is a matrix
(Âf)ᵢ = Σⱼ Aᵢⱼ fⱼ
Column j is  acting on a spike that is 1 at xⱼ and 0 elsewhere. Linearity rebuilds every other f from spikes, which is the only reason the matrix exists.
fⱼ = f(xⱼ) on a grid of spacing h in m; each Aᵢⱼ carries the units of Â, m⁻¹ for d/dx
Central-difference matrix for d/dx
(Df)ⱼ = (fⱼ₊₁ − fⱼ₋₁) / (2h)
Acting on a sampled sin(kx) it returns (sin kh / h) cos(kx): the right shape for a derivative, with the wrong amplitude.
h: grid spacing in m; row j holds −1/(2h) left of a zero diagonal and +1/(2h) right of it, in m⁻¹
How far the matrix falls short on a wave
(matrix result) / (exact result) = sin(kh) / (kh)
Close to 1 − (kh)²/6 when kh ≪ 1, so halving h cuts the error fourfold. At kh = π, two points per wavelength, the matrix returns zero.
k: wavenumber in m⁻¹; kh is dimensionless, the phase advance per grid step
The trace obstruction
tr(AB − BA) = 0 for any N × N matrices A and B
On functions D̂x̂ − x̂D̂ is the identity, whose N × N version has trace N ≠ 0, so no finite pair of matrices can be x̂ and d/dx exactly.
tr M = Σᵢ Mᵢᵢ, the sum of diagonal entries; it holds because tr(AB) = Σᵢⱼ AᵢⱼBⱼᵢ = tr(BA)
Interactive lab
Change one variable. Predict first, then read the result.
Controls
Try this. At m = 2 and N = 16 the matrix is 10% short. Push N to 64 and the steps close onto the dashed curve; then set m = 4 and N = 8, two points per wavelength, and the matrix derivative flattens to zero while the samples still oscillate.
Live results
- POINTS PER WAVELENGTH N/m
- 8.0
- PHASE STEP kh
- 0.785 rad
- MATRIX ÷ EXACT sin(kh)/(kh)
- 0.900
- AMPLITUDE SHORTFALL
- 10.0 %
Catch the common trap
The mistake this lesson is built to prevent.
The commonest slip is to read Âψ as A times ψ, as if the operator were a number standing beside the function. Two errors follow. The first is to divide by ψ and call the result the value of A. For ψ = e(−x²/b²), (dψ/dx)/ψ = −2x/b², a different number at every x, so there is no single value to read off; the ratio comes out constant only for the special functions of the eigenvalue topic. The second is to reorder, writing d(xψ)/dx = x dψ/dx as if d/dx could slide past x like a scalar. It cannot, because an operator acts on everything to its right, and the product rule supplies the missing ψ. Treat an operator as a verb, not a factor: write down what it acts on, carry out the action, and only then simplify.
Test it: what changes?
- More points per wavelength, N/m
- Smaller phase step kh = 2πm/N
- Matrix ÷ exact, sin(kh)/(kh), rises towards 1
- Amplitude shortfall falls
- Fewer points per wavelength
- Larger phase step kh
- Matrix derivative falls further below exact
- Matrix returns zero at kh = π
Practice & worked examples
Three tiers. Try each before opening the solution.
EasyExample 1
Take f(x) = sin(x/L) and g(x) = cos(x/L) with L = 1.0 nm, and the coefficients a = 2 and b = 3. At x = 0.50 nm, evaluate both sides of the linearity test for D̂ = d/dx and for the squaring rule Ŝf = f². Which rule fails, and what makes up the discrepancy?
View solution →
- Values needed at x/L = 0.50: f = sin 0.50 = 0.4794, g = cos 0.50 = 0.8776, so af + bg = 0.9589 + 2.6327 = 3.5916.
- D̂, left side: D̂(af + bg) = [a cos(x/L) − b sin(x/L)]/L = (1.7552 − 1.4383)/(1.0 nm) = 0.3169 nm⁻¹. Right side: aD̂f + bD̂g = 2(0.8776 nm⁻¹) + 3(−0.4794 nm⁻¹) = 0.3169 nm⁻¹. Equal, and both in nm⁻¹, as a derivative of a dimensionless function must be.
- Ŝ, left side: (af + bg)² = 3.5916² = 12.900. Right side: aŜf + bŜg = 2(0.2298) + 3(0.7702) = 2.770. The two sides differ by 10.13.
- Expand to see why: (af + bg)² − (af² + bg²) = (a² − a)f² + (b² − b)g² + 2ab fg = 0.460 + 4.621 + 5.049 = 10.13. The cross term 2ab fg breaks additivity; the a² − a and b² − b pieces break homogeneity.
Answer. D̂ passes, with both sides 0.317 nm⁻¹. Ŝ fails, 12.9 against 2.77: a gap of 10.1 made of the cross term 5.05 and the squared-coefficient terms 5.08. One failing pair is enough to rule Ŝ out.
MediumExample 2
Let ψ(x) = x e(−x/b) on x ≥ 0, with b = 0.20 nm, and let D̂ = d/dx. Find x̂D̂ψ and D̂x̂ψ, evaluate both at x = 0.30 nm, and verify that their difference is ψ itself. Then normalise ψ and say what happens to the three numbers.
View solution →
- x̂D̂ means differentiate first, then multiply by x: dψ/dx = (1 − x/b) e(−x/b), so x̂D̂ψ = x(1 − x/b) e(−x/b).
- D̂x̂ means multiply first, then differentiate: x̂ψ = x² e(−x/b), so D̂x̂ψ = (2x − x²/b) e(−x/b).
- At x = 0.30 nm, x/b = 1.5 and e(−1.5) = 0.2231. x̂D̂ψ = (0.30 nm)(−0.50)(0.2231) = −0.0335 nm, while D̂x̂ψ = (0.60 − 0.45) nm × 0.2231 = +0.0335 nm. Dimensions: x̂D̂ and D̂x̂ are dimensionless, so both results carry ψ's unit, nm.
- Difference: D̂x̂ψ − x̂D̂ψ = [(2x − x²/b) − (x − x²/b)] e(−x/b) = x e(−x/b) = ψ. Numerically 0.0335 − (−0.0335) = 0.0669 nm, and ψ(0.30 nm) = (0.30 nm)(0.2231) = 0.0669 nm. Limiting check: for x ≪ b, x̂D̂ψ ≈ x and D̂x̂ψ ≈ 2x, which differ by x ≈ ψ, as they must.
- Normalise: the integral of x² e(−2x/b) dx from 0 to ∞ is b³/4, so the constant is 2b⁻³⁄² = 22.4 nm⁻³⁄². Both operators are linear, so all three numbers are multiplied by it: −0.748, +0.748 and 1.50 nm⁻¹⁄², and the difference is still exactly the (now normalised) ψ.
Answer. At x = 0.30 nm, x̂D̂ψ = −0.0335 nm and D̂x̂ψ = +0.0335 nm; they differ by ψ(0.30 nm) = 0.0669 nm. Normalising (constant 22.4 nm⁻³⁄²) scales all three alike, to −0.748, +0.748 and 1.50 nm⁻¹⁄².
HardExample 3
Represent d/dx on a periodic grid of N = 12 points, xⱼ = jh with h = 0.10 nm, by the central-difference matrix D. (a) Find what D does to the sampled wave sin(kx) with k = 2πm/(Nh), and compare with the exact derivative for m = 1 and m = 3. (b) How many grid points would m = 3 need for 1% accuracy? (c) Show that no pair of 12 × 12 matrices X and D can satisfy DX − XD = I, the relation x̂ and d/dx obey on functions.
View solution →
- Row j of D holds −1/(2h) = −5.0 nm⁻¹ in column j − 1 and +5.0 nm⁻¹ in column j + 1, wrapping round at the ends, and zeros everywhere else, including the diagonal. Its entries are in nm⁻¹, the units of d/dx.
- On fⱼ = sin(kxⱼ): (Df)ⱼ = [sin(kxⱼ + kh) − sin(kxⱼ − kh)]/(2h) = (sin kh / h) cos(kxⱼ). D sends the sampled sine to the sampled cosine, as d/dx does, but with amplitude sin(kh)/h where d/dx gives k.
- m = 1: k = 2π/(1.2 nm) = 5.236 nm⁻¹, kh = 0.5236, sin(kh)/h = 5.000 nm⁻¹, so the matrix is 4.5% low. m = 3: k = 15.71 nm⁻¹, kh = π/2, sin(kh)/h = 10.00 nm⁻¹, 36% low. Limiting check: at fixed k, sin(kh)/h → k as h → 0.
- 1% accuracy needs sin(u)/u ≥ 0.990 with u = kh = 6π/N. Solving numerically gives u ≤ 0.2453, so N ≥ 6π/0.2453 = 76.8: at least 77 points, about 26 per wavelength.
- For any N × N matrices, tr(DX) = Σᵢⱼ DᵢⱼXⱼᵢ = tr(XD), so tr(DX − XD) = 0. The 12 × 12 identity has trace 12, and no choice of matrices closes that gap, on this grid or on any finite one.
- With X = diag(xⱼ) the gap is visible entry by entry: (DX − XD)ᵢⱼ = Dᵢⱼ(xⱼ − xᵢ) is 0 on the diagonal, +1/2 either side of it, which averages neighbours and so mimics the identity on smooth samples, and −11/2 in the two corners, where the periodic wrap meets the jump in x from 1.1 nm back to 0.
Answer. D sends sin(kx) to (sin kh / h) cos(kx): 5.00 against 5.24 nm⁻¹ for m = 1 (4.5% low) and 10.0 against 15.7 nm⁻¹ for m = 3 (36% low). m = 3 needs at least 77 points for 1%. tr(DX − XD) = 0 ≠ 12, so no finite pair is exact.
Quick check
Choose an answer, then check it. Explain to yourself why the others fail.
Key takeaway
Treat an operator as a verb, never a factor.
Act with  on the whole function first, then simplify. Test linearity through additivity and homogeneity separately; one failing pair disproves it. In ÂB̂ the operator nearest the function acts first, and D̂x̂ − x̂D̂ is the identity. Finite matrices approximate operators, but no finite pair reproduces x̂ and d/dx together.
Next: The position operator x̂ and the momentum operator p̂ →