---
title: Hilbert Space and Dirac Bra–Ket Notation
module: The Formalism of Quantum Mechanics
moduleNumber: 4
lessonNumber: 1
order: 401
summary: >
  Wave mechanics is one representation of a deeper structure: quantum states are
  vectors in a complex inner-product space, and observables act on them as linear
  operators. We build that space from the axioms, introduce Dirac's kets and bras
  as vectors and the linear functionals that measure them, and identify the
  wavefunction as the components of an abstract state in the position basis. The
  resolution of the identity is the single algebraic tool that ties every basis,
  expansion, and matrix element together.
topics: [The Formalism of Quantum Mechanics]
sources:
  - book: Shankar
    ref: "Ch. 1 — Mathematical Introduction; §1.1–§1.6 Linear Vector Spaces"
  - book: Griffiths & Schroeter
    ref: "Ch. 3 — Formalism; §3.1 Hilbert Space, §3.2 Observables"
  - book: Sakurai & Napolitano
    ref: "Ch. 1; §1.2 Kets, Bras, and Operators, §1.3 Base Kets and Matrix Representations"
draft: false
---

Wave mechanics in [one dimension](/quantum-mechanics/wave-mechanics-1d/the-schrodinger-equation-in-one-dimension)
presents a quantum state as a complex function $\psi(x)$ and observables as
differential operators acting on it. That description is complete, but it is not
the only one: the same physical state can be written as a function of momentum, or
as a list of expansion coefficients in the energy basis, and each version carries
the identical physics. What all these descriptions share is linear structure. A
state is a vector, a superposition is a sum of vectors, and an observable is a
linear map. This lesson isolates that structure and states it abstractly, so that
the later machinery of measurement, uncertainty, and time evolution applies to
spin, oscillators, and fields with no reference to any particular representation.

## Complex vector spaces

A quantum state lives in a complex vector space. The scalars are complex because
superposition amplitudes interfere: the relative phase of two contributions is
physical, and only $\mathbb{C}$ carries phase as an intrinsic part of a scalar.

> **Definition (Complex vector space).** A set $V$ with an addition
> $\ket{\alpha} + \ket{\beta} \in V$ and a scalar multiplication
> $c\ket{\alpha} \in V$ for $c \in \mathbb{C}$, such that addition is commutative
> and associative with an identity $\ket{0}$ and inverses, and scalar
> multiplication distributes over both sums:
> $c(\ket{\alpha}+\ket{\beta}) = c\ket{\alpha}+c\ket{\beta}$,
> $(c+d)\ket{\alpha} = c\ket{\alpha}+d\ket{\alpha}$, with $1\ket{\alpha}=\ket{\alpha}$.

The angle-bracket symbol $\ket{\alpha}$ is Dirac's **ket**: a name for an abstract
vector, deliberately carrying no coordinates. The label inside is a mnemonic, not
a value; $\ket{\psi}$, $\ket{n}$, $\ket{x_0}$, and $\ket{\uparrow}$ are all just
vectors, distinguished by what physical state they name. Two operations recur
throughout:

- **Linear combination.** A finite superposition
  $\ket{\gamma} = c_1\ket{\alpha_1} + \cdots + c_n\ket{\alpha_n}$ is again a vector
  in $V$. This is the mathematical content of the superposition principle.
- **Linear independence.** Vectors $\ket{\alpha_1},\dots,\ket{\alpha_n}$ are
  linearly independent when $\sum_i c_i\ket{\alpha_i}=\ket{0}$ forces every
  $c_i=0$. The maximum number of linearly independent vectors is the **dimension**
  of $V$, finite for spin and infinite for a particle on a line.

Note that $\ket{\alpha}$ and $c\ket{\alpha}$ for $c\neq 0$ are different vectors of
the space, yet later they will represent the same physical state once we impose
normalization and quotient out an overall phase. The vector space is slightly
larger than the set of physical states; that redundancy is harmless and is fixed
in the measurement postulate.

## The inner product

Length and angle enter through an inner product. In a complex space the inner
product must be built so that a vector has a real, non-negative squared length,
which forces a conjugation in one slot.

