University Physics V · Mathematical Foundations of Quantum Physics · 1.5
Dirac Notation: Kets, Bras & Projectors
Dirac's brackets are bookkeeping built so the conjugates take care of themselves: a ket is a column, its bra the conjugated row, and every legal juxtaposition is a number, an operator, or a completeness statement. Master one move — inserting Σ|n⟩⟨n| = 1 — and basis changes, matrix elements and probabilities fall out mechanically.
Build the model
Connect the measurement to the mechanism.
Dirac notation is the Riesz representation theorem promoted to a working syntax. A ket |ψ⟩ is a vector in a complex inner-product space; a bra ⟨φ| is a linear functional that eats kets and returns amplitudes; the theorem guarantees each bra is the conjugate partner of exactly one ket, so the dagger can flip between them mechanically — reverse every order, conjugate every scalar. What the syntax buys is composability: ⟨φ|ψ⟩ is a number, |ψ⟩⟨φ| is an operator, and the sum of projectors over an orthonormal basis, Σ|n⟩⟨n| = 1, is completeness written as an operator you may insert anywhere.
That one insertion generates the representation theory of the whole course: ψ(x) = ⟨x|ψ⟩ as components along a continuous basis, matrix elements Aₘₙ = ⟨m|Â|n⟩, and every change of basis as a sandwiched identity. The cost is paid at the continuum. Position and momentum "kets" |x⟩ and |p⟩ are not square-integrable — a plane wave has infinite norm — so they live outside the Hilbert space as distributions, normalised to ⟨p|p′⟩ = δ(p − p′) precisely so that ∫dp |p⟩⟨p| = 1 still resolves.
The notation hides that subtlety on purpose; this lesson is where you learn what it is hiding.
- Simple definition
- Dirac notation writes each state as a ket |ψ⟩ and each linear functional as a bra ⟨φ|, so that ⟨φ|ψ⟩ is an inner product, |ψ⟩⟨φ| is an operator, and Σ|n⟩⟨n| = 1 states the completeness of an orthonormal basis.
- Example
- With |+⟩ = (|0⟩ + |1⟩)/√2, the projector P = |+⟩⟨+| acts on |0⟩ as P|0⟩ = ⟨+|0⟩|+⟩ = (1/√2)|+⟩, and the probability of finding |0⟩ along |+⟩ is |⟨+|0⟩|² = 1/2.
One symbol computes the same overlap in any representation — the choice of basis is deferred until you need numbers.
conjugate-linear in the bra slot: ⟨φ|ψ⟩ = ⟨ψ|φ⟩*; amplitudes ⟨n|ψ⟩ are dimensionless in a discrete basis
The mechanical grammar that keeps conjugates right — and why ⟨φ|Â|ψ⟩ needs no brackets to be unambiguous.
order reversed, scalars conjugated; c ∈ ℂ, Â any linear operator
Turns 'the component along |n⟩' into an operator, and its expectation value into the Born-rule probability.
for a normalised |n⟩; eigenvalues 0 and 1 only; ⟨ψ|P̂ₙ|ψ⟩ = |⟨n|ψ⟩|²
Insert it anywhere: ⟨φ|ψ⟩ = Σₙ⟨φ|n⟩⟨n|ψ⟩ changes representation without touching the physics.
orthonormal AND complete set required; sum for a discrete spectrum, integral for a continuous one
An operator becomes a matrix the moment a basis is chosen — two inserted identities do the conversion.
m labels the row, n the column; Hermitian  has Aₘₙ = Aₙₘ*
The convention that keeps ∫dp |p⟩⟨p| = 1 exactly consistent when the spectrum is continuous.
|p⟩ has infinite norm, so it is a distribution, not a ket; δ(p − p′) carries units of 1/[p]
A ket is a vector; a bra is the functional paired with it
In ℂ² the machinery is bare: |ψ⟩ = (3/5, 4i/5)ᵀ is a column, and its bra ⟨ψ| = (3/5, −4i/5) is the conjugate transpose row. The pairing ⟨ψ|ψ⟩ is then a 1×2 by 2×1 matrix product: 9/25 + (−4i/5)(4i/5) = 9/25 + 16/25 = 1. A bra is not decoration and not a second copy of the state: it is a linear functional, a machine that eats one ket and returns one complex number. The Riesz representation theorem is what licenses the notation — on a complete inner-product space every continuous linear functional is ⟨φ|⋅⟩ for exactly one vector |φ⟩, so kets and bras pair off one-to-one. The pairing is conjugate-linear on the bra side: c|ψ⟩ corresponds to c*⟨ψ|, which is why ⟨ψ|φ⟩ = ⟨φ|ψ⟩* and why the norm ⟨ψ|ψ⟩ comes out real and non-negative.
Juxtaposition is the entire grammar
Written side by side, a bra then a ket is a number; a ket then a bra is an operator. In ℂ² the second is a 2×1 column times a 1×2 row — a full 2×2 matrix. Take |+⟩ = (|0⟩ + |1⟩)/√2: the outer product |+⟩⟨+| has every entry ½. Square that matrix and you get it back, P² = P, because ⟨+|+⟩ = 1 collapses the middle. Idempotency is the defining property of a projector — projecting a second time finds the vector already in the subspace — and P† = P makes it an observable whose only eigenvalues are 1 (inside) and 0 (outside). Its expectation ⟨ψ|P|ψ⟩ = |⟨+|ψ⟩|² is a squared amplitude, which is exactly how Units 2 and 3 will write the Born rule. Every operator this course builds — projectors, ladder operators, density matrices, the raising operator |1⟩⟨0| that lifts |0⟩ to |1⟩ — is a sum of outer products, so read |m⟩⟨n| as an instruction: take the |n⟩ component, deliver it along |m⟩.
Insert the identity to change representation
Completeness of an orthonormal basis is an operator statement: Σₙ|n⟩⟨n| = 1. Multiplying by 1 changes nothing, so you may insert it into any product, and each insertion converts one abstract object into components. Between a bra and a ket: ⟨φ|ψ⟩ = Σₙ⟨φ|n⟩⟨n|ψ⟩ = Σₙ φₙ*ψₙ — the abstract overlap becomes arithmetic on coefficients. Around an operator, twice: ⟨φ|Â|ψ⟩ = Σₘₙ ⟨φ|m⟩⟨m|Â|n⟩⟨n|ψ⟩, a row times a matrix times a column, and the operator has become the matrix Aₘₙ = ⟨m|Â|n⟩. Try it with |ψ⟩ = (3|0⟩ + 4i|1⟩)/5 and the analyser |+⟩: ⟨+|ψ⟩ = (3 + 4i)/(5√2), whose squared modulus is (9 + 16)/50 = 1/2. The insertion move is not a trick; it is the definition of 'representation'. ψ(x) = ⟨x|ψ⟩ and φ(p) = ⟨p|ψ⟩ are one state's components along two different complete sets, and the Fourier transform of topic 1.8, which Unit 3 will read as a unitary change of basis, is nothing but the identity ∫dx|x⟩⟨x| = 1 inserted inside ⟨p|ψ⟩.
The continuum breaks the rules, and δ repairs the books
Position and momentum have no eigenvectors in the space. A plane wave e(ipx/ħ) has constant |ψ|², so ∫|ψ|²dx diverges: |p⟩ is not square-integrable, and 'the state of definite momentum' is not a state. The notation keeps working because the normalisation is changed, not abandoned: demand ⟨p|p′⟩ = δ(p − p′) in place of a Kronecker δ, which fixes the prefactor in ⟨x|p⟩ = e(ipx/ħ)/√(2πħ) and makes ∫dp|p⟩⟨p| = 1 exact — check it by inserting the p-identity into ⟨x|x′⟩ and recovering δ(x − x′) as a Fourier integral. Dimensions confirm the object is strange: normalising ∫|⟨x|ψ⟩|²dx = 1 forces ψ(x) to carry L⁻¹⁄², so ⟨x|ψ⟩ is a density amplitude, not a probability, and |x⟩ itself carries L⁻¹⁄². The honest statement is that |x⟩ and |p⟩ live in a rigged Hilbert space of distributions, and every physical state is a normalisable wave packet smeared over them.
The notation is already NumPy
Everything above is executable. A ket is a complex array, ψ = np.array([0.6, 0.8j]); the bra is its conjugate, and np.vdot(φ, ψ) conjugates its first argument for you — it computes ⟨φ|ψ⟩ in the physics convention, where phi.T @ psi would silently drop the conjugate. The outer product np.outer(n, n.conj()) builds |n⟩⟨n|, and the two projector laws become one-line assertions: np.allclose(P @ P, P) and np.allclose(P, P.conj().T). The resolution of the identity is the test that a claimed basis really is one: take the eigenvector columns returned by numpy.linalg.eigh, sum the outer products, and compare against np.eye(N). On the eigenvectors of any Hermitian matrix the check passes to machine precision; drop one eigenvector and the sum falls short of the identity by exactly the missing |n⟩⟨n| — completeness failing in code the same silent way an incomplete basis loses probability on paper.
Change one variable at a time
Make the relationship visible.
Rotate φ with θ fixed and watch the component along |a⟩ shrink or flip sign while the two bars always total 1 — that is |a⟩⟨a| + |a⊥⟩⟨a⊥| = 1 drawn — until at φ exactly 90° from θ the amplitude reaches zero, because orthogonal kets contain none of each other.
AMPLITUDE ⟨a|ψ⟩0.707
P(a) = |⟨a|ψ⟩|²0.500
P(a⊥) = |⟨a⊥|ψ⟩|²0.500
SUM OF PROBABILITIES1.000
Live interpretationAMPLITUDE ⟨a|ψ⟩: 0.707. P(a) = |⟨a|ψ⟩|²: 0.500. P(a⊥) = |⟨a⊥|ψ⟩|²: 0.500. SUM OF PROBABILITIES: 1.000
Catch the common trap
Explain before calculating.
An orthonormal basis (|0⟩, |1⟩) carries the state |ψ⟩ = (i|0⟩ + |1⟩)/√2. What is the amplitude ⟨ψ|0⟩?
Choose an answer to test the model.
Practice & worked examples
Reason from the model, then test the result.
EasyThe state |ψ⟩ = (|0⟩ + (1 + i)|1⟩)/√3 lives in an orthonormal basis (|0⟩, |1⟩). Verify it is normalised, write its bra, and find the probability that a measurement of the projector |1⟩⟨1| returns 1.
- Normalisation is ⟨ψ|ψ⟩ = Σ|cₙ|²: |1/√3|² + |(1 + i)/√3|² = 1/3 + 2/3 = 1, because |1 + i|² = 1² + 1² = 2. Squaring the modulus is not squaring the number — (1 + i)² = 2i is the wrong object.
- The bra conjugates every coefficient and turns kets into bras: ⟨ψ| = (⟨0| + (1 − i)⟨1|)/√3. The sign flip on the i is the conjugation, not a choice.
- The amplitude along |1⟩ is ⟨1|ψ⟩ = (1 + i)/√3, so ⟨ψ|(|1⟩⟨1|)|ψ⟩ = ⟨ψ|1⟩⟨1|ψ⟩ = [(1 − i)/√3][(1 + i)/√3] = (1 − i²)/3 = 2/3.
- Check completeness: P(0) + P(1) = 1/3 + 2/3 = 1, which is Σₙ|n⟩⟨n| = 1 sandwiched inside ⟨ψ|⋅⋅⋅|ψ⟩.
Answer⟨ψ|ψ⟩ = 1; ⟨ψ| = (⟨0| + (1 − i)⟨1|)/√3; the projector probability is |⟨1|ψ⟩|² = 2/3 ≈ 0.667.
MediumThe operator  = |0⟩⟨1| + |1⟩⟨0| is given as a sum of outer products in the orthonormal basis (|0⟩, |1⟩). Find its matrix in the rotated basis |±⟩ = (|0⟩ ± |1⟩)/√2, and write  in spectral form.
- Act on the new basis vectors first. Â|+⟩ = (|0⟩⟨1| + |1⟩⟨0|)(|0⟩ + |1⟩)/√2 = (|0⟩ + |1⟩)/√2 = |+⟩, since ⟨1|0⟩ = 0 and ⟨0|0⟩ = ⟨1|1⟩ = 1.
- Likewise Â|−⟩ = (|0⟩⟨1| + |1⟩⟨0|)(|0⟩ − |1⟩)/√2 = (−|0⟩ + |1⟩)/√2 = −|−⟩.
- Matrix elements: ⟨+|Â|+⟩ = ⟨+|+⟩ = 1, ⟨−|Â|−⟩ = −⟨−|−⟩ = −1, and ⟨+|Â|−⟩ = −⟨+|−⟩ = 0 = ⟨−|Â|+⟩. The matrix is diag(1, −1).
- Diagonal against an orthonormal basis means |±⟩ are eigenkets, so the spectral form is  = (+1)|+⟩⟨+| + (−1)|−⟩⟨−|.
- Cross-check by expanding: |+⟩⟨+| − |−⟩⟨−| = ½[(|0⟩+|1⟩)(⟨0|+⟨1|) − (|0⟩−|1⟩)(⟨0|−⟨1|)] = |0⟩⟨1| + |1⟩⟨0| — the diagonal outer products cancel.
AnswerIn the (|+⟩, |−⟩) basis  = diag(1, −1); spectrally  = |+⟩⟨+| − |−⟩⟨−| with eigenvalues ±1. ( is the Pauli operator σₓ, diagonalised.)
HardAn electron sits in an infinite well of width L = 1.00 nm, with eigenfunctions ⟨x|n⟩ = √(2/L) sin(nπx/L). Use the position-basis resolution of the identity to evaluate ⟨1|x̂|2⟩, the matrix element that sets the strength of the 2 → 1 optical transition.
- The bracket is abstract until a basis is inserted: ⟨1|x̂|2⟩ = ∫₀ᴸ ⟨1|x⟩ x ⟨x|2⟩ dx, using ∫dx |x⟩⟨x| = 1 and x̂|x⟩ = x|x⟩.
- Substitute the eigenfunctions: ⟨1|x̂|2⟩ = (2/L)∫₀ᴸ x sin(πx/L) sin(2πx/L) dx. Both eigenfunctions are real, so no conjugation signs appear.
- Product to sum: sin(πx/L)sin(2πx/L) = ½[cos(πx/L) − cos(3πx/L)], leaving integrals of the form ∫₀ᴸ x cos(nπx/L) dx = (L²/n²π²)[(−1)ⁿ − 1], which is −2L²/(n²π²) for odd n and 0 for even n.
- So the integral is ½[−2L²/π² + 2L²/(9π²)] = −(L²/π²)(1 − 1/9) = −8L²/(9π²), and ⟨1|x̂|2⟩ = (2/L)(−8L²/9π²) = −16L/(9π²).
- Numbers: 16/(9π²) = 16/88.83 = 0.180, so ⟨1|x̂|2⟩ = −0.180 nm. The sign follows the phase convention chosen for |2⟩; the transition strength depends on |⟨1|x̂|2⟩|² = 0.0324 nm², which no phase choice can alter.
Answer⟨1|x̂|2⟩ = −16L/(9π²) = −0.180 nm for L = 1.00 nm. One inserted identity turned the abstract bracket into a definite integral.