---
title: Observables, Hermitian Operators, and the Spectral Theorem
module: The Formalism of Quantum Mechanics
moduleNumber: 4
lessonNumber: 2
order: 402
summary: >
  Every measurable quantity is represented by a Hermitian operator, and the reason
  is forced: a measurement needs real eigenvalues, orthogonal eigenvectors, and a
  complete eigenbasis, and Hermiticity delivers precisely those. We derive those properties from
  self-adjointness, state the spectral theorem, handle degeneracy, and show that
  two observables share an eigenbasis precisely when they commute — the algebraic
  condition behind compatible and incompatible measurements.
topics: [The Formalism of Quantum Mechanics]
sources:
  - book: Griffiths & Schroeter
    ref: "Ch. 3 — Formalism; §3.3 Eigenfunctions of a Hermitian Operator"
  - book: Shankar
    ref: "Ch. 1; §1.6 Linear Operators, §1.7 Matrix Elements, §1.8–§1.9 The Eigenvalue Problem"
  - book: Sakurai & Napolitano
    ref: "Ch. 1; §1.3 Operators, §1.4 Measurements and Observables"
draft: false
---

A state is a vector; a measurable quantity is an operator that acts on vectors. The
[previous lesson](/quantum-mechanics/formalism/hilbert-space-and-dirac-notation)
built the space of states. This lesson gives observables their algebraic identity.
The central claim of quantum mechanics is narrow and consequential: every
observable is represented by a **Hermitian** operator, and the outcomes of
measuring it are its eigenvalues. Everything about spectra, orthogonality of
outcomes, and compatibility of measurements follows from that one requirement.

## Linear operators

