Linear Algebra / Unit 8, Complex Vector Spaces / Topic 8.2
Unit 8. Complex Vector Spaces
This topic allows the components of a vector to be complex numbers. Addition and multiplication by a number work as before. The dot product must change, because the old formula no longer gives a length. The new product is called the inner product, and it uses complex conjugates. The topic also defines the conjugate transpose of a matrix, which takes over the role of the transpose.
You need Topics 1.2, 1.4, 3.3, 6.2, and 8.1 for this topic.
A complex vector with n components is a list of n complex numbers. The set of all such vectors is written Cⁿ, in the same way that Rⁿ stands for the real vectors of Topic 1.4. Vectors are added component by component. A vector can be multiplied by any complex number, and such a number is called a scalar.
u = 1 + i2 iu = −1 + i2i u + 3i = 4 + i2 + iAll of the ideas of Unit 4 carry over without change: linear combinations, span, independence, basis, and dimension. The coefficients of a combination are now complex numbers. The space Cⁿ has the dimension n, and the standard basis vectors are a basis of it.
For a real vector, the squared length is the sum of the squares of the components. For a complex vector, that formula fails. Take the vector (1, i).
1² + i² = 1 − 1because i² = −11² + i² = 0A vector that is not the zero vector must not have the length 0. The repair is to use the squared absolute value of each component in place of its square.
|v|² = |v₁|² + |v₂|² + … + |vₙ|²From Topic 8.1, |z|² = z* z. For the vector (1, i), the squared length is 1 + 1 = 2, and the length is √2. A length is always a real number that is not negative, and only the zero vector has the length 0.
The product that matches this length takes the conjugate of each component of the first vector.
⟨u, v⟩ = u₁* v₁ + u₂* v₂ + … + uₙ* vₙThis number is called the inner product of u and v. With this definition, ⟨v, v⟩ = |v|², as required. For real vectors the conjugates change nothing, and the inner product is the dot product.
Books do not agree on which vector receives the conjugates. Physics books conjugate the first vector, and many mathematics books conjugate the second. This course conjugates the first vector, because Unit 9 uses the notation of quantum mechanics. When you read another book, check its convention first.
Let u = (1 + i, 2) and v = (3, i).
⟨u, v⟩ = (1 − i)(3) + (2)(i)the conjugates of the components of u times the components of v⟨u, v⟩ = 3 − 3i + 2i = 3 − i⟨v, u⟩ = (3)(1 + i) + (−i)(2)the conjugates of the components of v times the components of u⟨v, u⟩ = 3 + 3i − 2i = 3 + iThe order matters. Exchanging the two vectors gives the complex conjugate.
The conjugate transpose of a matrix A is found in two steps: take the transpose, and replace each entry with its complex conjugate. It is written A†, which is read as A dagger. It is also called the Hermitian conjugate or the adjoint of A. Many mathematics books write Aᴴ or A*.
A = 1i23 − i A† = 12−i3 + iFor a column vector u, the conjugate transpose u† is a row that holds the conjugates of the components. The inner product is then a row times a column.
⟨u, v⟩ = u†vThe last rule is the complex version of the rule of Topic 3.3, which moved a real matrix across the dot product as its transpose. For a matrix with real entries, the conjugate transpose is the transpose.
Two complex vectors are called orthogonal when their inner product is zero. A set of vectors is orthonormal when the vectors are orthogonal to each other and each has the length 1.
q₁ = 1/√2 1i q₂ = 1/√2 1−i ⟨q₁, q₂⟩ = (1/2)((1)(1) + (−i)(−i))the conjugates of the components of q₁ times the components of q₂⟨q₁, q₂⟩ = (1/2)(1 + i²)multiply⟨q₁, q₂⟩ = 0because i² = −1Each of the two vectors has the squared length (1/2)(1 + 1) = 1. They are an orthonormal basis of C².
As in Topic 6.2, the components of a vector in an orthonormal basis are inner products. The basis vector goes in the first place.
v = c₁q₁ + c₂q₂ + … with ci = ⟨qi, v⟩For v = (0, 1) and the basis above:
c₁ = ⟨q₁, v⟩ = (−i)(1)/√2 = −i/√2the first coordinatec₂ = ⟨q₂, v⟩ = (i)(1)/√2 = i/√2the second coordinate(−i)(i)/2 + (i)(−i)/2 = 1/2 + 1/2 = 1the check: the second component of c₁q₁ + c₂q₂The squared length of a vector is the sum of the squared absolute values of its components in any orthonormal basis.
|v|² = |c₁|² + |c₂|² + …In the example, 1/2 + 1/2 = 1.
In quantum mechanics, a state is a complex vector of length 1. The numbers ci are the amplitudes of the possible results of a measurement, and |ci|² is the probability of result i. The equation above says that the probabilities add up to 1. Topic 9.3 develops this.
The Gram-Schmidt process of Topic 6.2 works in Cⁿ with one change: each dot product is replaced by the inner product, with the vector that is already in the orthonormal set in the first place.
Multiply a vector v by a number eiθ of absolute value 1. Each component turns by the angle θ in the complex plane, and no absolute value changes. The length of the vector stays the same.
For the inner product, the rules of Part 3 give ⟨u, eiθv⟩ = eiθ⟨u, v⟩. The inner product is multiplied by the phase factor, so its absolute value stays the same. Two vectors that are orthogonal stay orthogonal.
Try it: the length of a complex vector
The vector v has two complex components. Drag v₁ and v₂ in the complex plane. The readout compares the sum of the squares, which is not a length, with the sum of the squared absolute values. The slider multiplies both components by eiθ. The dashed arrows show the result.
| Fact | Statement |
|---|---|
| Squared length | |v|² = |v₁|² + … + |vₙ|² |
| Inner product | ⟨u, v⟩ = u₁* v₁ + … + uₙ* vₙ = u†v |
| Exchange of the vectors | ⟨v, u⟩ = ⟨u, v⟩* |
| Scalars | ⟨u, cv⟩ = c⟨u, v⟩ and ⟨cu, v⟩ = c*⟨u, v⟩ |
| Conjugate transpose | A†: transpose, and conjugate each entry. (AB)† = B†A† |
| Moving a matrix | ⟨Au, v⟩ = ⟨u, A†v⟩ |
| Components | ci = ⟨qi, v⟩ in an orthonormal basis |
Work each problem on paper first. Then open the answer to check your work.
|(3, 4i)|² = 9 + 16 = 25add the squared absolute values of the components|(3, 4i)| = 5|(1 + i, 1 − i)|² = 2 + 2 = 4each component has the squared absolute value 2|(1 + i, 1 − i)| = 2
⟨u, v⟩ = (−i)(2) + (1)(1 + i)the conjugates of the components of u times the components of v⟨u, v⟩ = −2i + 1 + i = 1 − i⟨v, u⟩ = 1 + ithe conjugate
⟨(1, i), (1, −i)⟩ = (1)(1) + (−i)(−i) = 1 − 1 = 0the first pair is orthogonal⟨(1, i), (i, −1)⟩ = (1)(i) + (−i)(−1) = 2ithe second pair is not orthogonal
In fact (i, −1) is i times (1, i).
squared length = 1 + 2 = 3length = √3unit vector = (1/√3)(1, 1 + i)
Exchange rows and columns, and conjugate each entry: 2−3i1 − i4.
c₁ = ⟨q₁, v⟩ = (1)(2)/√2 = √2c₂ = ⟨q₂, v⟩ = √2|c₁|² + |c₂|² = 2 + 2 = 4the check: this is |v|²
A complex vector is typed with np.array, as before, with the components written with j. The code below shows the mistake of Part 2 first. The expression v @ v adds the squares of the components, with no conjugates. The instruction np.linalg.norm calculates the correct length.
Python
The first result is 0, which is not a length. The second result is 1.414, which is √2.
Now find the length of the vector (3, 4i) of Practice Problem 1.
Python
The instruction np.vdot(u, v) calculates the inner product. It takes the conjugates of the first vector, which is the convention of this course.
Python
The result is 3 − i, as in Part 3. Now calculate the inner product with the two vectors in the other order, and store it under the name p.
Python
For a matrix A, the expression A.conj() takes the conjugate of each entry, and .T takes the transpose. Together, A.conj().T is the conjugate transpose.
Python
The result is the matrix of Part 4. The next box checks the rule that moves a matrix across the inner product. The two printed numbers should be equal.
Python
Both results are 3 − i.
The code below uses the orthonormal basis of Part 5. It calculates the components of v as inner products, with the basis vector in the first place, and then builds the vector again from its components.
Python
Both components are 1.414, which is √2, as in Practice Problem 6. The last line gives the vector (2, 0) back. Now find the components of the vector (0, 1).
Python
The components are −i/√2 and i/√2, as in Part 5.
The code below multiplies a vector by eiθ with θ = 1.2 radians. It prints the length before and after, and the absolute value of an inner product before and after.
Python
The length is 3.162 both times, and the absolute value of the inner product is 7 both times. A phase factor changes neither one. Change 1.2 to any other real number and run the code again to check.
This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.
Choose how your answers are checked
1. Find the length of the complex vector (2i, 1, 2).
Add the squared absolute values of the components.squared length = 4 + 1 + 4 = 9length = √9 = 3
2. Let u = (1, i) and v = (2, 3). Find the inner product ⟨u, v⟩.
Take the conjugates of the components of the first vector: (1)(2) + (−i)(3) = 2 − 3i.
3. u and v are complex vectors. Which number is equal to ⟨v, u⟩?
Exchanging the two vectors moves the conjugates from one vector to the other, which gives the complex conjugate of the inner product.
4. Which vector is orthogonal to (1, i) in the complex inner product?
With the conjugates on the first vector:⟨(1, i), (1, −i)⟩ = (1)(1) + (−i)(−i)⟨(1, i), (1, −i)⟩ = 1 − 1 = 0The other three inner products are 2, 2i, and 1 − i.
5. Let A = 21 + i3i4. Find the entry of A† in row 1, column 2.
The entry of A† in row 1, column 2 is the conjugate of the entry of A in row 2, column 1. The conjugate of 3i is −3i.