Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 39 · Hilbert Space and Dirac Notation

Bras, Kets and Operators

Master Dirac notation: kets, bras, outer products, projectors, adjoints and matrix elements, and use the completeness relation to compute fast.

Dirac's bra-ket notation is not decoration. It lets you write quantum calculations without committing to a representation, so the same formula works for spin, position, energy levels or photon number. It also makes the most important trick in quantum mechanics, inserting a complete set of states, almost mechanical.

In this lesson you learn what bras, kets and operators are, how to turn them into matrices, and how projectors work.

Kets, bras and the pairing

A ket |ψ⟩ is a vector of the Hilbert space. A bra ⟨φ| is a linear map that takes a ket and returns a complex number. The bra ⟨φ| associated with the ket |φ⟩ acts as

Text
⟨φ|(|ψ⟩) = ⟨φ|ψ⟩  (the inner product)

In a given basis, a ket is a column vector and its bra is the conjugate transpose (a row vector with complex-conjugated entries). Converting a ket into the corresponding bra, or an expression into its adjoint, follows fixed rules:

Object Adjoint (dagger)
|ψ⟩ ⟨ψ|
a|ψ⟩ a* ⟨ψ|
⟨φ|ψ⟩ ⟨ψ|φ⟩
A|ψ⟩ ⟨ψ| A†
AB B† A† (order reverses)

The order reversal in (AB)† = B†A† is a frequent source of sign and conjugation errors. When you take the adjoint of a product, reverse the order and conjugate every number.

Operators, outer products and matrices

An operator A maps kets to kets and is linear. The outer product |φ⟩⟨ψ| is the operator that acts on a ket |χ⟩ as |φ⟩⟨ψ|χ⟩: it returns |φ⟩ multiplied by the number ⟨ψ|χ⟩.

In an orthonormal basis {|n⟩} the matrix element is Aₘₙ = ⟨m|A|n⟩. Insert the completeness relation Σ|n⟩⟨n| = 1 on both sides to get

Text
A = Σₘₙ |m⟩ ⟨m|A|n⟩ ⟨n| = Σₘₙ Aₘₙ |m⟩⟨n|

So an operator is nothing more than its matrix elements and the outer products they multiply.

Python Outer products and operator matrices

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The first adjoint identity holds, while the naive second one does not hold in general.

Projectors and completeness

A projector onto the normalized state |n⟩ is Pₙ = |n⟩⟨n|. It satisfies Pₙ² = Pₙ and Pₙ† = Pₙ. Applying it to |ψ⟩ gives ⟨n|ψ⟩ |n⟩, the part of |ψ⟩ along |n⟩. The probability of finding n is ⟨ψ|Pₙ|ψ⟩ = |⟨n|ψ⟩|².

For two orthogonal projectors PₙPₘ = 0 when n ≠ m. A complete set sums to the identity, Σ Pₙ = 1. If an observable A has eigenvalues aₙ, its spectral decomposition is A = Σ aₙ Pₙ. This representation is how you define functions of operators: f(A) = Σ f(aₙ) Pₙ.

Python Projectors, completeness and f(A)

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Inserting the identity: the core trick

Most derivations in this track begin by inserting 1 = Σ|n⟩⟨n| at a convenient place. Two examples:

  • Expectation value: ⟨A⟩ = ⟨ψ|A|ψ⟩ = Σₘₙ ⟨ψ|m⟩ Aₘₙ ⟨n|ψ⟩ = Σₘₙ cₘ* Aₘₙ cₙ.
  • Product of operators: (AB)ₘₙ = Σₖ Aₘₖ Bₖₙ, which is just matrix multiplication.

The identity can be a sum over a discrete basis or an integral over a continuous one (∫|x⟩⟨x| dx = 1). That is what turns the abstract bracket ⟨x|ψ⟩ into the wave function ψ(x).

Trace and the cyclic property

The trace Tr A = Σₙ ⟨n|A|n⟩ does not depend on the basis, and Tr(AB) = Tr(BA), hence Tr(ABC) = Tr(CAB). The trace appears in the density matrix formalism of Chapter 8, where expectation values are Tr(ρA).

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is (AB)† equal to?

    Taking the adjoint reverses the order of the factors.
  2. 2. A projector P = |n⟩⟨n| with normalized |n⟩ satisfies

    P² = |n⟩⟨n|n⟩⟨n| = |n⟩⟨n| because ⟨n|n⟩ = 1.
  3. 3. The spectral decomposition of a Hermitian operator A with eigenvalues aₙ is

    A is the sum of its eigenvalues times the projectors onto the corresponding eigenvectors.
  4. 4. What does the matrix element Aₘₙ equal?

    The row index is the bra and the column index is the ket: Aₘₙ = ⟨m|A|n⟩.

Summary

  • Kets are vectors, bras are linear functionals; in a basis they are columns and conjugate-transposed rows.
  • Operators are linear; Aₘₙ = ⟨m|A|n⟩ and A = Σ Aₘₙ|m⟩⟨n|.
  • Adjoint reverses order: (AB)† = B†A†.
  • Projectors satisfy P² = P; completeness is Σ Pₙ = 1; f(A) = Σ f(aₙ)Pₙ.
  • Inserting the identity is the central calculational trick.

Next: Hermitian Operators and the Spectral Theorem