Skip to main content

Physics V course sequence · Interactive lesson

Dirac notation: kets, bras and 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.

UPV-01.05 · Lesson 5 of 9 in this unit. Position is not a completion score.
Starting model: Dirac notation: kets, bras and projectorsA real two-state ket |ψ⟩ = cos θ|0⟩ + sin θ|1⟩, analysed along the basis ket |a⟩ = cos φ|0⟩ + sin φ|1⟩ drawn as the dashed axis. The solid component along that axis is P|ψ⟩ = ⟨a|ψ⟩|a⟩ with ⟨a|ψ⟩ = cos(θ − φ) = 0.71; the dashed remainder is the |a⊥⟩ component. The two bars show the projector probabilities |⟨a|ψ⟩|² and |⟨a⊥|ψ⟩|², which sum to 1 at every angle.|0⟩|1⟩⟨a|ψ⟩ = 0.71P(a) + P(a⊥) = 1.00P(a)P(a⊥)1
Start with a picture. Change the model in the lab below.
1

Build the model

The notation is the linear algebra, with every conjugation done for you.

The key idea

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.

The complete physical model and assumptions

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.

1A 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.

2Juxtaposition 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⟩.

3Insert 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|ψ⟩.

4The 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.

5The 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.

2

Key equations

Read the units, assumptions and limits before substituting.

Bra–ket pairing (Riesz)

⟨φ|ψ⟩ = Σₙ φₙ* ψₙ = ∫ φ*(x) ψ(x) dx

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

Dagger rules

(c|ψ⟩)† = c*⟨ψ| · (Â|ψ⟩)† = ⟨ψ|†

The mechanical grammar that keeps conjugates right — and why ⟨φ|Â|ψ⟩ needs no brackets to be unambiguous.

order reversed, scalars conjugated; c ∈ ℂ, Â any linear operator

Outer product as projector

P̂ₙ = |n⟩⟨n|, P̂ₙ² = P̂ₙ, P̂ₙ† = P̂ₙ

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|ψ⟩|²

Resolution of the identity

Σₙ |n⟩⟨n| = 1 · ∫ dx |x⟩⟨x| = 1

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

Matrix elements

Aₘₙ = ⟨m|Â|n⟩ ⇔ Â = Σₘₙ Aₘₙ |m⟩⟨n|

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ₙₘ*

Delta normalisation

⟨p|p′⟩ = δ(p − p′) · ⟨x|p⟩ = e(ipx/ħ)/√(2πħ)

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]
3

Interactive lab

Predict first. Explore the model. Compare the result.

Explore the model

60 °
0 to 360 °; steps of 5.
15 °
0 to 180 °; steps of 5.

Try this. 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.

Live results

AMPLITUDE ⟨a|ψ⟩
0.707
P(a) = |⟨a|ψ⟩|²
0.500
P(a⊥) = |⟨a⊥|ψ⟩|²
0.500
SUM OF PROBABILITIES
1.000

Results follow this lesson’s model and assumptions. Displayed values are rounded.

Interactive Physics V modelA real two-state ket |ψ⟩ = cos θ|0⟩ + sin θ|1⟩, analysed along the basis ket |a⟩ = cos φ|0⟩ + sin φ|1⟩ drawn as the dashed axis. The solid component along that axis is P|ψ⟩ = ⟨a|ψ⟩|a⟩ with ⟨a|ψ⟩ = cos(θ − φ) = 0.71; the dashed remainder is the |a⊥⟩ component. The two bars show the projector probabilities |⟨a|ψ⟩|² and |⟨a⊥|ψ⟩|², which sum to 1 at every angle.|0⟩|1⟩⟨a|ψ⟩ = 0.71P(a) + P(a⊥) = 1.00P(a)P(a⊥)1
A real two-state ket |ψ⟩ = cos θ|0⟩ + sin θ|1⟩, analysed along the basis ket |a⟩ = cos φ|0⟩ + sin φ|1⟩ drawn as the dashed axis. The solid component along that axis is P|ψ⟩ = ⟨a|ψ⟩|a⟩ with ⟨a|ψ⟩ = cos(θ − φ) = 0.71; the dashed remainder is the |a⊥⟩ component. The two bars show the projector probabilities |⟨a|ψ⟩|² and |⟨a⊥|ψ⟩|², which sum to 1 at every angle.

Predict → change one variable → check

Plan a change before running it. Every other input stays at the saved baseline.

Saved baseline. State angle θ: 60 °; Analyser angle φ: 15 °

Baseline 60; choose 0 to 360, in steps of 5.
4. Compared with the saved baseline, this result will…

This experiment is kept only while this page is open. It does not change saved course progress.

4

Catch the common trap

Students read ψ(x) = ⟨x|ψ⟩ and conclude that |x⟩ is a state like any other, so a position measurement leaves the particle 'in the state |x₀⟩'. It cannot: ⟨x|x′⟩ = δ(x − x′) means ⟨x₀|x₀⟩ = δ(0), an infinite norm, so |x₀⟩ is not square-integrable and no physical preparation reaches it — a δ spike carries infinite mean kinetic energy, and a plane wave of exact momentum fails the same test in the conjugate basis. The kets |x⟩ and |p⟩ are basis distributions: legitimate to expand over, illegitimate to occupy. What a real position measurement of finite resolution leaves behind is a narrow normalisable packet — the projector onto an interval applied to |ψ⟩, renormalised — and every appearance of |x⟩ in a correct calculation sits under an integral, never standing alone as the answer.

5

Practice & worked examples

3 authored examples. Make an attempt, then reveal the reasoning one step at a time.

EasyExample 1

The 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.

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.

MediumExample 2

The 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.

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.

HardExample 3

An 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.

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.

6

Quick check

Select an answer and explain it before checking.

An orthonormal basis (|0⟩, |1⟩) carries the state |ψ⟩ = (i|0⟩ + |1⟩)/√2. What is the amplitude ⟨ψ|0⟩?
7

Review & continue

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.

  • 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.

Extra challenging questions

Connect several ideas, explore supplied data, and compare your reasoning with a worked solution.