An operator $\hat A$ maps vectors to vectors, $\hat A\ket{\alpha}=\ket{\alpha'}$,
and is **linear** when
$\hat A(c\ket{\alpha}+d\ket{\beta}) = c\hat A\ket{\alpha}+d\hat A\ket{\beta}$.
Linearity is what preserves superpositions, so every operator in quantum mechanics
is linear (with the single exception of the antilinear time-reversal operator,
treated separately). Resolving the identity on both sides fixes an operator by its
**matrix elements** in a basis,

$$
\hat A = \mathbb{1}\,\hat A\,\mathbb{1}
= \sum_{i,j}\ket{e_i}\braket{e_i|\hat A|e_j}\bra{e_j}
= \sum_{i,j} A_{ij}\,\ket{e_i}\bra{e_j},
\qquad A_{ij} = \braket{e_i|\hat A|e_j}.
$$

Operators compose by matrix multiplication, $(\hat A\hat B)_{ik}=\sum_j A_{ij}B_{jk}$,
and in general do not commute: $\hat A\hat B\neq\hat B\hat A$. The obstruction is
measured by the **commutator** $[\hat A,\hat B]=\hat A\hat B-\hat B\hat A$, which
controls compatibility and uncertainty in the lessons that follow.

### The adjoint

Every operator has a partner defined through the inner product. The **adjoint**
$\hat A^\dagger$ is the operator for which

$$
\braket{\alpha|\hat A\,\beta} = \braket{\hat A^\dagger\alpha|\beta}
\quad\text{for all }\ket{\alpha},\ket{\beta}.
$$

Moving an operator across the inner-product bar turns it into its adjoint. In
components the adjoint is the conjugate transpose,
$(A^\dagger)_{ij}=A_{ji}^\ast$, because the antilinear first slot conjugates the
matrix element and the swap of slots transposes the indices. Three properties
follow directly from the definition:

- **Involution.** $(\hat A^\dagger)^\dagger = \hat A$.
- **Reversal.** $(\hat A\hat B)^\dagger = \hat B^\dagger\hat A^\dagger$, the order
  reversing exactly as for matrix transpose.
- **Antilinearity in scalars.** $(c\hat A)^\dagger = c^\ast\hat A^\dagger$.

The bra corresponding to $\hat A\ket{\alpha}$ is $\bra{\alpha}\hat A^\dagger$; this
is the rule for taking the Hermitian conjugate of any Dirac expression — reverse
the order of every factor, swap kets with bras, and conjugate the scalars.

### The trace

A basis-independent number attached to any operator is its **trace**, the sum of
diagonal matrix elements,

$$
\operatorname{Tr}\hat A = \sum_i \braket{e_i|\hat A|e_i}.
$$

The value does not depend on the basis: inserting the identity shows
$\operatorname{Tr}(\hat U^\dagger\hat A\hat U)=\operatorname{Tr}\hat A$ for any
unitary $\hat U$, so the trace is invariant under change of basis. It is linear and
cyclic, $\operatorname{Tr}(\hat A\hat B)=\operatorname{Tr}(\hat B\hat A)$, from which
$\operatorname{Tr}[\hat A,\hat B]=0$ for any operators on a finite-dimensional
space — a fact that already forbids the canonical commutator $[\hat x,\hat p]=i\hbar$
from being realized by finite matrices, since $\operatorname{Tr}(i\hbar\,\mathbb{1})=i\hbar\dim\mathcal{H}\neq 0$.
The trace of a projector counts the dimension of its range,
$\operatorname{Tr}\hat P_n=g_n$, and it is the tool that computes expectation values
of mixed states through the density operator, $\langle A\rangle=\operatorname{Tr}(\hat\rho\hat A)$.

## Hermitian operators

An operator equal to its own adjoint is the object that represents a physical
quantity.

> **Definition (Hermitian operator).** $\hat A$ is **Hermitian** (self-adjoint)
> when $\hat A^\dagger=\hat A$, i.e. $\braket{\alpha|\hat A\,\beta}=\braket{\hat A\alpha|\beta}$
> for all $\ket{\alpha},\ket{\beta}$. Equivalently its matrix in any orthonormal
> basis obeys $A_{ij}=A_{ji}^\ast$.

In infinite dimensions Hermiticity requires care with the domain of the operator
and its boundary behavior; the physically correct notion is **self-adjointness**,
which fixes the boundary conditions that quantize a spectrum. For the finite and
well-behaved cases here the two coincide, and the distinction is flagged where it
matters. Three consequences make Hermitian operators the right representatives of
observables.

> **Theorem (Real eigenvalues).** Every eigenvalue of a Hermitian operator is real.

> **Proof.** Let $\hat A\ket{a}=a\ket{a}$ with $\ket{a}\neq\ket{0}$. Sandwich
> $\hat A$ between the eigenvector and its bra:
> $$\braket{a|\hat A|a} = a\braket{a|a}.$$
> Take the complex conjugate of both sides. On the left, conjugation is the same as
> taking the adjoint inside the bracket, and $\hat A^\dagger=\hat A$, so
> $\braket{a|\hat A|a}^\ast = \braket{a|\hat A^\dagger|a} = \braket{a|\hat A|a}$:
> the left side is real. On the right, $\braket{a|a}>0$ is real, so
> $a\braket{a|a}=a^\ast\braket{a|a}$, giving $a=a^\ast$. Hence $a\in\mathbb{R}$.

Real eigenvalues are non-negotiable for an observable: a measurement returns a real
number. This is the first reason observables must be Hermitian.

> **Theorem (Orthogonal eigenvectors).** Eigenvectors of a Hermitian operator
> belonging to distinct eigenvalues are orthogonal.

> **Proof.** Let $\hat A\ket{a}=a\ket{a}$ and $\hat A\ket{b}=b\ket{b}$ with
> $a\neq b$ (both real by the previous theorem). Evaluate
> $\braket{b|\hat A|a}$ two ways. Acting to the right,
> $\braket{b|\hat A|a}=a\braket{b|a}$. Acting to the left, using $\hat A^\dagger=\hat A$
> and $b$ real,
> $\braket{b|\hat A|a}=\braket{\hat A b|a}=b\braket{b|a}$. Subtracting,
> $(a-b)\braket{b|a}=0$, and since $a\neq b$ we get $\braket{b|a}=0$.

Distinct measurement outcomes correspond to orthogonal states. This is what lets a
measurement discriminate outcomes cleanly: the states associated with different
readings do not overlap.

$$
% caption: A Hermitian operator has real eigenvalues (marked on the real line) and
% mutually orthogonal eigenvectors; distinct outcomes correspond to perpendicular
% state directions.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
% real spectrum on a number line
\draw[black, ->] (-0.4,0) -- (6.2,0) node[right, black!70] {real axis};
\foreach \x/\lab in {0.7/{a_1}, 2.4/{a_2}, 4.3/{a_3}, 5.5/{a_4}}
  {\fill[acc] (\x,0) circle (2.4pt); \node[acc, anchor=south] at (\x,0.12) {$\lab$};}
\node[anchor=north, black!70] at (3.0,-0.15) {eigenvalues (real)};
% orthogonal eigenvector frame
\begin{scope}[xshift=8.6cm, yshift=-0.2cm]
\draw[->, acc, very thick] (0,0) -- (1.9,0) node[right] {$a_1$};
\draw[->, acc, very thick] (0,0) -- (0,1.9) node[above] {$a_2$};
\draw[black] (0.35,0) -- (0.35,0.35) -- (0,0.35);
\node[anchor=north, black!70] at (0.95,-0.2) {orthogonal};
\end{scope}
\end{tikzpicture}
$$

## The spectral theorem

Real eigenvalues and orthogonality are half the story. The completing fact is that
the eigenvectors span the whole space, so any state expands in them.

> **Theorem (Spectral theorem, finite dimensions).** A Hermitian operator $\hat A$
> on a finite-dimensional space has a complete orthonormal set of eigenvectors
> $\{\ket{a_n}\}$ with real eigenvalues $a_n$. The operator decomposes as
> $$\hat A = \sum_n a_n\ket{a_n}\bra{a_n} = \sum_n a_n\,\hat P_n,$$
> where $\hat P_n=\ket{a_n}\bra{a_n}$ projects onto the $n$-th eigenspace and
> $\sum_n\hat P_n=\mathbb{1}$.

The decomposition says a Hermitian operator is diagonal in its own eigenbasis, with
the eigenvalues down the diagonal. Any function of the operator is then computed
eigenvalue by eigenvalue: $f(\hat A)=\sum_n f(a_n)\hat P_n$, since the projectors
are orthogonal and idempotent. The exponential $e^{-i\hat H t/\hbar}$ that governs
[time evolution](/quantum-mechanics/formalism/time-evolution-schrodinger-and-heisenberg-pictures)
comes from applying this construction to the Hamiltonian.

> **Proof (spectral theorem, sketch).** Existence of one eigenvector: the map
> $\ket{\psi}\mapsto\braket{\psi|\hat A|\psi}$ on the unit sphere is continuous on a
> compact set, so it attains a maximum at some $\ket{a_1}$; a variational argument
> shows the maximizer is an eigenvector with eigenvalue $a_1$. Restrict $\hat A$ to
> the orthogonal complement of $\ket{a_1}$: because $\hat A$ is Hermitian it maps
> that subspace into itself, so $\hat A$ is again Hermitian there, and the argument
> repeats. After $\dim\mathcal{H}$ steps the eigenvectors exhaust an orthonormal
> basis, and expanding $\hat A=\mathbb{1}\hat A\mathbb{1}$ in it, using
> $\hat A\ket{a_n}=a_n\ket{a_n}$, gives $\hat A=\sum_n a_n\ket{a_n}\bra{a_n}$.

The construction $f(\hat A)=\sum_n f(a_n)\hat P_n$ defines the **functional
calculus**: any function of a real variable becomes a function of a Hermitian
operator by acting on eigenvalues. It is well defined because the projectors are
mutually orthogonal, so cross terms vanish and
$\hat A^k=\sum_n a_n^k\hat P_n$ reproduces the power series of $f$ term by term.

For Hermitian operators on infinite-dimensional Hilbert space the theorem still
holds with two amendments: the spectrum may include a **continuous** part (position
and momentum have no normalizable eigenvectors), and the sum becomes a sum plus an
integral over the continuous spectrum. The projector formalism carries over with
projectors onto eigenspaces replaced by a projection-valued measure; the working
version used throughout is that a Hermitian operator's eigenstates form a complete
basis, discrete or continuous, in which any state expands.

$$
% caption: Spectral decomposition: a Hermitian operator resolves into a weighted
% sum of orthogonal projectors, one per eigenvalue, each scaling its eigenspace by
% the corresponding real eigenvalue.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0,
  box/.style={draw, minimum width=13mm, minimum height=11mm, align=center}]
