Skip to content

Dirac Notation as Linear Algebra

Dirac notation is compact linear algebra for complex inner-product spaces. A ket is a vector, a bra is a dual vector obtained from the inner product convention, an inner product is a scalar, an outer product is a linear map, and a matrix element is a coordinate of an operator.

The canonical convention page is Bra-Ket Notation. This page explains the underlying mathematical objects so that the symbols do not become a set of disconnected rules.

A ket such as

∣ψ⟩\lvert\psi\rangle

denotes a vector in a complex vector space, usually a Hilbert space H\mathcal H. In a chosen basis {∣ej⟩}\{\lvert e_j\rangle\}, it can be represented by coordinates:

∣ψ⟩=∑jcj∣ej⟩.\lvert\psi\rangle = \sum_j c_j\lvert e_j\rangle.

The ket is the abstract vector. The coordinate column

(c1c2⋮)\begin{pmatrix} c_1\\ c_2\\ \vdots \end{pmatrix}

is a representation of that vector after the basis has been chosen. Changing the basis changes the coordinates, not the vector.

A bra such as

⟨ϕ∣\langle\phi\rvert

is a linear functional on kets:

⟨ϕ∣:H→C.\langle\phi\rvert:\mathcal H\to\mathbb C.

With the physics convention, the inner product

⟨ϕ∣ψ⟩\langle\phi\vert\psi\rangle

is conjugate-linear in ϕ\phi and linear in ψ\psi. Therefore the map from kets to corresponding bras is conjugate-linear:

a∣ϕ⟩+b∣χ⟩↦a∗⟨ϕ∣+b∗⟨χ∣.a\lvert\phi\rangle+b\lvert\chi\rangle \mapsto a^*\langle\phi\rvert+b^*\langle\chi\rvert.

In a finite orthonormal basis, if

∣ψ⟩↔(c1⋮cn),\lvert\psi\rangle \leftrightarrow \begin{pmatrix} c_1\\ \vdots\\ c_n \end{pmatrix},

then

⟨ψ∣↔(c1∗⋯cn∗).\langle\psi\rvert \leftrightarrow \begin{pmatrix} c_1^* & \cdots & c_n^* \end{pmatrix}.

This is the linear-algebra content behind the rule “take the conjugate transpose.”

The product

⟨ϕ∣ψ⟩\langle\phi\vert\psi\rangle

is a complex number. In an orthonormal basis,

∣ψ⟩=∑jcj∣ej⟩,∣ϕ⟩=∑jdj∣ej⟩,\lvert\psi\rangle = \sum_j c_j\lvert e_j\rangle, \qquad \lvert\phi\rangle = \sum_j d_j\lvert e_j\rangle,

so

⟨ϕ∣ψ⟩=∑jdj∗cj.\langle\phi\vert\psi\rangle = \sum_j d_j^*c_j.

When both vectors are normalized, ⟨ϕ∣ψ⟩\langle\phi\vert\psi\rangle is a transition amplitude and

∣⟨ϕ∣ψ⟩∣2\lvert\langle\phi\vert\psi\rangle\rvert^2

is the corresponding squared amplitude. The probability interpretation belongs to the Born rule; the linear-algebra fact is that the inner product pairs a dual vector with a vector.

The expression

∣u⟩⟨v∣\lvert u\rangle\langle v\rvert

is not an inner product. It is a linear map from H\mathcal H to itself. Acting on a ket ∣ψ⟩\lvert\psi\rangle, it gives

(∣u⟩⟨v∣)∣ψ⟩=∣u⟩⟨v∣ψ⟩.\left( \lvert u\rangle\langle v\rvert \right) \lvert\psi\rangle = \lvert u\rangle \langle v\vert\psi\rangle.

Thus the bra first extracts a scalar from ∣ψ⟩\lvert\psi\rangle, and the ket ∣u⟩\lvert u\rangle supplies the output direction.

If ∣u⟩\lvert u\rangle is normalized, then

Pu=∣u⟩⟨u∣P_u = \lvert u\rangle\langle u\rvert

is a rank-one projector:

Pu2=Pu,Pu†=Pu.P_u^2=P_u, \qquad P_u^\dagger=P_u.

The canonical projector page is Projectors.

An operator AA is a linear map on the state space:

A:H→H.A:\mathcal H\to\mathcal H.

In a basis {∣ej⟩}\{\lvert e_j\rangle\}, the matrix element of AA is

Aij=⟨ei∣A∣ej⟩.A_{ij} = \langle e_i\vert A\vert e_j\rangle.

This formula says: feed the basis vector ∣ej⟩\lvert e_j\rangle into AA, then extract the component along ∣ei⟩\lvert e_i\rangle by applying ⟨ei∣\langle e_i\rvert. With the convention

A∣ej⟩=∑iAij∣ei⟩,A\lvert e_j\rangle = \sum_i A_{ij}\lvert e_i\rangle,

the same numbers AijA_{ij} form the matrix of the operator in that basis.

An expectation value is a special matrix element:

⟨A⟩ψ=⟨ψ∣A∣ψ⟩.\langle A\rangle_\psi = \langle\psi\vert A\vert\psi\rangle.

For normalized ∣ψ⟩\lvert\psi\rangle, this is the expected value of the observable represented by AA when AA is self-adjoint and the relevant domain issues are under control.

For an orthonormal basis, the identity operator can be written

I=∑j∣ej⟩⟨ej∣.I = \sum_j \lvert e_j\rangle\langle e_j\rvert.

Applying this identity to a vector gives the familiar expansion:

