Linear Algebra / Unit 8, Complex Vector Spaces / Topic 8.5
Unit 8. Complex Vector Spaces
Topic 7.1 diagonalized a real symmetric matrix with an orthogonal matrix. This topic gives the complex version: a Hermitian matrix is diagonalized by a unitary matrix, A = UΛU†. The topic writes a Hermitian matrix as a sum of eigenvalues times projections, uses that sum to calculate functions of a matrix, and names the larger family of matrices that have an orthonormal basis of eigenvectors.
You need Topics 6.1, 7.1, 8.3, and 8.4 for this topic.
The spectral theorem for Hermitian matrices. Each n by n Hermitian matrix A has an orthonormal basis of Cⁿ that consists of eigenvectors of A. With these eigenvectors in the columns of a unitary matrix U, and the real eigenvalues on the diagonal of Λ, A = UΛU†.
The theorem holds for each Hermitian matrix, including a matrix with repeated eigenvalues. A Hermitian matrix always has enough eigenvectors. The proof is by induction on the size of the matrix. One eigenvector always exists, because the characteristic polynomial has a root. The matrix sends each vector that is orthogonal to that eigenvector to another vector that is orthogonal to it, so the same argument can be repeated in a space of one dimension less.
Topic 8.3 found the eigenvalues 4 and 1 of the matrix H below, with the eigenvectors (1 − i, 2) and (−1 + i, 1). Their lengths are √6 and √3.
H = 21 − i1 + i3 u₁ = 1/√6 1 − i2 u₂ = 1/√3 −1 + i1 Λ = 4001The matrix U has the columns u₁ and u₂. No inverse has to be calculated, because U⁻¹ = U†.
For a unit vector u, the matrix P = uu† projects each vector onto the line of u. It is the complex version of the projection matrix of Topic 6.1. Multiplying out UΛU† gives the spectral decomposition.
A = λ₁P₁ + λ₂P₂ + … + λₙPₙ with Pi = uiui†The projections have four properties.
The last property is called the completeness relation. It says that each vector is the sum of its projections onto the eigenvectors. Topic 9.2 develops it.
The unit eigenvectors of σx are (1, 1)/√2 for the eigenvalue 1 and (1, −1)/√2 for the eigenvalue −1.
P₊ = 1/2 1111 P₋ = 1/2 1−1−11 (1)P₊ + (−1)P₋ = 0110 = σx and P₊ + P₋ = IThe unit eigenvector for the eigenvalue 1 is u = (1, i)/√2. The row u† holds the conjugates, (1, −i)/√2.
P₊ = uu†the projection onto the eigenvectorP₊ = 1/2 1i 1−ia column times its conjugate transposeP₊ = 1/2 1−ii1P₋ = 1/2 1i−i1the same calculation for the other eigenvectorThe difference P₊ − P₋ is the matrix with the rows 0, −i and i, 0, which is σy.
When an eigenvalue is repeated, its eigenvectors fill a subspace of more than one dimension. Physics calls such an eigenvalue degenerate. Any orthonormal basis of that subspace can be used, so the eigenvectors are not unique. The sum of their projections does not depend on the choice. It is the projection onto the whole eigenspace.
The spectral decomposition is therefore best written with one term for each different eigenvalue, where each P is the projection onto the eigenspace of that eigenvalue. In this form the decomposition of a Hermitian matrix is unique.
The properties of the projections make powers easy. All of the mixed products are zero, and each Pi² is Pi.
A² = λ₁²P₁ + … + λₙ²Pₙ and Ak = λ₁kP₁ + … + λₙkPₙThe same rule defines any function of the matrix: apply the function to each eigenvalue, and keep the projections.
f(A) = f(λ₁)P₁ + … + f(λₙ)Pₙ = U f(Λ) U†| Function | Result | Condition |
|---|---|---|
| Inverse | A⁻¹ = (1/λ₁)P₁ + … + (1/λₙ)Pₙ | No eigenvalue is zero |
| Square root | √λ₁ P₁ + … + √λₙ Pₙ | No eigenvalue is negative |
| Exponential | eA = eλ₁P₁ + … + eλₙPₙ | None |
| Unitary exponential | eiA = eiλ₁P₁ + … + eiλₙPₙ | None |
The matrix with the rows 2, 1 and 1, 2 has the eigenvalues 3 and 1, with the same eigenvectors as σx. So it is 3P₊ + P₋, and its square root is
√3 P₊ + P₋ = 1/2 √3 + 1√3 − 1√3 − 1√3 + 1Multiplying this matrix by itself gives the matrix with the rows 2, 1 and 1, 2.
The entries come from the formulas of Topic 8.1 for cos θ and sin θ. The result is a unitary matrix, as Topic 8.4 stated.
Let x be a vector of length 1, and write it in the eigenvector basis: x = c₁u₁ + … + cₙuₙ with ci = ⟨ui, x⟩. Then
⟨x, Ax⟩ = λ₁|c₁|² + λ₂|c₂|² + … + λₙ|cₙ|²The numbers |ci|² are not negative, and they add up to 1. The real number ⟨x, Ax⟩ of Topic 8.3 is a weighted average of the eigenvalues. It lies between the smallest and the largest eigenvalue, as in Topic 7.2.
This is the measurement rule of quantum mechanics in the language of linear algebra. A measurement of the quantity A on the state x gives the eigenvalue λi with the probability |ci|², and the average of many measurements is ⟨x, Ax⟩. Topic 9.3 develops this.
Try it: the weights of the two eigenvalues
The state is the unit vector x = (cos(α/2), eiφ sin(α/2)). The sliders set α and φ, and the menu chooses a Pauli matrix. The blue bar and the red bar show the weights |c|² of the eigenvalues 1 and −1. The green mark on the line below shows the average ⟨x, Ax⟩.
Hermitian matrices are not the only matrices with an orthonormal basis of eigenvectors. A square matrix A is called normal when it gives the same product with its conjugate transpose in both orders.
A†A = AA†A matrix has an orthonormal basis of eigenvectors exactly when it is normal. Then A = UΛU† with a unitary U, and the eigenvalues on the diagonal of Λ can be complex.
| Kind of normal matrix | Condition | Eigenvalues |
|---|---|---|
| Hermitian | A† = A | Real |
| Skew-Hermitian | A† = −A | Imaginary |
| Unitary | A† = A⁻¹ | Absolute value 1 |
The shear with the rows 1, 1 and 0, 1 is not normal. Topic 5.3 showed that it cannot be diagonalized at all. The matrix with the rows 2, 1 and 0, 3 is not normal either. It can be diagonalized, but its eigenvectors (1, 0) and (1, 1) are not orthogonal.
| Fact | Statement |
|---|---|
| Spectral theorem | A Hermitian matrix is A = UΛU†, with a unitary U and a real diagonal Λ |
| Spectral decomposition | A = λ₁P₁ + … + λₙPₙ with Pi = uiui† |
| Projections | P² = P, P† = P, PiPj = 0, and P₁ + … + Pₙ = I |
| Function of a matrix | f(A) = f(λ₁)P₁ + … + f(λₙ)Pₙ |
| Average | ⟨x, Ax⟩ = λ₁|c₁|² + … + λₙ|cₙ|² for a unit vector x |
| Normal matrix | A†A = AA†, which is the condition for an orthonormal basis of eigenvectors |
Work each problem on paper first. Then open the answer to check your work.
The trace is 4 and the determinant is 4 − 1 = 3, so the eigenvalues are 3 and 1.
For 3, the first row gives −x + iy = 0, so the unit eigenvector is (i, 1)/√2. For 1, the unit eigenvector is (−i, 1)/√2.
P₃ = (1/2) 1i−i1 and P₁ = (1/2) 1−ii1, and A = 3P₃ + P₁.
1/4 1i−i1 1i−i1 = 1/4 1 + 1i + i−i − i1 + 1multiply= 1/2 1i−i1the same matrix again
σx = P₊ − P₋the spectral decompositionσxk = (1)kP₊ + (−1)kP₋raise each eigenvalue to the power kσx¹⁰⁰ = P₊ + P₋ = Ik = 100σx¹⁰¹ = P₊ − P₋ = σxk = 101
A⁻¹ = 1/3P₃ + P₁1 divided by each eigenvalueA⁻¹ = 1/6 1i−i1 + 1/2 1−ii1A⁻¹ = 1/3 2−ii2
c₃ = ⟨(i, 1)/√2, x⟩ = −i/√2|c₃|² = 1/2the weight of the eigenvalue 3|c₁|² = 1/2the weight of the eigenvalue 1average = 3(1/2) + 1(1/2) = 2
The average is the entry of A in row 1, column 1.
The matrix is real and orthogonal, so it is unitary, and each unitary matrix is normal.
Its eigenvectors (1, −i) and (1, i), for the eigenvalues i and −i, are orthogonal in the complex inner product.
The instruction np.linalg.eigh gives the real eigenvalues w and a unitary matrix U whose columns are orthonormal eigenvectors. The product UΛU† should give the matrix back.
Python
The eigenvalues are 1 and 4, and the last result is the matrix H.
For a unit vector u, the expression np.outer(u, u.conj()) calculates the projection matrix uu†. The second vector receives the conjugates, as the row u† does. The code below builds the two projections of H and checks two of their properties.
Python
The two projections add up to the identity matrix, and their product is the zero matrix.
Now add a line that builds the matrix B = λ₁P₁ + λ₂P₂ from the eigenvalues w[0] and w[1]. The result should be H.
Python
From Part 4, a function of a Hermitian matrix is found by applying the function to the eigenvalues. The code below calculates the square root of the matrix with the rows 2, 1 and 1, 2, and then multiplies the result by itself.
Python
The entries of R are 1.366 and 0.366, which are (√3 + 1)/2 and (√3 − 1)/2, as in Part 4. The last result is the matrix A.
Now change the code so that R is the inverse of A. The function is 1/λ, which is typed as 1 / w.
Python
The code below finds the components of a unit vector x in the eigenvector basis. The product U.conj().T @ x calculates all of the inner products ⟨u, x⟩ at once. The weights are the squared absolute values of the components.
Python
The weights are 0.6667 for the eigenvalue 1 and 0.3333 for the eigenvalue 4. The weighted average is 2, and the last line gives the same number as ⟨x, Hx⟩.
From Part 6, a matrix is normal when A†A is equal to AA†. The code below tests the shear, which is not normal.
Python
The two products are different, so the result is False. Now test the rotation of Practice Problem 6, with the rows 0, −1 and 1, 0.
Python
The result is True. The rotation is normal, so it has an orthonormal basis of complex eigenvectors.
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. A Hermitian matrix is written as A = UΛU†. Which statement is true?
The columns of U are orthonormal eigenvectors, so U is unitary. The diagonal of Λ holds the eigenvalues, and the eigenvalues of a Hermitian matrix are real.
2. A Hermitian matrix A has the eigenvalues 2 and 5. For a unit vector x, the weight of the eigenvalue 2 is 0.25, and the weight of the eigenvalue 5 is 0.75. Find ⟨x, Ax⟩.
The number ⟨x, Ax⟩ is the weighted average of the eigenvalues.(2)(0.25) + (5)(0.75) = 0.5 + 3.750.5 + 3.75 = 4.25
3. u is a unit vector, and P = uu†. Which equation is true?
P is the projection onto the line of u. Projecting a second time changes nothing.P² = u(u†u)u†P times PP² = uu† = Pbecause u†u = 1
4. The Pauli matrix σx = 0110 has the eigenvalues 1 and −1. Find the two entries in the first row of σx¹⁰.
σx = P₊ − P₋σx¹⁰ = (1)¹⁰P₊ + (−1)¹⁰P₋raise each eigenvalue to the power 10σx¹⁰ = P₊ + P₋ = IThe first row of the identity matrix is 1, 0.
5. Which kind of matrix does not always have an orthonormal basis of eigenvectors?
Hermitian, unitary, and real symmetric matrices are normal matrices, which always have an orthonormal basis of eigenvectors. A triangular matrix such as the shear 1101 does not.