TL;DR
A unitary operator is a linear transformation that preserves inner products. Because lengths and angles come from inner products, it keeps every length and every angle the same. Its matrix satisfies , so its inverse is simply its conjugate transpose. Real examples are rotations and reflections; the complex examples are the ones quantum mechanics uses.
Where you'll see it: in quantum computing, where every gate except a measurement is a unitary matrix, and in the orthogonal matrices behind numerically stable least-squares solvers.
Intuition
Rigid motions
Draw a square grid on a sheet of paper and then pick the sheet up. You can turn it, or flip it over, and the grid squares keep their size and shape. Now stretch the sheet or shear it, and the squares turn into parallelograms and change size. A unitary operator is the first kind of move: a rigid motion of the space, allowed to rotate the axes and flip them, but never to distort them.
Why the idea exists
Quantum mechanics needs this property. A quantum state is a vector of complex numbers, and the probabilities of measurement outcomes are the squared lengths of its components. Those probabilities must always add up to 1. A transformation that changes lengths would change the total probability, which is impossible for a closed system. So time evolution in quantum mechanics has to be unitary. The same idea gives a bonus: a unitary map never squashes two different inputs onto one output, so nothing is lost, and every unitary map can be undone.
The math
Definition
A linear map on a complex vector space with inner product is unitary if
For a square matrix , this is equivalent to
where is the conjugate transpose (flip rows and columns, then take the complex conjugate of each entry) and is the identity matrix.
Here is the inner product, which for real vectors is the ordinary dot product. The definition says leaves all inner products alone.
To see the equivalence, write . This equals for every and exactly when . Taking and to be standard basis vectors picks out each entry of , so the matrix identity is forced.
Consequences
Several useful facts follow directly from .
Lengths are preserved. Setting gives . Angles are preserved too, because the angle between and is defined from their inner product.
The inverse is the conjugate transpose. From we get , and then as well. Inverting a unitary matrix costs nothing beyond flipping and conjugating.
The columns form an orthonormal basis. Let be column of . Then , which says each column has length 1 and different columns are perpendicular.
Eigenvalues lie on the unit circle. Suppose with . Then , so . Every eigenvalue has the form for some angle . In particular, .
Real case. When has only real entries, the conjugate transpose is the ordinary transpose, and the condition becomes . Such a matrix is called orthogonal.
Rotations
The 2D rotation by angle is
Its columns are and . Each has length , and their dot product is . So for every angle, and rotations are orthogonal.
- cos θ (top-left entry)
- sin θ (bottom-left entry)
Worked examples
Rotate the vector by using .
- Length before: .
- Apply the matrix: first entry , second entry . The result is .
- Length after: .
- Check the matrix: .
Interpretation: the vector turned a quarter circle around the origin and kept its length. The check in step 4 confirms this is no accident.
Take . Its conjugate transpose flips the sign of each : .
- Multiply: .
- Use . The off-diagonal terms are , and the diagonal terms are .
- So . The matrix is unitary.
- Test on the unit vector : . Its squared length is , as it should be.
Now the shear . It sends the unit vector to , which has length . Also . Lengths grow, so is not unitary.
The Hadamard gate is . A qubit in state is a vector whose squared entries give measurement probabilities.
- Check that is unitary. is real and symmetric, so , and .
- Apply it: .
- Probability of outcome 0 is . Probability of outcome 1 is also .
- The probabilities sum to 1. This is guaranteed because preserves length.
Interpretation: the gate created an equal superposition. Because is unitary, applying again returns the qubit to exactly, with no information lost.
Tradeoffs and failure modes
Unitary matrices are the right tool when a transformation must be reversible and must keep total norm fixed. They are the wrong tool when information is supposed to leak away.
| Situation | What goes wrong | Better choice |
|---|---|---|
| Open quantum system that interacts with its environment | A unitary cannot model decoherence or loss; purity drops | Density matrices and quantum channels (trace-preserving, not unitary) |
| Numerical simulation of a closed system over many steps | Rounding errors slowly push away from | Unitary integrators, or periodic re-orthogonalisation |
| Data reduction with a non-square matrix whose columns are orthonormal | It is an isometry, not unitary, and cannot be inverted on the full space | Speak of isometries, or use a projection |
| Least squares or eigenvalue computations in floating point | Gaussian elimination can amplify errors | Orthogonal transformations (QR decomposition, Householder reflections), whose condition number is 1 |
| Assuming "normalised" means "unitary" | A matrix can keep every vector length fixed only if it is unitary; a scaled rotation does not qualify | Check directly |
A common mistake is to think unitarity only means "preserves length." In complex spaces it also preserves phases in the right sense: multiplying every entry of the state by a common phase is a unitary operation that changes no measurement probability. Two states that differ only by such a phase are physically the same.
History
The real case is old. Rotations and reflections of the plane and space were studied as geometric motions long before matrices were formalised in the 19th century, and their matrices were later called orthogonal.
The complex case grew out of algebra over complex numbers in the 19th century. Charles Hermite studied the complex analogue of symmetric forms in the 1850s, the same family of ideas that produced Hermitian matrices. Unitary matrices became a standard object in the 20th century through the study of group representations and, above all, quantum mechanics.
The idea became central to physics in 1932, when John von Neumann's book on the mathematical foundations of quantum mechanics made unitary time evolution a basic principle. Since then the same property, keeping total probability at 1, has been a guiding requirement for quantum algorithms.
Check yourself
QuestionName the two things a unitary operator preserves, and say how the matrix condition captures them.Show answer
It preserves inner products. Since lengths and angles are defined from inner products, it preserves both lengths and angles. The matrix condition is : for every , , and the identity matrix makes the equality hold for all pairs of vectors, not only for a single length.
QuestionIs unitary? Show your computation.Show answer
Yes. is real, so . Then . It is in fact the rotation by .
QuestionWhy must every eigenvalue of a unitary matrix have absolute value 1?Show answer
Let with . Unitary maps preserve length, so . Dividing by gives . So each eigenvalue is a point on the unit circle in the complex plane, of the form .
QuestionA simulation applies a numerical time-step matrix to a closed quantum system. After many steps the total probability has drifted from 1 to 0.97. What is the likely cause, and what would you do about it?Show answer
The matrix is no longer unitary to working precision, so it no longer preserves lengths. Rounding errors have accumulated over many steps and shrunk the state. The fix is to use a unitary integrator, which is built to preserve the norm exactly in the scheme, or to re-orthogonalise or renormalise the state periodically. Checking during the run shows how far the matrix has drifted.