The Language: Linear Algebra
Complex vectors, inner products and bases: the grammar of quantum mechanics.
Every statement in quantum computing is, underneath, a statement about complex vectors and matrices. Master five ideas (vectors, inner products, bases, operators, eigenvalues) and the rest of the subject becomes readable.
What you’ll learn
- Represent qubit states as complex unit vectors and translate between column vectors and Bloch angles.
- Compute inner products and overlaps, and explain why the inner product conjugates its first argument.
- Expand a state in different orthonormal bases and predict measurement probabilities in each.
- Write operators as matrices, form adjoints, and recognize Hermitian and unitary matrices.
- Derive that Hermitian matrices have real eigenvalues and orthogonal eigenvectors.
States are complex unit vectors
In the Ground State lessons a qubit was . Strip away the notation and that is a column vector in the complex vector space :
A system with perfectly distinguishable outcomes lives in , and qubits live in , a Hilbert space of dimension . Physical states are the unit vectors.
Complex numbers are essential, not decoration. Write each amplitude in polar form with modulus . The moduli fix the probabilities; the phases fix how amplitudes interfere. Up to an unobservable global phase, every qubit vector is .
Inner products: lengths, angles, overlaps
The inner product of is
where is the conjugate transpose, a row vector. (Dirac notation, next lesson, writes it .) It is linear in , conjugate-linear in , satisfies , and for . The norm is .
Think first Why the complex conjugate? Compute (no conjugate) for .
: a non-zero vector would have "length" zero. With the conjugate, . Conjugation makes real and positive.
Physically, is the amplitude for a system prepared in to be found in , and is a probability. That only makes sense if it never exceeds for unit vectors, which is the Cauchy–Schwarz inequality.
Claim. Assume (otherwise both sides vanish).
Remove from its component along .
Expand, using . Conjugate-linearity in the first slot produces .
Rearrange. Equality holds iff , i.e. . For unit vectors , with exactly when the states agree up to a phase.
With and , what is ?
Show the answer
B.
, with squared modulus . The states are apart on the Bloch sphere: neither equal nor orthogonal.
Bases: one state, many coordinate systems
An orthonormal basis of is a set with . Every vector expands uniquely, and the coefficients are inner products:
The last identity (Parseval) is why the probabilities of a measurement in that basis add up to one.
| Basis | Vectors | Eigenbasis of |
|---|---|---|
| (computational) | , | |
| (Hadamard) | ||
| (circular) |
Changing basis changes the coordinates, not the state. has coordinates in the basis, in the basis and in the basis. A measurement in a basis samples from the squared moduli of those coordinates.
The state is measured in the basis. What is , in percent?
Show the answer
85 %
, so . This number, , reappears in the CHSH game and in optimal state discrimination.
Operators are matrices
A linear operator on is fixed by what it does to a basis. Its matrix elements are , so column holds the coordinates of . The adjoint (conjugate transpose, ) is the unique operator with for all . Two classes matter most:
- Hermitian: . These are the observables: energy, spin components, the Pauli matrices.
- Unitary: , equivalently for all . Unitaries preserve every overlap and map orthonormal bases to orthonormal bases. Every gate and every closed-system evolution is unitary.
| Matrix | Hermitian? | Unitary? | Eigenvalues |
|---|---|---|---|
| yes | yes | , eigenvectors | |
| yes | yes | , eigenvectors | |
| yes | yes | ||
| no | yes | ||
| yes | no |
Which matrix is unitary but not Hermitian?
Show the answer
C.
, yet . Its eigenvalues and lie on the unit circle, as a unitary's must, but is not real, so cannot be Hermitian.
Eigenvalues and expectation values
An eigenvector of satisfies . For an observable, the eigenvalues are the possible outcomes and the eigenvectors the states that give them with certainty. Two facts make this consistent, each a three-line proof:
Setup.
Move across using ; the first slot is conjugate-linear. Since , .
Same trick with two eigenvectors ( is real).
Distinct outcomes correspond to orthogonal, hence perfectly distinguishable, states.
In fact every Hermitian matrix has an orthonormal eigenbasis, so (the spectral theorem). The average outcome in state is the expectation value
For this gives and : the Bloch vector's coordinates are expectation values.
Key takeaways
- Pure states of a -level system are unit vectors in ; complex phases are what make interference possible.
- The inner product gives lengths and overlaps; Cauchy–Schwarz makes a valid probability.
- In an orthonormal basis the coefficients are inner products, and their squared moduli are the measurement probabilities in that basis.
- Hermitian matrices (observables) have real eigenvalues and orthonormal eigenbases; unitaries (gates) preserve every inner product.
- Expectation values connect matrices to experiments.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Why does the inner product conjugate its first argument, ?
- So that it is linear in both arguments
- It is a pure convention with no consequences
- So that is real, non-negative, and zero only for
- So that unitary matrices have real eigenvalues
Show the answer
C. So that is real, non-negative, and zero only for
Without the conjugate, would have "squared length" . Conjugation turns into a sum of squared moduli, so it defines a genuine length and overlaps behave like probabilities.
What are the coordinates of in the orthonormal basis ?
Show the answer
B.
and . In its own basis a state is a basis vector; are its coordinates in the basis.
For a unitary and any vectors , which quantity is guaranteed unchanged when are replaced by ?
- The overlap
- The coordinates of in the computational basis
- The probability of outcome in a measurement of
- The expectation value
Show the answer
A. The overlap
. Unitaries preserve overlaps (hence normalization and orthogonality) but change coordinates and statistics in a fixed basis; that is how gates do anything at all.
A Hermitian matrix has three distinct eigenvalues. Which statement is guaranteed?
- Its eigenvalues are , and
- Its eigenvalues are real and its eigenvectors mutually orthogonal
- It is unitary
- Its eigenvectors are the computational basis vectors
Show the answer
B. Its eigenvalues are real and its eigenvectors mutually orthogonal
Real eigenvalues and orthogonal eigenvectors for distinct eigenvalues are exactly the two facts derived in this lesson.
For , what is ?
Show the answer
D.
, matching with .
Go deeper
- The Spectral Theorem & Operator Functions · Why observables have real eigenvalues, and what e^{-iHt} really means.
- Trace, Norms & Operator Distances · Hilbert–Schmidt, trace norm and operator norm: how we measure errors.
- Beyond Finite Dimensions · Continuous variables, unbounded operators, and why qubits keep things finite.
Further reading
- M. A. Nielsen & I. L. Chuang, Quantum Computation and Quantum Information, §2.1 (Cambridge, 10th anniv. ed., 2010).
- S. Axler, Linear Algebra Done Right, chs. 6–7 (Springer, 3rd ed., 2015).
- R. de Wolf, Quantum Computing: Lecture Notes (arXiv:1907.09415).
- M.-O. Renou et al., "Quantum theory based on real numbers can be experimentally falsified," Nature (2021).