Lesson 7 · 60 min · core
Spectral Theorem & Functions of Operators
Every normal operator — in particular every Hermitian observable and every unitary gate — is diagonal in some orthonormal basis: . We prove this spectral theorem by induction on the dimension, decompose , and a complex Hermitian matrix explicitly, define functions of operators , and derive the rotation-gate formula from the power series.
Prerequisites: Hermitian & Unitary Operators
Objectives and key results
State and prove the spectral theorem for normal operators on and diagonalise a Hermitian matrix as .
Define and show that it agrees with the power series for polynomials and for .
Derive for any with and write explicitly.
Prove that is unitary for Hermitian , that , and that in general.
- theorem · Spectral theorem
- definition · Functional calculus
- identity · Involutory exponential
- identity · Determinant of an exponential
- formula · Time evolution is unitary
The spectral theorem#
In the previous lesson we saw that Hermitian operators have real eigenvalues and orthogonal eigenvectors for distinct eigenvalues. That alone does not guarantee that there are enough eigenvectors to form a basis — the matrix has only one eigen-direction. The spectral theorem closes this gap: for every normal operator (one that commutes with its adjoint) there is an orthonormal basis of eigenvectors. Hermitian operators () and unitaries () are normal, so the theorem covers every observable and every gate.
Definition
Normal operator
is normal if . Hermitian: . Unitary: . The lowering operator is not normal: .
Eigenvectors of a normal operator are eigenvectors of its adjoint
If is normal and , then .
Proof (4 steps)
- Step 1:Antilinearity of the dagger and .
- Step 2:Expand both products; they differ only in versus , which are equal because is normal. So is normal too.
- Step 3:Move operators across the inner product with the adjoint identity and use .
- Step 4:is the eigen-equation; a vector of norm zero is the zero vector.
∎
Spectral theorem (finite dimension)
Let be a normal operator on . Then there is an orthonormal basis of eigenvectors, , and Equivalently for the unitary whose columns are the . If is Hermitian all are real.
Proof (12 steps)
- Step 1:Base case of the induction on : every operator on a one-dimensional space is multiplication by a scalar.
- Step 2:Induction step, , assuming the theorem in dimension . is a polynomial of degree ; by the fundamental theorem of algebra it has a complex root.
- Step 3:is singular, so it has a non-zero kernel vector, which we normalise.
- Step 4:The lemma above, because is normal.
- Step 5:The orthogonal complement of a unit vector is a subspace of codimension one.
- Step 6:So maps into ( is -invariant). Antilinearity turns back into .
- Step 7:is also -invariant.
- Step 8:For , with , so the adjoint of the restriction is the restriction of the adjoint; hence is a normal operator on the -dimensional space .
- Step 9:Induction hypothesis applied to on (with any orthonormal basis of identifying it with ).
- Step 10:Each , , lies in ; orthonormal vectors in a -dimensional space form a basis; agrees with on .
- Step 11:Multiply by the completeness relation of the new basis.
- Step 12:Matrix form: column of is , so is diagonal. For Hermitian each is real by the previous lesson.
∎
The converse: unitarily diagonalisable operators are normal
If with unitary and diagonal, then . Hence "normal" is exactly the class of operators with an orthonormal eigenbasis.
Proof (3 steps)
- Step 1:Adjoint of a product reverses the order; the adjoint of a diagonal matrix conjugates its entries.
- Step 2:.
- Step 3:Diagonal matrices commute: .
∎
Worked eigendecompositions#
Pauli-X
- Step 1:Characteristic polynomial (, ).
- Step 2:Solve each kernel equation and normalise.
- Step 3:Outer products .
- Step 4:Reconstruction confirms the spectral decomposition.
Pauli-Y
- Step 1:and .
- Step 2:First row: (multiply by : ).
- Step 3:First row: .
- Step 4:The bra conjugates the second component: .
- Step 5:Reconstruction.
A Hermitian matrix with complex off-diagonal entries
- Step 1:Eigenpairs computed in the previous lesson from , .
- Step 2:Entries : e.g. and .
- Step 3:Entries , ; completeness holds.
- Step 4:Reconstruction from the spectral decomposition.
Result
Quick check
In the decomposition above, what is ?
Functions of operators#
Definition
Function of a normal operator
For a normal and any function defined on its eigenvalues, Examples: for a density matrix, in the von Neumann entropy, and the time-evolution operator .
Worked examples. For from the previous section:
- the square root is , and one checks because ;
- the inverse is , since is defined on the eigenvalues ; indeed ;
- the logarithm is exactly the kind of expression that appears in the von Neumann entropy of Module 1.4.
For the simplest Hamiltonian , the time-evolution operator is : free precession of a qubit about the -axis of the Bloch sphere at angular frequency . Functions are only defined where makes sense on the spectrum: requires no zero eigenvalue, and is the unique positive square root only when all eigenvalues are non-negative.
Consistency with powers, polynomials and the exponential series
For every , . Hence for a polynomial the definition agrees with , and equals .
Proof (6 steps)
- Step 1:Base case: completeness relation.
- Step 2:Induction step: multiply the spectral form of by the hypothesis for .
- Step 3:Expand the product; orthonormality gives .
- Step 4:Only the diagonal terms survive.
- Step 5:Linearity: swap the two finite sums.
- Step 6:Apply the polynomial case to the partial sums; each scalar series converges to , and there are finitely many , so the matrices converge entry-wise.
∎
is unitary for Hermitian
If and then is unitary, with .
Proof (3 steps)
- Step 1:Functional calculus with ; Hermitian eigenvalues are real.
- Step 2:Dagger is antilinear; projectors are Hermitian; for real .
- Step 3:Orthonormality kills and .
∎
and rotations lie in
- Step 1:Assume is diagonalisable (every normal is, with unitary).
- Step 2:Telescoping inside , then sum the power series term by term.
- Step 3:Multiplicativity of the determinant and .
- Step 4:for scalars, and the trace is the sum of the eigenvalues (basis independence of the trace).
- Step 5:Every Pauli is traceless, so the rotation gates are unitary with determinant one: .
Rotation gates as exponentials#
The platform defines the rotation gates by for (convention §1.1). Since each Pauli squares to the identity, the exponential series collapses into a cosine and a sine. We derive this twice: once from the power series and once from the spectral decomposition.
Power-series derivation of when
- Step 1:Definition of the matrix exponential; because scalars commute with .
- Step 2:Use repeatedly.
- Step 3:Split the absolutely convergent series into even and odd terms.
- Step 4:.
- Step 5:Substitute and pull out the common factor from the odd part.
- Step 6:Recognise the Taylor series of and .
Result
The same result from the spectral decomposition
- Step 1:Eigenvalues satisfy ; are the eigenprojectors: and .
- Step 2:Functional calculus with .
- Step 3:Substitute and collect the coefficients of and .
- Step 4:Euler: .
Explicit rotation matrices
- Step 1:Substitute .
- Step 2:and : is a real rotation matrix.
- Step 3:Substitute and use Euler's formula.
- Step 4:Worked value: , , .
Unitary verified: (max deviation 1.1e-16)
Unitary verified: (max deviation 2.2e-16)
for non-commuting ,
- Step 1:Involutory formula with : , .
- Step 2:from the Pauli algebra.
- Step 3:and the Hadamard is involutory.
- Step 4:Involutory formula with ; and .
- Step 5:The diagonal entries differ ( versus ).
- Step 6:The failure is caused by non-commutation; if the binomial theorem gives . Trotterisation (Stage 3) approximates by .
Unitary verified: (max deviation 0.0e+0)
Quick check
What is the real part of the top-left entry of ?
Quick check
What is ?
Check it numerically. The cell below computes through the spectral decomposition of , compares it with , prints its real and imaginary parts and checks .
import numpy as np
X = np.array([[0, 1], [1, 0]], dtype=complex)
theta = np.pi / 3
evals, V = np.linalg.eigh(X)
expX = V @ np.diag(np.exp(-1j * theta / 2 * evals)) @ V.conj().T
formula = np.cos(theta / 2) * np.eye(2) - 1j * np.sin(theta / 2) * X
print(np.allclose(expX, formula))
print(np.round(formula.real, 4))
print(np.round(formula.imag, 4))
print(np.isclose(np.linalg.det(formula), 1))Expected output
True [[0.866 0. ] [0. 0.866]] [[ 0. -0.5] [-0.5 0. ]] True
References
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), §2.1.6 (spectral decomposition, Theorem 2.1), §2.1.8 (operator functions) and §4.2 (rotation operators).
- S. Axler, Linear Algebra Done Right, 4th ed., Springer (2024), §7B (the complex spectral theorem).linear.axler.net
- R. A. Horn and C. R. Johnson, Matrix Analysis, 2nd ed., Cambridge University Press (2013), §2.5 (normal matrices and the spectral theorem); and R. A. Horn and C. R. Johnson, Topics in Matrix Analysis, Cambridge University Press (1991), Chapter 6 (matrices and functions).
Hands-on labs
Exponentiate a Pauli generator
1 step · auto-gradedOpen labUse to sum the power series of in closed form and write the matrix of .