\definecolor{acc}{HTML}{4A6FA5}
\node[box, draw=acc, text=acc] (A) at (0,0) {$A$};
\node at (1.6,0) {$=$};
\node[box] (P1) at (3.2,0) {$a_1 P_1$};
\node at (4.6,0) {$+$};
\node[box] (P2) at (6.2,0) {$a_2 P_2$};
\node at (7.6,0) {$+$};
\node at (8.7,0) {plus more};
\draw[black] (2.55,-0.85) -- (9.35,-0.85);
\node[anchor=north, black!70] at (5.9,-0.9) {mutually orthogonal projectors};
\end{tikzpicture}
$$

### Degeneracy

When one eigenvalue is shared by several independent eigenvectors it is
**degenerate**, and its eigenspace has dimension greater than one. The spectral
theorem still applies: within a degenerate eigenspace any orthonormal set is an
equally valid eigenbasis, because every vector in the eigenspace has the same
eigenvalue. The projector $\hat P_n$ then projects onto the full eigenspace,

$$
\hat P_n = \sum_{k=1}^{g_n}\ket{a_n,k}\bra{a_n,k},
$$

where $g_n$ is the **degeneracy** and $k$ labels an orthonormal basis of the
eigenspace. Degeneracy is not a nuisance to be removed but a signature of symmetry:
a symmetry that commutes with $\hat A$ maps one eigenvector to another of the same
eigenvalue, forcing the degeneracy. That connection is developed in the lesson on
[symmetries and conservation laws](/quantum-mechanics/oscillator-and-symmetry/symmetries-generators-and-conservation-laws).
Inside a degenerate subspace a second observable is often used to relabel the
states, which is the subject of compatible observables below.

