Kets, bras, outer products and projectors: fluent bra-ket algebra.
Physicists rarely write column vectors. They write ∣ψ⟩, ⟨ϕ∣ and ∣ψ⟩⟨ϕ∣, and the linear algebra does itself. Once you can read a ket, a bra and an outer product, most quantum calculations reduce to sliding brackets together.
What you’ll learn
Translate fluently between kets and bras and column and row vectors, including the antilinear rule for bras.
Build operators from outer products, read off matrix elements ⟨i∣A∣j⟩, and take adjoints in bra-ket form.
Use projectors and the completeness relation ∑i∣i⟩⟨i∣=I to compute probabilities and post-measurement states.
Write spectral decompositions and expectation values in Dirac notation.
Kets, bras and brackets
A ket∣ψ⟩ is a column vector. Its bra⟨ψ∣ is the conjugate-transposed row vector. A bra glued to a ket gives a number, the inner product:
∣ψ⟩=(αβ),⟨ψ∣=(α∗β∗),⟨ϕ∣ψ⟩=ϕ0∗α+ϕ1∗β.
Mathematically, ⟨ϕ∣ is the linear functional ∣ψ⟩↦⟨ϕ∣ψ⟩: a bra eats a ket and returns their overlap. Dirac's pun: a bra and a ket make a bracket.
The rule that trips everyone up: bras are antilinear. The bra of c∣ψ⟩ is c∗⟨ψ∣, and the bra of α∣0⟩+β∣1⟩ is α∗⟨0∣+β∗⟨1∣. Hence ⟨ϕ∣ψ⟩∗=⟨ψ∣ϕ⟩ and ⟨ψ∣ψ⟩=∥ψ∥2≥0.
Think first What is the bra of ∣+i⟩=21(∣0⟩+i∣1⟩), and what is ⟨+i∣+i⟩?
⟨+i∣=21(⟨0∣−i⟨1∣). Then ⟨+i∣+i⟩=21(⟨0∣0⟩+(−i)(i)⟨1∣1⟩)=21(1+1)=1, using ⟨0∣1⟩=⟨1∣0⟩=0. Forgetting the conjugate would give 21(1+i2)=0.
Check your understanding
Compute ⟨+i∣−i⟩, where ∣±i⟩=21(∣0⟩±i∣1⟩).
1
0
i
−1
Show the answer
B.0
⟨+i∣−i⟩=21(⟨0∣−i⟨1∣)(∣0⟩−i∣1⟩)=21(1+(−i)(−i))=21(1−1)=0. The two Y eigenstates are orthogonal, as eigenvectors of a Hermitian operator with different eigenvalues must be.
Outer products build operators
Reverse the order and you get a matrix. The outer product∣ψ⟩⟨ϕ∣ is a column times a row, and it acts by sliding brackets together:
(∣ψ⟩⟨ϕ∣)∣χ⟩=∣ψ⟩⟨ϕ∣χ⟩=⟨ϕ∣χ⟩∣ψ⟩.
It measures how much ∣χ⟩ points along ∣ϕ⟩ and outputs that much ∣ψ⟩. Every operator is a sum of outer products of basis vectors, weighted by its matrix elements:
Read ∣i⟩⟨j∣ as "take ∣j⟩ to ∣i⟩". Adjoints swap and conjugate: (c∣ψ⟩⟨ϕ∣)†=c∗∣ϕ⟩⟨ψ∣.
DerivationA gate from its action on a basis
U=∣+i⟩⟨0∣+∣−i⟩⟨1∣
A unitary is fixed by where it sends a basis. Suppose U∣0⟩=∣+i⟩ and U∣1⟩=∣−i⟩. Then
U=21(∣0⟩+i∣1⟩)⟨0∣+21(∣0⟩−i∣1⟩)⟨1∣
Check: U∣0⟩=∣+i⟩⟨0∣0⟩+∣−i⟩⟨1∣0⟩=∣+i⟩. For the matrix, expand the kets in the computational basis:
U=21(1i1−i)=(100i)21(111−1)=SH
The coefficient of ∣i⟩⟨j∣ is the entry Uij:
U†U=k,l∑∣ek⟩⟨fk∣fl⟩⟨el∣=k∑∣ek⟩⟨ek∣=I
So "first H, then S" maps the Z basis onto the Y basis. In general ∑k∣fk⟩⟨ek∣ is the unitary taking one orthonormal basis to another:
Check your understanding
Simplify (∣0⟩⟨1∣)2.
∣0⟩⟨1∣
∣0⟩⟨0∣
0
I
Show the answer
C.0
∣0⟩⟨1∣∣0⟩⟨1∣=∣0⟩⟨1∣0⟩⟨1∣=0, since ⟨1∣0⟩=0. The operator sends ∣1⟩→∣0⟩ and kills ∣0⟩, so applying it twice kills everything; as a matrix, (0010)2=0.
Projectors, completeness and measurement
For a unit vector, Pψ=∣ψ⟩⟨ψ∣ is the projector onto ∣ψ⟩: Pψ∣χ⟩=⟨ψ∣χ⟩∣ψ⟩ keeps only the component along ∣ψ⟩, and Pψ2=Pψ=Pψ†. For any orthonormal basis the projectors add up to the identity, the completeness relation:
i∑∣i⟩⟨i∣=I,e.g.∣0⟩⟨0∣+∣1⟩⟨1∣=∣+⟩⟨+∣+∣−⟩⟨−∣=I
A resolution of the identity. Inserting it anywhere is the most useful move in quantum mechanics.
Insert it into ⟨ψ∣ψ⟩=1 and you get ∑i∣⟨i∣ψ⟩∣2=1: the outcome probabilities of a measurement in that basis add up to one. The Born rule and the collapse read
So the probability of outcome + is an expectation value:
Pr(+)=21(1+sinθcosφ)
For ∣ψ⟩=cos2θ∣0⟩+eiφsin2θ∣1⟩, ⟨X⟩=sinθcosφ, the x-coordinate of the Bloch vector:
Predict before you look
For ∣ψ⟩=cos6π∣0⟩+sin6π∣1⟩ (so θ=π/3, φ=0), what is Pr(+) in an X-basis measurement, in percent?
Show the answer
93 %
21(1+sin3π)=21(1+0.866)≈0.933. Directly: ⟨+∣ψ⟩=21(cos6π+sin6π)≈0.966, whose square is ≈0.933.
Spectra and expectation values in bra-ket form
A Hermitian operator with non-degenerate eigenvalues is a weighted sum of projectors onto its eigenvectors, its spectral decomposition (with degeneracy, group equal eigenvalues into higher-rank projectors):
For example X=∣+⟩⟨+∣−∣−⟩⟨−∣, so X, e−iθX/2 or any other function of X comes for free.
Dirac
Matrix language
Type
∣ψ⟩
column vector ψ
vector
⟨ψ∣
row vector ψ†
dual vector
⟨ϕ∣ψ⟩
ϕ†ψ
number
∣ψ⟩⟨ϕ∣
ψϕ† (rank one)
operator
⟨ϕ∣A∣ψ⟩
ϕ†Aψ
number
⟨ϕ∣A∣ψ⟩∗=⟨ψA†ϕ⟩
(ϕ†Aψ)∗=ψ†A†ϕ
number
∣a⟩∣b⟩=∣ab⟩
a⊗b (Kronecker product)
vector of two systems
Juxtaposing two kets is a tensor product of two systems, never an inner product.
Think first What is Tr(∣ψ⟩⟨ϕ∣)?
Insert completeness: Tr(∣ψ⟩⟨ϕ∣)=∑i⟨i∣ψ⟩⟨ϕ∣i⟩=∑i⟨ϕ∣i⟩⟨i∣ψ⟩=⟨ϕ∣ψ⟩. Note the order: the bra ends up on the left. In matrix language, Tr(ψϕ†)=ϕ†ψ.
Pitfalls, and where to go deeper
Think first Simplify (∣a⟩⟨b∣)(∣c⟩⟨d∣).
∣a⟩⟨b∣c⟩⟨d∣=⟨b∣c⟩∣a⟩⟨d∣. The inner bracket collapses to a number; the outer ket and bra survive. For orthonormal basis vectors this is the matrix-unit rule EabEcd=δbcEad.
Key takeaways
A ket is a column vector and its bra the conjugate-transposed row; bras are antilinear, (c∣ψ⟩)†=c∗⟨ψ∣.
Outer products ∣ψ⟩⟨ϕ∣ are operators; A=∑ij⟨i∣A∣j⟩∣i⟩⟨j∣, and ∑k∣fk⟩⟨ek∣ maps one orthonormal basis to another.
Completeness ∑i∣i⟩⟨i∣=I: insert it to expand states, multiply matrices, compute traces and normalize probabilities.
Born rule in bra-ket form: Pr(i)=⟨ψ∣Pi∣ψ⟩, with post-measurement state Pi∣ψ⟩/Pr(i).
The spectral decomposition A=∑aa∣a⟩⟨a∣ gives expectation values and functions of operators directly.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Question 1
What is the bra corresponding to the ket c∣ψ⟩, for a complex number c?
c∗⟨ψ∣
c⟨ψ∣
∣c∣⟨ψ∣
⟨ψ∣/c
Show the answer
A.c∗⟨ψ∣
Taking the bra is conjugate transposition, which conjugates scalars: (c∣ψ⟩)†=c∗⟨ψ∣. This antilinearity is what makes ⟨ψ∣ψ⟩ real and non-negative.
Question 2
Which operator is ∣+⟩⟨0∣+∣−⟩⟨1∣?
X
Z
H
I
Show the answer
C.H
It sends ∣0⟩→∣+⟩ and ∣1⟩→∣−⟩: the Hadamard gate. The coefficients of ∣i⟩⟨j∣ give 21(111−1).
Question 3
Simplify ∣0⟩⟨+∣∣−⟩⟨1∣.
∣0⟩⟨1∣
0
21∣0⟩⟨1∣
∣0⟩⟨1∣−∣+⟩⟨−∣
Show the answer
B.0
∣0⟩⟨+∣−⟩⟨1∣=0 because ⟨+∣−⟩=0. Slide the inner bracket together first; it is a number.
Question 4
A state ∣ψ⟩ is measured in the orthonormal basis {∣bk⟩}. Which expression gives the probability of outcome k?
⟨bk∣ψ⟩
⟨ψ∣ψ⟩⟨bk∣bk⟩
Tr∣bk⟩⟨bk∣
⟨ψ∣(∣bk⟩⟨bk∣)∣ψ⟩
Show the answer
D.⟨ψ∣(∣bk⟩⟨bk∣)∣ψ⟩
⟨ψ∣Pk∣ψ⟩=⟨ψ∣bk⟩⟨bk∣ψ⟩=∣⟨bk∣ψ⟩∣2, the Born rule.
Question 5
What is ⟨+∣Z∣+⟩?
0
1
−1
21
Show the answer
A.0
Z∣+⟩=∣−⟩, so ⟨+∣Z∣+⟩=⟨+∣−⟩=0: outcomes ±1 are equally likely.