∣ψ⟩=I∣ψ⟩=∑j∣ej⟩⟨ej∣ψ⟩.\lvert\psi\rangle = I\lvert\psi\rangle = \sum_j \lvert e_j\rangle \langle e_j\vert\psi\rangle.

The coefficient ⟨ej∣ψ⟩\langle e_j\vert\psi\rangle is the jjth coordinate of the vector in this orthonormal basis.

Continuous bases use analogous expressions such as

I=∫∣x⟩⟨x∣ dx,I = \int \lvert x\rangle\langle x\rvert\,dx,

but ∣x⟩\lvert x\rangle is a generalized eigenket, not an ordinary normalizable Hilbert-space vector. The rigorous home of this issue is distribution theory and spectral theory; the practical translation is summarized in Representation Translation Table.

Let

∣ψ⟩=13(11+i),∣ϕ⟩=(01).\lvert\psi\rangle = \frac{1}{\sqrt3} \begin{pmatrix} 1\\ 1+i \end{pmatrix}, \qquad \lvert\phi\rangle = \begin{pmatrix} 0\\ 1 \end{pmatrix}.

Then

⟨ψ∣=13(11−i),\langle\psi\rvert = \frac{1}{\sqrt3} \begin{pmatrix} 1 & 1-i \end{pmatrix},

and

⟨ϕ∣ψ⟩=1+i3.\langle\phi\vert\psi\rangle = \frac{1+i}{\sqrt3}.

The outer product ∣ψ⟩⟨ϕ∣\lvert\psi\rangle\langle\phi\rvert is the matrix

∣ψ⟩⟨ϕ∣=13(11+i)(01)=13(0101+i).\lvert\psi\rangle\langle\phi\rvert = \frac{1}{\sqrt3} \begin{pmatrix} 1\\ 1+i \end{pmatrix} \begin{pmatrix} 0 & 1 \end{pmatrix} = \frac{1}{\sqrt3} \begin{pmatrix} 0 & 1\\ 0 & 1+i \end{pmatrix}.

It maps a vector v=(v1,v2)Tv=(v_1,v_2)^T to

v23(11+i).\frac{v_2}{\sqrt3} \begin{pmatrix} 1\\ 1+i \end{pmatrix}.

This example displays the main distinction: ⟨ϕ∣ψ⟩\langle\phi\vert\psi\rangle is a scalar, while ∣ψ⟩⟨ϕ∣\lvert\psi\rangle\langle\phi\rvert is an operator.

  • Treating ∣ψ⟩\lvert\psi\rangle as a column independent of a basis.
  • Turning a ket into a bra without complex conjugating coefficients.
  • Confusing ⟨ϕ∣ψ⟩\langle\phi\vert\psi\rangle with ∣ψ⟩⟨ϕ∣\lvert\psi\rangle\langle\phi\rvert.
  • Reading ⟨ei∣A∣ej⟩\langle e_i\vert A\vert e_j\rangle in the wrong order.
  • Forgetting that continuous kets such as ∣x⟩\lvert x\rangle are generalized objects.
  • Inserting completeness relations without checking which basis or measure is being used.
  • P. A. M. Dirac, The Principles of Quantum Mechanics, 4th ed., Oxford University Press, 1958.
  • J. von Neumann, Mathematical Foundations of Quantum Mechanics, Princeton University Press, 1955.
  • R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994.
  • B. C. Hall, Quantum Theory for Mathematicians, Springer, 2013.
  • J. J. Sakurai and J. Napolitano, Modern Quantum Mechanics, 3rd ed., Cambridge University Press, 2020.
  1. Let
∣ψ⟩=12(∣0⟩+i∣1⟩).\lvert\psi\rangle = \frac{1}{\sqrt2} \left( \lvert0\rangle+i\lvert1\rangle \right).

Find ⟨ψ∣\langle\psi\rvert.

Solution

The ket-to-bra map conjugates the coefficients:

⟨ψ∣=12(⟨0∣−i⟨1∣).\langle\psi\rvert = \frac{1}{\sqrt2} \left( \langle0\rvert-i\langle1\rvert \right).
  1. Show that ∣u⟩⟨v∣\lvert u\rangle\langle v\rvert is linear in the input ket.
Solution

For input a∣ψ⟩+b∣χ⟩a\lvert\psi\rangle+b\lvert\chi\rangle,

∣u⟩⟨v∣(a∣ψ⟩+b∣χ⟩)=∣u⟩(a⟨v∣ψ⟩+b⟨v∣χ⟩).\lvert u\rangle\langle v\rvert \left( a\lvert\psi\rangle+b\lvert\chi\rangle \right) = \lvert u\rangle \left( a\langle v\vert\psi\rangle +b\langle v\vert\chi\rangle \right).

Distributing the scalar over the output vector gives

a∣u⟩⟨v∣ψ⟩+b∣u⟩⟨v∣χ⟩.a\lvert u\rangle\langle v\vert\psi\rangle + b\lvert u\rangle\langle v\vert\chi\rangle.

Thus the outer product is a linear map on the input ket.

  1. In an orthonormal basis, let A∣e2⟩=3∣e1⟩−i∣e2⟩A\lvert e_2\rangle=3\lvert e_1\rangle-i\lvert e_2\rangle. What are A12A_{12} and A22A_{22}?
Solution

By definition,

Ai2=⟨ei∣A∣e2⟩.A_{i2} = \langle e_i\vert A\vert e_2\rangle.

The coefficient of ∣e1⟩\lvert e_1\rangle is 33, and the coefficient of ∣e2⟩\lvert e_2\rangle is −i-i. Hence

A12=3,A22=−i.A_{12}=3, \qquad A_{22}=-i.