## Unitary operators and change of basis

Alongside Hermitian operators sit the operators that preserve the inner product.

> **Definition (Unitary operator).** $\hat U$ is **unitary** when
> $\hat U^\dagger\hat U=\hat U\hat U^\dagger=\mathbb{1}$, equivalently
> $\hat U^{-1}=\hat U^\dagger$. Unitary maps preserve all inner products:
> $\braket{\hat U\alpha|\hat U\beta}=\braket{\alpha|\beta}$.

Unitaries are the rotations of Hilbert space. They carry orthonormal bases to
orthonormal bases, so a change from one orthonormal basis $\{\ket{e_i}\}$ to another
$\{\ket{f_i}\}$ is implemented by the unitary $\hat U=\sum_i\ket{f_i}\bra{e_i}$.
Components and matrix elements transform by conjugation,

$$
c'_i = \sum_j U_{ij}c_j, \qquad A' = \hat U\,A\,\hat U^\dagger,
$$

which leaves eigenvalues, traces, and determinants invariant. A Hermitian operator
is diagonalized precisely by the unitary whose columns are its eigenvectors:
$\hat U^\dagger\hat A\hat U$ is the diagonal matrix of eigenvalues. Physical
symmetries and time evolution are unitary, because both must preserve total
probability; the connection between Hermitian generators and unitary
transformations is $\hat U=e^{-i\hat G\theta}$ with $\hat G$ Hermitian, developed
in the [time-evolution lesson](/quantum-mechanics/formalism/time-evolution-schrodinger-and-heisenberg-pictures).

$$
% caption: A unitary carries one orthonormal frame rigidly onto another, rotating
% every vector while preserving all lengths and angles; diagonalizing a Hermitian
% operator is choosing the frame in which it is diagonal.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
% original frame
\draw[->, black, very thick] (0,0) -- (2.2,0) node[right, black!70] {$e_1$};
\draw[->, black, very thick] (0,0) -- (0,2.2) node[above, black!70] {$e_2$};
% rotated frame
\draw[->, acc, very thick] (0,0) -- (30:2.2) node[right, acc] {$f_1$};
\draw[->, acc, very thick] (0,0) -- (120:2.2) node[above left, acc] {$f_2$};
\draw[acc, ->] (0:1.2) arc (0:30:1.2);
\node[acc] at (15:1.5) {$U$};
\draw[black] (0.3,0) -- (0.3,0.3) -- (0,0.3);
\end{tikzpicture}
$$

## Compatible observables and the commutator

Two observables can be measured together without disturbance exactly when they
share a complete eigenbasis, and that condition is algebraic.

> **Theorem (Commuting observables share an eigenbasis).** Two Hermitian operators
> $\hat A$ and $\hat B$ possess a common complete orthonormal eigenbasis if and
> only if they commute, $[\hat A,\hat B]=0$.