> **Definition (Inner product).** A map assigning to each ordered pair a complex
> number $\braket{\alpha|\beta}\in\mathbb{C}$ with
> $$
> \braket{\beta|\alpha} = \braket{\alpha|\beta}^\ast, \qquad
> \braket{\alpha|\alpha}\ge 0 \text{ with equality iff } \ket{\alpha}=\ket{0},
> $$
> and linearity in the second argument,
> $\braket{\alpha| \, c\beta + d\gamma} = c\braket{\alpha|\beta} + d\braket{\alpha|\gamma}$.

Conjugate symmetry then makes the product **antilinear** in the first argument:
$\braket{c\alpha|\beta} = c^\ast\braket{\alpha|\beta}$. This asymmetry — linear on
the right, antilinear on the left — is the single convention that organizes all of
Dirac notation, and it is the physicists' convention (Shankar, Sakurai), opposite
to the mathematicians'.[^shankar-ip] The **norm** is
$\lVert\alpha\rVert = \sqrt{\braket{\alpha|\alpha}}$, and a vector with
$\lVert\alpha\rVert = 1$ is **normalized**. Two vectors are **orthogonal** when
$\braket{\alpha|\beta}=0$.

> **Theorem (Cauchy–Schwarz inequality).** For any $\ket{\alpha},\ket{\beta}$,
> $$\lvert\braket{\alpha|\beta}\rvert^2 \le \braket{\alpha|\alpha}\braket{\beta|\beta}.$$
> Equality holds iff $\ket{\alpha}$ and $\ket{\beta}$ are linearly dependent.

> **Proof.** If $\ket{\beta}=\ket{0}$ both sides vanish. Otherwise define
> $$\ket{\gamma} = \ket{\alpha} - \frac{\braket{\beta|\alpha}}{\braket{\beta|\beta}}\ket{\beta},$$
> the part of $\ket{\alpha}$ orthogonal to $\ket{\beta}$; direct computation gives
> $\braket{\beta|\gamma}=0$. Non-negativity of $\braket{\gamma|\gamma}$ reads
> $$
> 0 \le \braket{\gamma|\gamma} = \braket{\alpha|\alpha}
> - \frac{\lvert\braket{\beta|\alpha}\rvert^2}{\braket{\beta|\beta}},
> $$
> since the cross terms cancel against the subtracted projection. Multiplying
> through by $\braket{\beta|\beta}>0$ gives the inequality. Equality forces
> $\braket{\gamma|\gamma}=0$, hence $\ket{\gamma}=\ket{0}$ and $\ket{\alpha}$ is a
> multiple of $\ket{\beta}$.

The vector $\ket{\gamma}$ constructed in the proof is the residual after removing
the component of $\ket{\alpha}$ along $\ket{\beta}$. That projection idea is the
geometric engine of the whole formalism. Cauchy–Schwarz also delivers the triangle
inequality, which makes the norm a genuine distance.

> **Theorem (Triangle inequality).** $\lVert\alpha+\beta\rVert \le \lVert\alpha\rVert + \lVert\beta\rVert$.

> **Proof.** Expand the squared norm and bound the cross term by Cauchy–Schwarz:
> $$
> \lVert\alpha+\beta\rVert^2 = \braket{\alpha|\alpha} + \braket{\beta|\beta}
> + 2\operatorname{Re}\braket{\alpha|\beta}
> \le \lVert\alpha\rVert^2 + \lVert\beta\rVert^2 + 2\lVert\alpha\rVert\lVert\beta\rVert,
> $$
> since $\operatorname{Re}\braket{\alpha|\beta}\le\lvert\braket{\alpha|\beta}\rvert\le\lVert\alpha\rVert\lVert\beta\rVert$.
> The right side is $(\lVert\alpha\rVert+\lVert\beta\rVert)^2$; taking square roots
> gives the claim.

The metric $d(\alpha,\beta)=\lVert\alpha-\beta\rVert$ that these inequalities
support is what makes "two states are close" precise, and it is the notion of
distance under which the completeness of a Hilbert space is defined below.

