Linear Algebra
Hermitian Matrix
A = A* — self-adjoint, real-eigenvalued, the algebra of measurement
A Hermitian matrix is a complex square matrix equal to its own conjugate transpose: A = A*. Diagonal entries must be real, and off-diagonal pairs are complex conjugates. The spectral theorem guarantees real eigenvalues and an orthonormal eigenbasis. Real symmetric matrices are the real-valued case. Every quantum observable is Hermitian — which is why every measured eigenvalue, every detector click, is a real number.
- Defining propertyA = A* (conjugate transpose equals A)
- Diagonal entriesReal (aii = āii)
- Off-diagonal pairsaij = āji (complex conjugates)
- EigenvaluesAll real, no exceptions
- EigenvectorsOrthogonal for distinct eigenvalues; full orthonormal basis
- Used inQuantum observables, covariance matrices, PCA, MIMO communication
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
What "self-adjoint" means
The conjugate transpose A* (also written AH or A†) of a complex matrix A is built in two strokes: transpose A, then complex-conjugate every entry. So if A has entry aij = p + qi at row i, column j, then A* has entry p − qi at row j, column i. The Hermitian condition is the single equation
A = A*
Spelled out entry by entry, that requires aij = āji for every i, j. Two consequences fall out immediately:
- Diagonal entries are real. The condition aii = āii says each diagonal entry equals its own complex conjugate — so its imaginary part is zero.
- The upper triangle determines the lower triangle. Off-diagonal pairs are locked together by conjugation. Pick any (i, j) with i < j; the partner (j, i) is forced.
A Hermitian matrix is therefore parametrised by n real numbers on the diagonal plus n(n−1)/2 complex numbers above the diagonal — n² real degrees of freedom total. Real symmetric matrices fit the same bookkeeping: n diagonal entries plus n(n−1)/2 off-diagonal entries, but each off-diagonal is a single real number.
Worked example — a 3×3 Hermitian matrix
Take
A = [[ 2, 1 − i, 3i ],
[ 1 + i, 4, −2 + i ],
[−3i, −2 − i, 1 ]]
Check. Diagonal entries 2, 4, 1 — all real. Off-diagonal pairs:
- a12 = 1 − i, a21 = 1 + i = conj(1 − i) ✓
- a13 = 3i, a31 = −3i = conj(3i) ✓
- a23 = −2 + i, a32 = −2 − i = conj(−2 + i) ✓
So A = A*. Now an eigenvalue test: the characteristic polynomial det(A − λI) = 0 will have only real roots, guaranteed by the theorem we prove below. Numerically those eigenvalues are roughly λ ≈ {−0.85, 2.62, 5.23}. Pick any two; their corresponding eigenvectors will be orthogonal in the complex inner product ⟨u, v⟩ = u*v.
Proof — Hermitian eigenvalues are real
Let A be Hermitian and let v ≠ 0 satisfy Av = λv. Compute the scalar v*Av in two ways.
Way 1. v*Av = v*(λv) = λ (v*v). The number v*v is the squared norm ‖v‖² — a positive real number.
Way 2. v*Av is a 1×1 matrix, so it equals its own conjugate transpose: (v*Av)* = v*A*v = v*Av because A* = A. A complex number equal to its own conjugate is real. So v*Av is real.
Combining: λ ‖v‖² is real and ‖v‖² is positive real. Therefore λ is real. QED.
Proof — eigenvectors of distinct eigenvalues are orthogonal
Let Av = λv and Aw = μw with λ ≠ μ. From the previous result λ and μ are real. Compute w*Av:
w*Av = w*(λv) = λ (w*v)
But also
w*Av = (A*w)*v = (Aw)*v = (μw)*v = μ̄ (w*v) = μ (w*v)
(using μ real). So (λ − μ)(w*v) = 0, and since λ ≠ μ we get w*v = 0. The two eigenvectors are orthogonal in the standard complex inner product. QED.
For repeated eigenvalues, the eigenspace is multidimensional but still has an orthonormal basis (the Gram–Schmidt process produces one). Stringing the basis vectors of every eigenspace together yields the full orthonormal eigenbasis — the spectral theorem for Hermitian matrices: A = UDU* where U is unitary (columns are orthonormal eigenvectors) and D is diagonal with the real eigenvalues.
Variants and adjacent notions
- Real symmetric matrix. The real-valued special case — A = AT. Inherits all spectral properties; orthonormal eigenbasis lives in ℝn.
- Skew-Hermitian. A* = −A. Eigenvalues are purely imaginary. Hermitian iA from a skew-Hermitian A and vice versa.
- Positive-definite Hermitian. Hermitian with all eigenvalues > 0. Equivalently, v*Av > 0 for every non-zero v. Covariance matrices and Gram matrices land here.
- Normal matrix. AA* = A*A. Strictly weaker than Hermitian; includes Hermitian, skew-Hermitian, and unitary. Normal is the exact condition for unitary diagonalisability.
- Self-adjoint operator. The infinite-dimensional generalisation. In quantum mechanics, observable operators on a Hilbert space must be self-adjoint, not merely symmetric — there are technical domain issues that distinguish the two.
Hermitian vs related matrix classes
| Class | Defining property | Eigenvalues | Diagonalisable by | Real special case |
|---|---|---|---|---|
| Hermitian | A = A* | All real | Unitary U: A = UDU* | Real symmetric |
| Skew-Hermitian | A* = −A | Pure imaginary | Unitary | Skew-symmetric |
| Unitary | U*U = I | |λ| = 1 (unit circle) | Unitary | Orthogonal |
| Normal | AA* = A*A | Complex (anywhere) | Unitary | Real normal |
| Positive-definite Hermitian | A = A*, v*Av > 0 | All real > 0 | Unitary | SPD |
| General matrix | none | Anywhere in ℂ | Invertible P (if diagonalisable at all) | Real matrix |
Application — quantum observables
In quantum mechanics, the state of a system is a unit vector ψ in a complex Hilbert space, and every measurable quantity (energy, position, momentum, spin component, …) is represented by a Hermitian operator  on that space. The Born rule says: a measurement of  on state ψ yields one of the eigenvalues λk of Â, with probability |⟨φk, ψ⟩|² where φk is the corresponding eigenvector.
Two pillars of physical reasonableness rest on Hermiticity:
- Measurement outcomes are real numbers. Eigenvalues real, so the meter reads a real number — never a complex impossibility.
- Probabilities sum to one and basis decompositions exist. The orthonormal eigenbasis lets you decompose ψ as Σ ck φk with Σ |ck|² = 1.
The Pauli matrices σx, σy, σz for spin-1/2 are all 2×2 Hermitian. The Hamiltonian H of any system is Hermitian; its eigenvalues are the allowed energy levels.
Application — covariance matrices and PCA
For a real-valued data matrix X (rows = samples, columns = features), the covariance matrix Σ = (1/n) XTX (after centering) is real symmetric — the real Hermitian case. Its eigenvalues are non-negative variances along the principal axes (eigenvectors). PCA is literally the diagonalisation Σ = UDUT, and the orthogonality of principal components is the Hermitian-eigenvector orthogonality theorem applied to real data.
For complex-valued data (radar, MIMO communications, EEG with Hilbert-transform features), the covariance is genuinely Hermitian: Σ = E[(x − μ)(x − μ)*]. Same theorem, same algorithm, complex eigenvectors.
NumPy — checking Hermiticity
import numpy as np
A = np.array([
[ 2, 1 - 1j, 3j ],
[ 1 + 1j, 4, -2 + 1j ],
[-3j, -2 - 1j, 1 ]
])
# Hermitian check
is_hermitian = np.allclose(A, A.conj().T)
print(is_hermitian) # True
# Eigenvalues are real
eigvals = np.linalg.eigvalsh(A) # eigvalsh assumes Hermitian, returns sorted real
print(eigvals) # e.g. [-0.85, 2.62, 5.23]
# Spectral decomposition: A = U D U*
D, U = np.linalg.eigh(A)
recon = U @ np.diag(D) @ U.conj().T
print(np.allclose(recon, A)) # True
Use eigh / eigvalsh for Hermitian matrices — they are faster and more accurate than the general eig because the algorithm exploits the structure.
Common pitfalls
- Confusing transpose with conjugate transpose. Over the complex numbers, A = AT is not the Hermitian condition — the conjugation matters. A complex symmetric matrix A = AT can have complex eigenvalues; only A = A* forces them real.
- Forgetting diagonal entries must be real. A matrix with i on the diagonal but otherwise conjugate-symmetric off-diagonals is not Hermitian. Check the diagonal first.
- Assuming Hermitian implies positive-definite. Hermitian eigenvalues are real but may be negative. Positive-definite is the stricter condition v*Av > 0.
- Using
eiginstead ofeigh. The general routine works but returns eigenvalues as complex numbers (with tiny imaginary garbage from round-off) and runs slower.eighassumes Hermitian and returns sorted reals. - Mistaking "symmetric in NumPy" for Hermitian. Real symmetric is the real special case. For complex arrays, you must check
A == A.conj().T, notA == A.T. - Forgetting non-distinct eigenvalues still yield an orthonormal basis. The orthogonality proof above assumed λ ≠ μ. For a repeated eigenvalue you must Gram–Schmidt within the eigenspace — but the orthonormal basis still exists.
Frequently asked questions
What does A = A* actually mean?
A* (the conjugate transpose, also written AH or A†) is built by transposing A and then complex-conjugating every entry. Equating A = A* forces two things: diagonal entries must equal their own complex conjugates, so they are real; and off-diagonal pair (i, j) and (j, i) must be complex conjugates of each other. The whole matrix is determined by its real diagonal and one off-diagonal triangle.
Why are the eigenvalues of a Hermitian matrix real?
Suppose Av = λv with v non-zero. Take the inner product with v: v*Av = λ v*v. The left side equals its own conjugate (because A = A*), so it is real. Therefore λ v*v is real, and since v*v > 0, λ itself is real. Two lines.
Why are eigenvectors of distinct eigenvalues orthogonal?
Let Av = λv and Aw = μw with λ ≠ μ. Then w*Av = λ w*v on one side and (Aw)*v = μ w*v on the other. So (λ − μ) w*v = 0. Since λ ≠ μ, w*v = 0 — v and w are orthogonal in the complex inner product.
How is a Hermitian matrix related to a real symmetric matrix?
If all entries of A are real, then A* = AT. The Hermitian condition A = A* collapses to A = AT. Real symmetric matrices are exactly the real Hermitian matrices and inherit every property: real eigenvalues, orthogonal eigenvectors, orthogonal diagonalisation.
Why does quantum mechanics use Hermitian operators for observables?
Measurement outcomes are real numbers. Quantum mechanics predicts measured values as eigenvalues of the observable operator. Hermitian guarantees real eigenvalues; the orthonormal eigenbasis supplies the probability amplitudes via the Born rule. Hermitian is the minimal axiom that keeps the theory self-consistent.
Is a covariance matrix Hermitian?
Yes. For real data, the covariance is real symmetric (the real Hermitian case). For complex data it is genuinely Hermitian: Σ = E[(x − μ)(x − μ)*]. Eigenvalues are non-negative variances along the principal axes — exactly the structure PCA exploits.
How do I check Hermiticity quickly?
Two steps. (1) Every diagonal entry must be real. (2) Off-diagonal pairs (i, j) and (j, i) must be complex conjugates. In NumPy that is np.allclose(A, A.conj().T).