Lesson 2 · 50 min · introductory
Complex Vector Spaces $\mathbb{C}^n$
The axioms of a complex vector space, proved component-wise for ; linear independence, span, bases and dimension; uniqueness of coordinates; change of basis; and the basis that every qubit lesson relies on.
Prerequisites: Complex Numbers & Euler's Formula
Objectives and key results
Verify the eight vector-space axioms for component by component.
Decide whether a list of vectors in is linearly independent, and explain why the answer can differ over and over .
Compute the coordinates of a vector in a given basis, using the change-of-basis matrix .
State and use the dimension of (namely , and for an -qubit register).
- definition · Linear independence
- theorem · Uniqueness of coordinates
- formula · Change of basis
- identity · The Hadamard basis
The axioms of a complex vector space#
A quantum state is a vector, and a quantum gate is a linear map on vectors. Before we can talk about either we need the precise notion of a vector space over : a set in which we can add elements and multiply them by complex scalars, subject to rules that make these operations behave like the arrows of elementary geometry. The superposition principle of quantum mechanics, which says that if and are possible states then so is (after normalisation) , is literally the statement that states live in a vector space.
The prototype, and the only example we need for finite quantum systems, is : the set of columns with complex entries, added and scaled entry by entry,
A single qubit lives in and a register of qubits in .
Definition
Vector space over the complex numbers
A complex vector space is a set with an addition and a scalar multiplication such that for all and :
- (commutativity) ;
- (associativity of addition) ;
- (zero vector) there is with ;
- (additive inverse) for each there is with ;
- (multiplicative identity) ;
- (compatibility) ;
- (distributivity over vector addition) ;
- (distributivity over scalar addition) .
is a complex vector space
With component-wise addition and scalar multiplication, satisfies all eight axioms, with zero vector and inverse .
Proof (8 steps)
- Step 1:Axiom 1: addition in is commutative; this holds in every component , and vectors with equal components are equal.
- Step 2:Axiom 2: addition in is associative.
- Step 3:Axiom 3: is the additive identity of , so the all-zeros column is the zero vector.
- Step 4:Axiom 4: every complex number has an additive inverse.
- Step 5:Axiom 5: is the multiplicative identity of .
- Step 6:Axiom 6: multiplication in is associative.
- Step 7:Axiom 7: multiplication distributes over addition in .
- Step 8:Axiom 8: the same distributive law with the roles of scalar and component exchanged.
∎
Linear independence, span and bases#
Definition
Linear combination and span
A linear combination of is a vector with complex coefficients . The span is the set of all such combinations. It is itself a vector space (a subspace of ), because sums and scalar multiples of linear combinations are again linear combinations.
Definition
Linear independence, basis, dimension
The list is linearly independent if the only combination giving the zero vector is the trivial one: forces . Otherwise it is linearly dependent, and then one of the vectors is a combination of the others. A basis of is a linearly independent list that spans . All bases of have the same length, called the dimension . The standard (computational) basis of is , so ; for qubits the standard basis vectors are written (and for two qubits).
Worked example 1 (dependent over ). Take and in . Multiply by the scalar :
Hence is a non-trivial vanishing combination (coefficients and ), and the list is dependent. Viewed as real vectors in , namely and (real and imaginary parts interleaved), the same two vectors are independent over , because no real multiple of one equals the other. Which scalars are allowed matters.
Worked example 2 (independent in ). For , , , place the vectors as columns of a matrix and compute its determinant by expansion along the first row:
A square matrix has nonzero determinant exactly when its columns are linearly independent, so is a basis of .
Coordinates in a basis are unique
If is a basis of , every can be written as for exactly one list of scalars , called the coordinates of in the basis .
Proof (5 steps)
- Step 1:Existence: a basis spans .
- Step 2:Uniqueness: suppose there are two coordinate lists and .
- Step 3:Subtract from both sides (additive inverse axiom).
- Step 4:Combine term by term with the distributive axiom 8 and commutativity/associativity of addition.
- Step 5:The are linearly independent, so every coefficient of a vanishing combination is zero.
∎
Change of basis#
A vector is a geometric object; its coordinates depend on the basis we use to describe it. Quantum computing constantly switches bases: a measurement "in the basis" is a measurement in the basis , and the Hadamard gate is precisely the matrix that converts coordinates between the computational and the basis. The next derivation gives the general recipe.
The change-of-basis matrix
- Step 1:Define as the matrix whose -th column is the new basis vector written in the standard basis .
- Step 2:Expand in the new basis (unique by the previous theorem).
- Step 3:Taking standard coordinates is linear: coordinates of a sum are sums of coordinates.
- Step 4:Entry of is ; a sum of columns weighted by is the matrix-vector product.
- Step 5:The columns of form a basis, hence are independent, so is invertible.
- Step 6:Multiply on the left by .
The $\lvert\pm\rangle$ basis of a qubit#
Define and , i.e. . Their change-of-basis matrix is the Hadamard matrix shown below.
Unitary verified: (max deviation 2.2e-16)
is a basis of and
The vectors are linearly independent, hence a basis of the -dimensional space , and the change-of-basis matrix satisfies , so .
Proof (5 steps)
- Step 1:Pull the factor out of each of the two columns; the determinant is linear in each column.
- Step 2:determinant formula .
- Step 3:Nonzero determinant means independent columns, and independent vectors in an -dimensional space form a basis.
- Step 4:Multiply the matrix by itself row by column.
- Step 5:says is its own inverse; substitute into the change-of-basis formula.
∎
Worked example: in the basis
- Step 1:with .
- Step 2:Matrix-vector product: first row adds the entries, second row subtracts them.
- Step 3:Complex addition component-wise, then and .
- Step 4:Check: rebuild from its new coordinates.
- Step 5:The factors cancel and the columns add component-wise.
A second basis that appears constantly is the circular or basis , , the eigenbasis of the Pauli operator. Its change-of-basis matrix is with , so it is a basis too. Solving gives ; for this is , and indeed . In the widget below, edit a vector and watch its coordinates in all three bases update simultaneously.
Check your understanding#
Quick check
Are and linearly independent in ?
Quick check
What is the -coordinate of ? (decimal)
Quick check
What is the complex dimension of the state space of a register of qubits?
Quick check
has the new basis vectors as its columns. Which formula gives the new coordinates of ?
References
- S. Axler, Linear Algebra Done Right, 4th ed., Springer (2024), Ch. 1 (vector spaces) and Ch. 2 (span, independence, bases, dimension).linear.axler.net
- M. A. Nielsen, I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), §2.1.1 (bases and linear independence).
- G. Strang, Introduction to Linear Algebra, 6th ed., Wellesley-Cambridge Press (2023), Ch. 3 (independence, basis and dimension) and §8.3 (change of basis).
Hands-on labs
Coordinates in the ± basis
1 step · auto-gradedOpen labExpress in the basis of .