$$
% caption: Cauchy–Schwarz geometry: the residual after subtracting the projection
% of one vector onto another is orthogonal to it, and its non-negative length gives
% the inequality; equality means the vectors are collinear.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\coordinate (O) at (0,0);
\coordinate (B) at (4.2,0);
\coordinate (A) at (2.6,2.4);
\coordinate (P) at (2.6,0);
\draw[->, very thick] (O) -- (B) node[right] {$v$};
\draw[->, very thick] (O) -- (A) node[above left] {$u$};
\draw[->, black, thick] (O) -- (P) node[below, black!70] {proj};
\draw[->, acc, thick] (P) -- (A) node[midway, right, acc] {resid};
\draw[black] (2.35,0) -- (2.35,0.25) -- (2.6,0.25);
\node[anchor=north] at (2.1,-0.15) {\phantom{x}};
\end{tikzpicture}
$$

## Bras and the dual space

The inner product lets each vector act as a machine that eats a vector and returns
a number. Fix $\ket{\alpha}$; the map $\ket{\beta}\mapsto\braket{\alpha|\beta}$ is
linear, so it is a **linear functional** on $V$. The set of all linear functionals
is the **dual space** $V^\ast$, itself a vector space. Dirac writes the functional
associated with $\ket{\alpha}$ as the **bra** $\bra{\alpha}$, and its value on
$\ket{\beta}$ as the bracket $\braket{\alpha|\beta}$ — the notation splits the word
"bracket" and makes the pairing typographically obvious.

> **Theorem (Riesz correspondence).** In a finite-dimensional inner-product space
> (and in any Hilbert space, for continuous functionals) every linear functional
> $f$ is $f(\cdot)=\braket{\alpha_f|\cdot}$ for a unique $\ket{\alpha_f}$. The map
> $\ket{\alpha}\mapsto\bra{\alpha}$ is therefore a one-to-one, onto, antilinear
> correspondence between $V$ and $V^\ast$.

The correspondence is **antilinear**: the bra of $c\ket{\alpha}$ is
$c^\ast\bra{\alpha}$, matching the conjugation in the first slot. Kets and bras are
two encodings of the same information — a vector and the functional it defines —
and moving between them means complex-conjugating scalars. In the concrete case of
$L^2$ functions this is why the wavefunction picks up a conjugate whenever it sits
on the left of an inner product.

$$
% caption: A bra is a linear functional: it maps every ket to a complex number,
% and the number it returns on a ket is the inner product, read geometrically as
% how much of the ket lies along the bra's own direction.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0,
  box/.style={draw, minimum width=17mm, minimum height=9mm, align=center}]
\definecolor{acc}{HTML}{4A6FA5}
\node[box] (ket) at (0,0) {ket};
\node[box, draw=acc, text=acc] (bra) at (4.0,0) {bra};
\node[box] (num) at (8.2,0) {a number};
\draw[->, acc, thick] (ket) -- (bra) node[midway, above] {fed to};
\draw[->, acc, thick] (bra) -- (num) node[midway, above] {returns};
\node[anchor=north, black!70] at (4.0,-0.9) {a map to the scalars};
\end{tikzpicture}
$$

## Orthonormal bases and components

A set $\{\ket{e_i}\}$ is **orthonormal** when $\braket{e_i|e_j}=\delta_{ij}$, and it
is a **basis** when every vector expands uniquely as
$\ket{\alpha}=\sum_i c_i\ket{e_i}$. Orthonormality makes the coefficients trivial to
extract: take the inner product with $\bra{e_j}$ and use
$\braket{e_j|e_i}=\delta_{ji}$,

$$
\braket{e_j|\alpha} = \sum_i c_i\braket{e_j|e_i} = \sum_i c_i\,\delta_{ji} = c_j.
$$

The $j$-th component of a vector is the inner product of the $j$-th basis bra with
the vector. Substituting the recovered coefficients back into the expansion gives
the identity that will reappear on nearly every page,

