Linear Algebra / Unit 9, The Mathematics of Quantum Mechanics / Topic 9.6
Unit 9. The Mathematics of Quantum Mechanics
A matrix sends a column to a column. An operator on functions sends a function to a function. This topic studies the two operators that quantum mechanics is built on, multiplication by x and the derivative. It finds which of them are Hermitian, finds their eigenfunctions, and calculates the commutator of position and momentum.
You need Topics 4.5, 8.3, 8.6, and 9.5 for this topic. The topic uses derivatives and integration by parts from basic calculus.
An operator A is a rule that sends each function f to a function Af. The operator is linear when it keeps sums and multiples, as a matrix does.
A(af + bg) = a Af + b Ag| Operator | Rule | Example with f(x) = e2x |
|---|---|---|
| X | (Xf)(x) = x f(x) | x e2x |
| D | Df = df/dx | 2e2x |
| D² | D²f = d²f/dx² | 4e2x |
| Multiplication by a function V(x) | (Vf)(x) = V(x) f(x) | V(x) e2x |
All four are linear. The derivative of a sum is the sum of the derivatives, and a constant factor can be moved out of a derivative. The rule that sends f to f² is not linear, because (f + g)² is not f² + g².
Operators are multiplied by applying them one after the other, from right to left. The product XD sends f to x times df/dx. The product DX sends f to the derivative of x f(x).
From Topic 8.2, the conjugate transpose of a matrix moves the matrix from one side of the inner product to the other. For operators on functions this property is the definition: the operator A† satisfies ⟨f|Ag⟩ = ⟨A†f|g⟩ for all functions f and g. An operator is Hermitian when A† = A.
⟨f|Ag⟩ = ⟨Af|g⟩ for all functions f and gThe number x is real, so it can be moved from g to f inside the integral: ∫ f(x)* x g(x) dx = ∫ (x f(x))* g(x) dx. The operator X is Hermitian.
Integration by parts moves the derivative from g to f, with a boundary term and a minus sign.
⟨f|Dg⟩ = ∫ab f* dg/dx dxthe definition of the inner product⟨f|Dg⟩ = f(b)*g(b) − f(a)*g(a) − ∫ab df/dx* g dxintegration by partsQuantum mechanics uses functions for which the boundary term is zero: functions that are zero at both ends of the interval, or periodic functions, or functions on the whole line that approach zero far away. For such functions,
⟨f|Dg⟩ = −⟨Df|g⟩ so D† = −DThe derivative is skew-Hermitian. From Topic 8.3, i times a skew-Hermitian operator is Hermitian. Quantum mechanics uses the Hermitian operator −iħD for the momentum of a particle.
P = −iħ d/dxThe operator −D² is also Hermitian, because it is the square of the Hermitian operator −iD. The boundary conditions are part of the definition of an operator on functions. Without them, the boundary term does not vanish, and the operator is not Hermitian.
An eigenvector of an operator on functions is called an eigenfunction. It is a function f that is not the zero function and that satisfies Af = λf.
| Operator | Eigenfunction | Eigenvalue |
|---|---|---|
| D | ekx | k |
| P = −iħ d/dx | eikx | ħk |
| −D² with f(0) = 0 and f(L) = 0 | sin(nπx/L) for n = 1, 2, 3, … | (nπ/L)² |
Check the second row: −iħ times the derivative of eikx is −iħ(ik)eikx = ħk eikx. The function eikx is a wave with the wavelength 2π/k, and it describes a particle with the momentum ħk.
Check the third row: the second derivative of sin(nπx/L) is −(nπ/L)² sin(nπx/L). The boundary conditions select the values of n. A sine with any other number in the place of nπ/L is not zero at x = L.
The third operator is Hermitian. Its eigenvalues are real, and its eigenfunctions are the orthogonal sine functions of Topic 9.5. The proof of Topic 8.3 for Hermitian matrices uses only the inner product, so it holds for Hermitian operators on functions: the eigenvalues are real, and eigenfunctions for different eigenvalues are orthogonal.
The operator X has no eigenfunction among ordinary functions. The equation x f(x) = a f(x) requires f(x) = 0 at each point except x = a. Topic 9.7 returns to this.
A particle of mass m moves freely between two walls at x = 0 and x = L. Its wave function is zero at the walls. Its energy is the kinetic energy p²/(2m), so the energy operator is
H = P²/2mthe kinetic energy, with the momentum operatorH = −ħ²/2m d²/dx²because P² = −ħ² d²/dx²From Part 3, the eigenfunctions of H are the sine functions, and the eigenvalues are the possible energies.
φₙ(x) = √2/L sin(nπx/L) Eₙ = n²π²ħ²/2mL² for n = 1, 2, 3, …The energy can take only these separate values. The boundary conditions are the reason, as they are the reason for the separate tones of a guitar string. The energies are E₁, 4E₁, 9E₁, and so on. The smallest energy E₁ is not zero.
The measurement rule of Topic 9.3 applies with the expansion of Topic 9.5. For a wave function ψ = c₁φ₁ + c₂φ₂ + …, a measurement of the energy gives Eₙ with the probability |cₙ|². For example, the state (φ₁ + φ₂)/√2 gives E₁ or 4E₁, each with the probability 1/2, and the expectation value of the energy is 2.5E₁.
To find the commutator of two operators on functions, apply it to a function f. The product rule gives the derivative of x f(x).
XPf = −iħ x df/dxP first, then XPXf = −iħ d(xf)/dxX first, then PPXf = −iħ f − iħ x df/dxthe product ruleSubtracting leaves (XP − PX)f = iħ f for each function f. So the commutator is iħ times the identity operator.
[X, P] = iħ IThis is the equation that Topic 3.5 showed to be impossible for matrices of any finite size, because the trace of a commutator of two matrices is 0 and the trace of the identity is not. Position and momentum need a space of infinite dimension, and the space of wave functions provides it.
Position and momentum do not commute. From Topic 8.6, they have no shared eigenfunctions. Topic 9.10 derives the uncertainty relation of Heisenberg from this commutator.
An operator on functions becomes a matrix in two ways.
For an orthonormal basis φ₁, φ₂, … of functions, the matrix elements of Topic 9.1 are integrals.
Amn = ⟨φm|A|φn⟩ = ∫ φm(x)* (Aφn)(x) dxThe matrix has infinitely many rows and columns. In the basis of its own eigenfunctions it is diagonal. The energy operator of the box is the diagonal matrix with the entries E₁, 4E₁, 9E₁, ….
Replace the function by its values f₁, …, fₙ at n points inside the interval, with the distance h between neighbors. The second derivative at point j is close to (fj+1 − 2fj + fj−1)/h². So the operator −D² becomes an n by n matrix with 2/h² on the diagonal and −1/h² next to the diagonal. For n = 4,
−D² becomes 1/h² 2−100−12−100−12−100−12The values outside the interval are zero, which is the boundary condition. This matrix is real and symmetric. Its eigenvectors are the values of the sine functions at the grid points, and its eigenvalues approach (nπ/L)² as the grid becomes finer. Computers solve the equations of quantum mechanics in this way, with the methods of Unit 7.
Try it: the derivative operator as a matrix
The interval is from 0 to 1. The purple curve is the eigenfunction sin(kπx) of −D². The green points are the entries of eigenvector number k of the matrix of Part 6 on a grid of n points. The sliders set n and k.
| Fact | Statement |
|---|---|
| Hermitian operator | ⟨f|Ag⟩ = ⟨Af|g⟩ for all functions f and g |
| Position | X multiplies by x, and it is Hermitian |
| Derivative | D† = −D when the boundary term is zero |
| Momentum | P = −iħ d/dx, with the eigenfunctions eikx and the eigenvalues ħk |
| Particle in a box | φₙ(x) = √2/L sin(nπx/L) and Eₙ = n²π²ħ²/(2mL²) |
| Commutator | [X, P] = iħ I |
Work each problem on paper first. Then open the answer to check your work.
Xf = x⁴ and Df = 3x².
XDf = x(3x²) = 3x³D first, then XDXf = 4x³the derivative of x⁴(XD − DX)f = 3x³ − 4x³ = −x³ = −f
This agrees with [X, D] = −I.
The first derivative is −3e−3x, and the second derivative is 9e−3x.
It is an eigenfunction of D² with the eigenvalue 9.
Pe5ix = −iħ(5i)e5ixthe derivative of e5ix is 5i e5ixPe5ix = 5ħ e5ixbecause (−i)(i) = 1
The momentum is 5ħ per meter, which is 5.3 × 10⁻³⁴ kg m/s.
The second derivative is −(3π/L)² sin(3πx/L), so the eigenvalue of −D² is (3π/L)² = 9π²/L².
E₃ = 9E₁.
One integration by parts gives ⟨f|D²g⟩ = −⟨Df|Dg⟩. The boundary term contains f, which is zero at both ends.
A second integration by parts gives −⟨Df|Dg⟩ = ⟨D²f|g⟩. This boundary term contains g, which is zero at both ends. So D² is Hermitian for these functions.
The first line below places 101 points on the interval from 0 to 1, including both ends, so the distance between neighbors is 0.01. The instruction np.gradient(f, x) estimates the derivative of f at each point from the values at the neighboring points. The code applies the operators X and D to f(x) = x³ and prints the results at the point number 50, which is x = 0.5.
Python
The exact values at x = 0.5 are x⁴ = 0.0625 and 3x² = 0.75. The estimate of the derivative is 0.7501. Now change f to sin(2x). Its derivative at x = 0.5 is 2 cos(1), which is about 1.0806.
Python
From Part 5, the commutator of X and P is iħ times the identity. Without the factor −iħ of the momentum, this says that (XD − DX)f = −f for each function f. The code below calculates XDf − DXf for f(x) = x³ and divides the result by f at the point x = 0.5.
Python
The ratio is −1. Now try another function, f(x) = e2x. The ratio should be −1 again.
Python
The code below builds the matrix of Part 6 for n = 50 points inside the interval from 0 to 1. The expression np.eye(n, k=1) is a matrix with ones directly above the diagonal, and np.eye(n, k=-1) has ones directly below it. The code prints the three smallest eigenvalues of the matrix, and then the exact eigenvalues π², (2π)², and (3π)² of the operator.
Python
The eigenvalues of the matrix are a little below the exact values 9.8696, 39.4784, and 88.8264. Now change n to 200. The smallest eigenvalue should be within 0.001 of π².
Python
The code below compares the first eigenvector of the matrix with the values of sin(πx) at the grid points. Both vectors are given the length 1. If two unit vectors point along the same line, the absolute value of their inner product is 1.
Python
The result is 1. Now compare the second eigenvector, V[:, 1], with the values of sin(2πx).
Python
On the grid, the derivative at point j is close to (fj+1 − fj−1)/(2h). The matrix Dm below does this calculation. The code tests whether Dm is equal to its conjugate transpose.
Python
The first result is False, and the second result is True: the matrix of the derivative is skew-Hermitian, as in Part 2. Now change A to −i times Dm, which is the matrix of the momentum with ħ = 1. The first result should be True.
Python
This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.
Choose how your answers are checked
1. Which function is an eigenfunction of d/dx with the eigenvalue 3?
The derivative of e3x is 3e3x, which is 3 times the function. The derivatives of the other three functions are not multiples of the functions.
2. The momentum operator is P = −iħ d/dx. The function e4ix is an eigenfunction of P with the eigenvalue cħ. Find the number c.
Pe4ix = −iħ(4i)e4ix−iħ times the derivativePe4ix = 4ħ e4ixSo the eigenvalue is 4ħ.
3. Which operator is the commutator [X, P] of position and momentum?
Applying XP − PX to a function f and using the product rule leaves iħ f. So the commutator is iħ times the identity.
4. The function sin(2πx) is zero at x = 0 and at x = 1. It is an eigenfunction of −d²/dx². Find its eigenvalue.
The second derivative of sin(2πx) is −(2π)² sin(2πx). So −d²/dx² gives (2π)² = 4π² times the function.
5. The smallest energy of a particle in a box is E₁. The energy E₃ is c times E₁. Find c.
The energies are Eₙ = n²E₁, so E₃ = 9E₁.