> **Proof.** If a common eigenbasis $\{\ket{a_n,b_n}\}$ exists, then on each basis
> vector $\hat A\hat B\ket{a_n,b_n}=a_n b_n\ket{a_n,b_n}=\hat B\hat A\ket{a_n,b_n}$;
> since the basis is complete, $[\hat A,\hat B]=0$ as operators. Conversely suppose
> $[\hat A,\hat B]=0$. Let $\ket{a}$ be an eigenvector of $\hat A$ with
> nondegenerate eigenvalue $a$. Then
> $\hat A(\hat B\ket{a})=\hat B\hat A\ket{a}=a(\hat B\ket{a})$, so $\hat B\ket{a}$ is
> also an eigenvector of $\hat A$ with eigenvalue $a$; nondegeneracy forces
> $\hat B\ket{a}=b\ket{a}$, a shared eigenvector. If $a$ is degenerate, $\hat B$
> maps the eigenspace to itself and is Hermitian there, so it can be diagonalized
> within that subspace, producing a common eigenbasis eigenspace by eigenspace.

Commuting observables are **compatible**: a state can have definite values of both
at once, and measuring one does not scramble the other. When
$[\hat A,\hat B]\neq 0$ the observables are **incompatible** and no basis
diagonalizes both, so sharp values cannot coexist — the seed of the
[generalized uncertainty principle](/quantum-mechanics/formalism/commutators-and-the-generalized-uncertainty-principle).
A maximal set of mutually commuting observables whose joint eigenvalues label each
basis vector uniquely is a **complete set of commuting observables** (CSCO); the
standard $\{\hat H,\hat L^2,\hat L_z\}$ for the hydrogen atom is the archetype.

$$
% caption: Commuting observables share one eigenbasis, so a single frame
% diagonalizes both; incompatible observables have eigenbases rotated relative to
% each other, and no frame diagonalizes both at once.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
% left: shared basis
\node[anchor=south, black!75] at (1.0,2.3) {commuting};
\draw[->, acc, very thick] (0,0) -- (2.0,0) node[right] {shared};
\draw[->, acc, very thick] (0,0) -- (0,2.0);
\draw[black] (0.35,0) -- (0.35,0.35) -- (0,0.35);
\node[anchor=north, black!70] at (1.0,-0.25) {A and B commute};
% right: rotated bases
\begin{scope}[xshift=6.4cm]
\node[anchor=south, black!75] at (1.0,2.3) {incompatible};
\draw[->, acc, very thick] (0,0) -- (2.0,0) node[right, acc] {$A$};
\draw[->, acc, very thick] (0,0) -- (0,2.0);
\draw[->, black, very thick, dashed] (0,0) -- (1.7,1.05) node[right, black!70] {$B$};
\draw[->, black, very thick, dashed] (0,0) -- ({-1.05},1.7);
\node[anchor=north, black!70] at (1.0,-0.25) {no shared frame};
\end{scope}
\end{tikzpicture}
$$

> **Worked example.** On the spin-$\tfrac12$ space take
> $$
> \sigma_z = \begin{pmatrix} 1 & 0 \\ 0 & -1\end{pmatrix},
> \qquad \sigma_x = \begin{pmatrix} 0 & 1 \\ 1 & 0\end{pmatrix}.
> $$
> Both are Hermitian with eigenvalues $\pm 1$. Their commutator is
> $$
> [\sigma_x,\sigma_z] = \sigma_x\sigma_z - \sigma_z\sigma_x
> = \begin{pmatrix} 0 & -1 \\ 1 & 0\end{pmatrix} - \begin{pmatrix} 0 & 1 \\ -1 & 0\end{pmatrix}
> = \begin{pmatrix} 0 & -2 \\ 2 & 0\end{pmatrix} \neq 0,
> $$
> so they are incompatible. The eigenvectors of $\sigma_z$ are
> $\ket{\uparrow}=(1,0)^\top$ and $\ket{\downarrow}=(0,1)^\top$; the eigenvectors of
> $\sigma_x$ are $\tfrac{1}{\sqrt2}(1,\pm1)^\top$, an equal superposition of the
> $\sigma_z$ eigenstates rotated by $45^\circ$ in the plane. No basis diagonalizes
> both, matching the theorem: a state sharp in $\sigma_z$ is maximally spread in
> $\sigma_x$.

The eigenbases of Hermitian operators are the frames in which measurement outcomes
are read. The next lesson turns that geometry into physical predictions through the
[postulates and the Born rule](/quantum-mechanics/formalism/the-postulates-and-quantum-measurement).

[^griffiths-herm]: **Griffiths & Schroeter**, _Introduction to Quantum Mechanics_ 3rd ed., §3.3 — determinate states, the reality of eigenvalues, orthogonality of eigenfunctions, and completeness (Dirac's spectral hypothesis for observables). Cambridge, 2018.