$$
\ket{\alpha} = \sum_i \ket{e_i}\braket{e_i|\alpha}
= \Bigl(\sum_i \ket{e_i}\bra{e_i}\Bigr)\ket{\alpha}.
$$

Because this holds for every $\ket{\alpha}$, the operator in parentheses is the
identity.

> **Theorem (Resolution of the identity).** For any orthonormal basis
> $\{\ket{e_i}\}$ of $V$,
> $$\sum_i \ket{e_i}\bra{e_i} = \mathbb{1}.$$
> Each term $\hat P_i = \ket{e_i}\bra{e_i}$ is the orthogonal **projector** onto
> the $i$-th axis, satisfying $\hat P_i^2 = \hat P_i$ and $\hat P_i\hat P_j=0$ for
> $i\neq j$.

Inserting $\mathbb{1}=\sum_i\ket{e_i}\bra{e_i}$ into any expression is the single
most-used move in the formalism: it converts abstract objects into components. The
inner product of two vectors becomes a sum over the basis,

$$
\braket{\alpha|\beta} = \bra{\alpha}\,\mathbb{1}\,\ket{\beta}
= \sum_i \braket{\alpha|e_i}\braket{e_i|\beta}
= \sum_i c_i^{(\alpha)\ast}\,c_i^{(\beta)},
$$

the familiar dot product with a conjugate on the left factor — the concrete face of
the antilinear-first-slot convention.

$$
% caption: The resolution of the identity: a state equals the sum of its
% projections onto an orthonormal basis, each projector reading off one component
% and rebuilding the vector when the components are summed.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0,
  ax/.style={->, black}]
\definecolor{acc}{HTML}{4A6FA5}
\draw[ax] (0,0) -- (4.6,0) node[right, black!70] {$e_1$};
\draw[ax] (0,0) -- (0,3.4) node[above, black!70] {$e_2$};
\coordinate (V) at (3.6,2.5);
\draw[->, acc, very thick] (0,0) -- (V) node[above right] {state};
\draw[black, dashed] (V) -- (3.6,0);
\draw[black, dashed] (V) -- (0,2.5);
\draw[->, acc, thick] (0,0) -- (3.6,0);
\draw[->, acc, thick] (0,0) -- (0,2.5);
\node[anchor=north, acc] at (3.6,-0.1) {$c_1$};
\node[anchor=east, acc] at (-0.1,2.5) {$c_2$};
\end{tikzpicture}
$$

### Gram–Schmidt orthogonalization

Orthonormal bases are not scarce: any linearly independent set can be turned into
one. Given independent vectors $\ket{v_1},\ket{v_2},\dots$, the **Gram–Schmidt**
procedure builds an orthonormal set spanning the same subspace by removing, at each
step, the components already accounted for and normalizing what remains,

$$
\ket{u_k} = \ket{v_k} - \sum_{j<k}\ket{e_j}\braket{e_j|v_k},
\qquad \ket{e_k} = \frac{\ket{u_k}}{\lVert u_k\rVert}.
$$

The subtracted sum is the projection of $\ket{v_k}$ onto the span of the already
orthonormalized vectors, so $\ket{u_k}$ is orthogonal to all $\ket{e_{j<k}}$ by
construction, exactly the residual of the Cauchy–Schwarz proof applied repeatedly.
The procedure guarantees that every finite-dimensional inner-product space, and
every separable Hilbert space, admits an orthonormal basis — the standing
assumption behind every expansion in this course.

$$
% caption: Gram–Schmidt builds an orthonormal set: keep the first vector, subtract
% from the second its projection onto the first to leave a perpendicular residual,
% then normalize each.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\coordinate (O) at (0,0);
\draw[->, acc, very thick] (O) -- (3.2,0) node[right, acc] {$v_1$};
\draw[->, black, very thick] (O) -- (2.2,2.2) node[above, black!70] {$v_2$};
\draw[black, dashed] (2.2,2.2) -- (2.2,0);
\draw[->, black, thick] (O) -- (2.2,0) node[midway, below, black!70] {proj};
\draw[->, acc, very thick, dashed] (2.2,0) -- (2.2,2.2) node[midway, right, acc] {$u_2$};
\draw[black] (2.2,0.3) -- (1.9,0.3) -- (1.9,0);
\end{tikzpicture}
$$

