Unitary Matrices

Spin a wheel and its spokes change direction but never change length — a rotation rearranges space without stretching or squashing it. Over the complex numbers, the transformations that behave this way are the unitary matrices, and they are the single most important family in quantum computing: every quantum gate is one. A matrix U is unitary when its inverse is its conjugate transpose U^\dagger:

U^\dagger U = U U^\dagger = I, \qquad\text{equivalently}\qquad U^{-1} = U^\dagger.

Over the real numbers this is exactly the condition Q^T Q = I for an orthogonal matrix, so "unitary" is the complex generalisation of "orthogonal": the length-preserving transformations of complex space.

Unitary means length-preserving

The defining equation has a geometric soul: a unitary matrix preserves the inner product, and hence the length, of every vector. The one-line proof is worth seeing:

\lVert U v \rVert^2 = (Uv)^\dagger (Uv) = v^\dagger U^\dagger U v = v^\dagger v = \lVert v \rVert^2.

So U sends unit vectors to unit vectors, as the picture shows. Three equivalent fingerprints follow: its columns are orthonormal (that is literally what U^\dagger U = I says), every eigenvalue lies on the unit circle (|\lambda| = 1), and |\det U| = 1.

Worked example: the Hadamard matrix is unitary

The most-used single-qubit gate is the Hadamard, H = \tfrac{1}{\sqrt2}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}. It is real and symmetric, so H^\dagger = H, and therefore

H^\dagger H = H^2 = \tfrac{1}{2}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} = \tfrac{1}{2}\begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} = I.

So H is unitary — a valid gate. The Pauli-X matrix \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} works the same way: X^\dagger X = X^2 = I. Notice both examples square to the identity, which also makes them their own inverse — a common and convenient feature of quantum gates.

Two demands force it. A closed quantum system must evolve reversibly — no information is ever destroyed — and a unitary matrix is invertible, with the undo button conveniently equal to U^\dagger. And a valid quantum state is normalised; if a gate is to turn states into states, it must preserve length, which is precisely what unitarity guarantees. Together these mean the total probability stays 1 throughout the computation. A Hermitian matrix H — an energy — even generates a unitary evolution through the matrix exponential U = e^{-iHt}, which is Schrödinger's equation in disguise.

They are different conditions: Hermitian is U^\dagger = U, unitary is U^\dagger U = I. A matrix can be one, both, or neither. The Pauli matrices happen to be both (they are Hermitian observables and valid gates), which is a special coincidence, not a rule — the Hadamard is unitary and Hermitian too, but a general phase gate \operatorname{diag}(1, e^{i\pi/4}) is unitary and not Hermitian. Never assume that being a valid gate (unitary) means it represents a measurable quantity (Hermitian).