Back to Curriculum
Foundations Recommended

Linear Algebra Essentials

Vectors, matrices, and eigenvectors — the language quantum states are written in

By the end of this topic you'll be able to

Represent a state as a vector and a transformation as a matrix
Multiply matrices and vectors, and explain what the result means geometrically
Find eigenvectors and eigenvalues, and explain why they matter for quantum states

For a mathematician, objects that can be added together and multiplied by arbitrary numbers inhabit a vector space. Every quantum state you will write down in this curriculum — a qubit, a register of qubits, a photon's polarization — is a vector in exactly this sense: a member of a vector space, not necessarily an arrow drawn on paper.

For any vector space it is natural to choose a set of basis vectors — vectors sufficient in number that any vector in the space can be written as a linear combination of them, and minimal in the sense that none of them is itself expressible in terms of the others. |0⟩ and |1⟩ play this role for a single qubit; any qubit state is some combination α|0⟩ + β|1⟩.

Quantum mechanics needs something a three-dimensional physical vector space never forces on your attention: every vector space V comes paired with an adjoint space V′, whose members are the complex-valued linear functions on V. In Dirac's notation the members of V are kets, |ψ⟩, and the members of V′ are bras, ⟨f|; the adjoint space is why quantum mechanics has both kets and bras where ordinary vector geometry only seems to need one.

Once a basis is fixed, each basis ket |i⟩ has an associated basis bra ⟨i|, related by ⟨j|i⟩ = δᵢⱼ — one exactly when the indices match, zero otherwise. A matrix is then nothing more than a linear machine that turns one vector into another, and it does so linearly: scale the input and the output scales by the same factor; add two inputs and the outputs add.

In quantum computing every gate — X, H, CNOT, all of them — is literally such a matrix, and running a circuit is nothing more than multiplying a state vector by one gate-matrix after another, in sequence.

Extracting a number from a bra and a ket together, ⟨φ|ψ⟩, is the inner product, and it is closely related to the ordinary dot product between vectors. Applied to a state with itself, ⟨ψ|ψ⟩ is real and non-negative, and quantum states are required to have ⟨ψ|ψ⟩ = 1 — properly normalized, in Binney and Skinner's phrase, so that the probabilities extracted from the state sum to one.

An eigenvector of a matrix M is a direction M does not rotate, only stretches: Mv = λv, where the number λ is the eigenvalue, the factor by which that direction is stretched.

Input vector v — x1.0
Input vector v — y0.6

Dashed gray = input vector v. Solid = Mv, the output after the transformation. Try “Stretch x2” with v along the x-axis: it only scales, it doesn't rotate — that's an eigenvector.

Eigenvectors and eigenvalues are not a mathematical side quest — they are the possible outcomes of a quantum measurement, as the next several topics will make precise. Fluency with vectors, matrix multiplication, inverses, and eigenvectors is the entire toolkit this curriculum draws on for everything that follows.

Try It Yourself

Worked Example

A qubit gate candidate is the matrix M = [[2, 0], [0, 3]] acting on basis vectors |0⟩ = (1,0) and |1⟩ = (0,1). Is |0⟩ an eigenvector of M? If so, find its eigenvalue.

  1. 1Apply M to |0⟩ = (1,0): the top row gives 2·1 + 0·0 = 2, the bottom row gives 0·1 + 3·0 = 0. So M|0⟩ = (2, 0).
  2. 2Compare this to |0⟩ itself: (2, 0) = 2·(1, 0) = 2|0⟩ — the output is the input scaled by a single number, not rotated into some new direction.
  3. 3That's exactly the eigenvector condition Mv = λv, so |0⟩ is an eigenvector of M, with eigenvalue λ = 2.
  4. 4The same check on |1⟩ = (0,1) gives M|1⟩ = (0, 3) = 3|1⟩, so |1⟩ is also an eigenvector, with eigenvalue 3 — this M happens to be diagonal, which is precisely why its own basis vectors are its eigenvectors.
Answer

Yes — |0⟩ is an eigenvector of M with eigenvalue 2 (and |1⟩ is an eigenvector with eigenvalue 3).

Reference

VectorAn ordered list of numbers; a point/arrow in a vector space
MatrixA linear transformation acting on vectors: Mv
Inner productA number measuring overlap/similarity between v and w
Eigenvector / eigenvalueA direction M only stretches (by factor λ), never rotates
Identity matrixLeaves every vector unchanged: Iv = v

Quick Check

If Mv = λv, what does that tell you about the vector v?

In quantum computing, what does a gate correspond to mathematically?