### Matrix representation

Once a basis is fixed, a vector becomes a column of its components and a bra becomes
a row of their conjugates:

$$
\ket{\alpha} \;\leftrightarrow\; \begin{pmatrix} c_1 \\ c_2 \\ \vdots \end{pmatrix},
\qquad
\bra{\alpha} \;\leftrightarrow\; \begin{pmatrix} c_1^\ast & c_2^\ast & \cdots \end{pmatrix}.
$$

The bracket $\braket{\alpha|\beta}$ is the row-times-column product, and the outer
product $\ket{\alpha}\bra{\beta}$ is the column-times-row product, a matrix. A
linear operator $\hat A$ becomes the matrix with entries
$A_{ij}=\braket{e_i|\hat A|e_j}$, obtained by resolving the identity on both sides
of $\hat A$. All of matrix mechanics is the resolution of the identity applied
twice.

## Function spaces and the Hilbert space

For a particle on a line the state is a function $\psi(x)$, and the space is
infinite-dimensional. The inner product generalizes the component sum to an
integral,

$$
\braket{\phi|\psi} = \int_{-\infty}^{\infty} \phi^\ast(x)\,\psi(x)\d x,
$$

and the squared norm $\braket{\psi|\psi}=\int\lvert\psi\rvert^2\d x$ must be finite
for the state to be normalizable. The set of functions with finite squared norm is
the space $L^2(\mathbb{R})$.

> **Definition (Hilbert space).** A complex inner-product space that is **complete**:
> every Cauchy sequence of vectors (one whose members grow arbitrarily close in
> norm) converges to a limit inside the space. Completeness is automatic in finite
> dimensions; in infinite dimensions it is the condition that makes limits, series,
> and spectral expansions well defined. $L^2(\mathbb{R})$ is the standard example.

Completeness is what lets an infinite superposition
$\sum_n c_n\ket{n}$ actually name a vector rather than a formal symbol, provided
$\sum_n\lvert c_n\rvert^2<\infty$. The Riesz–Fischer theorem makes this precise:
the map $\ket{\psi}\mapsto(c_1,c_2,\dots)$ from $L^2$ to the sequence space
$\ell^2$ of square-summable lists is an isomorphism of Hilbert spaces. Every
separable Hilbert space of a given dimension is the same space in different
clothing, which is why spin, the oscillator, and a particle on a line all obey one
formalism. The quantum state space is a **separable** Hilbert space: it admits a
countable orthonormal basis, so the discrete formulas above carry over with sums
running to infinity.

Two technical points are worth flagging, since they explain conventions used
without comment later. First, elements of $L^2$ are equivalence classes of
functions agreeing except on a set of measure zero: the wavefunction is only
defined "almost everywhere," so its value at a single point carries no physical
meaning, only its integrals against test functions do. Second, the physically
important operators — position, momentum, energy — are **unbounded**, defined not
on all of $\mathcal{H}$ but on dense domains of sufficiently smooth, decaying
functions. Self-adjointness is a statement about those domains and the boundary
conditions they encode, which is where energy quantization ultimately comes from.
These subtleties never obstruct a calculation but they are the reason the naive
"eigenstate of position" is an idealization outside the space. Where the natural "basis" is
continuous — the position and momentum eigenkets — the sum becomes an integral and
$\delta_{ij}$ becomes a Dirac delta, a change developed carefully in the lesson on
[position, momentum, and continuous spectra](/quantum-mechanics/formalism/position-momentum-and-continuous-spectra).

$$
% caption: The same abstract state has a discrete-basis representation as a column
% of expansion coefficients and a continuous-basis representation as a wavefunction;
% Kronecker orthonormality becomes a Dirac delta in the continuous case.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
% discrete: column of coefficients as bars
\node[anchor=south, black!75] at (1.1,3.2) {discrete basis};
\draw[black, ->] (0,0) -- (2.3,0) node[right, black!70] {$n$};
\draw[black, ->] (0,0) -- (0,3.0);
\foreach \n/\h in {0.3/1.4, 0.7/2.4, 1.1/1.9, 1.5/1.0, 1.9/0.5}
  \draw[acc, very thick] (\n,0) -- (\n,\h);
\node[anchor=north, black!70] at (1.1,-0.15) {$c_n$};
% continuous: smooth curve
\begin{scope}[xshift=5.2cm]
\node[anchor=south, black!75] at (1.7,3.2) {smooth basis};
\draw[black, ->] (0,0) -- (3.4,0) node[right, black!70] {$x$};
\draw[black, ->] (0,0) -- (0,3.0);
\draw[acc, very thick] plot[domain=0.15:3.3, samples=120]
  (\x, {2.4*exp(-2.2*(\x-1.5)^2) + 0.9*exp(-3.0*(\x-2.5)^2)});
\node[anchor=north, black!70] at (1.7,-0.15) {amplitude};
\end{scope}
\end{tikzpicture}
$$

## The wavefunction as components

The two pictures meet in a single statement: $\psi(x)$ is the component of the
abstract state $\ket{\psi}$ along the position eigenket $\ket{x}$,

$$
\psi(x) = \braket{x|\psi}.
$$

The wavefunction is not the state; it is the state's representation in the basis of
position eigenkets, exactly as the column $(c_1,c_2,\dots)$ is the state's
representation in a discrete basis. Choosing the momentum basis instead gives the
momentum-space wavefunction $\tilde\psi(p)=\braket{p|\psi}$, a different list of
components for the identical vector. The resolution of the identity in the position
basis reads

$$
\ket{\psi} = \int \ket{x}\braket{x|\psi}\d x = \int \psi(x)\,\ket{x}\d x,
$$

and taking the bracket with $\bra{\phi}$ reproduces the $L^2$ inner product. Every
manipulation of wavefunctions — normalization, overlap, expectation value — is a
special case of the basis-free identities of this lesson, read in the position
representation.

> **Worked example.** A spin-$\tfrac12$ system has a two-dimensional state space
> with orthonormal basis $\{\ket{\uparrow},\ket{\downarrow}\}$. Let
> $\ket{\psi} = \tfrac{1}{\sqrt5}\bigl(2\ket{\uparrow} + i\ket{\downarrow}\bigr)$.
> Its components are $c_\uparrow = 2/\sqrt5$ and $c_\downarrow = i/\sqrt5$, so the
> bra is
> $$\bra{\psi} = \tfrac{1}{\sqrt5}\bigl(2\bra{\uparrow} - i\bra{\downarrow}\bigr),$$
> conjugating each coefficient. The norm check uses orthonormality:
> $$
> \braket{\psi|\psi} = \tfrac15\bigl(4\braket{\uparrow|\uparrow}
> + \braket{\downarrow|\downarrow}\bigr) = \tfrac15(4+1) = 1.
> $$
> The projector onto spin-up is $\hat P_\uparrow = \ket{\uparrow}\bra{\uparrow}$,
> and
> $$
> \hat P_\uparrow\ket{\psi} = \tfrac{2}{\sqrt5}\ket{\uparrow},
> \qquad \braket{\psi|\hat P_\uparrow|\psi} = \tfrac45,
> $$
> the probability weight of the up outcome, anticipating the Born rule.

The abstract vocabulary — vectors, duals, orthonormal bases, projectors,
completeness — is now in place. The next lesson gives observables their algebraic
identity as [Hermitian operators](/quantum-mechanics/formalism/observables-hermitian-operators-and-eigenvalues),
whose eigenvectors supply the special bases in which measurement outcomes live.

[^shankar-ip]: **Shankar**, _Principles of Quantum Mechanics_ 2nd ed., §1.1–§1.3 — linear vector spaces, the inner product antilinear in the first argument (physics convention), and the Cauchy–Schwarz and triangle inequalities. Springer, 1994.
