Linear Algebra / Unit 8, Complex Vector Spaces / Topic 8.4
Unit 8. Complex Vector Spaces
A unitary matrix is a square complex matrix with orthonormal columns. It is the complex version of the orthogonal matrix of Topic 6.3. A unitary matrix keeps the inner product of any two vectors, so it keeps all lengths. Its eigenvalues are complex numbers of absolute value 1. In quantum mechanics, the change of a state in time is a unitary map.
You need Topics 5.5, 6.3, 8.2, and 8.3 for this topic.
A square matrix U is called unitary when its columns are orthonormal in the inner product of Topic 8.2. Written as one equation, this is U†U = I. For a square matrix, the equation says that U† is the inverse of U.
U†U = I so U⁻¹ = U†Then UU† = I is also true, so the rows of a unitary matrix are orthonormal as well. A real unitary matrix is an orthogonal matrix, because its conjugate transpose is its transpose.
| Matrix | Comment |
|---|---|
| cos θ−sin θsin θcos θ | A rotation. Each real orthogonal matrix is unitary |
| eiα00eiβ | A diagonal matrix of phase factors |
| (1/√2) 11i−i | Its columns are the orthonormal vectors of Topic 8.2 |
| (1/√2) 111−1 | The Hadamard matrix of quantum computing |
| σx, σy, σz | The Pauli matrices are Hermitian and also unitary |
Check the third matrix. Its columns are q₁ = (1, i)/√2 and q₂ = (1, −i)/√2. Topic 8.2 showed that each has the length 1 and that ⟨q₁, q₂⟩ = 0.
From Topic 8.2, a matrix moves across the inner product as its conjugate transpose.
⟨Ux, Uy⟩ = ⟨x, U†Uy⟩move U to the other side as U†⟨Ux, Uy⟩ = ⟨x, y⟩because U†U = IA unitary matrix keeps each inner product. With y = x, this says that |Ux| = |x| for each vector. Orthogonal vectors stay orthogonal, and an orthonormal basis goes to an orthonormal basis.
A quantum state is a vector of length 1, and the squared absolute values of its components are probabilities that add up to 1. A unitary map keeps the length 1, so the probabilities still add up to 1 after the map. This is the reason that quantum mechanics uses unitary maps for each change of a state that is not a measurement.
Topic 5.1 found that a rotation of the plane has no real eigenvectors, except for the angles 0° and 180°. With complex numbers it has two.
cos θ−sin θsin θcos θ 1−i = cos θ + i sin θsin θ − i cos θmultiply= eiθ 1−itake out the factor cos θ + i sin θ, which is eiθThe vector (1, −i) is an eigenvector with the eigenvalue eiθ. In the same way, (1, i) is an eigenvector with the eigenvalue e−iθ. Both eigenvalues have the absolute value 1, they are conjugates of each other, and the two eigenvectors are orthogonal.
Topic 5.5 defined the exponential of a matrix. For a Hermitian matrix H, the matrix
U = eiHis unitary. The reason is that the conjugate transpose of eiH is e−iH, which is the inverse of eiH. In the basis of the eigenvectors of H, the matrix eiH is diagonal with the entries eiλ. Each λ is real, so each entry is a phase factor.
For a diagonal matrix, the exponential acts on each diagonal entry.
H = π00π/2a diagonal Hermitian matrixeiH = eiπ00eiπ/2the exponential of each diagonal entryeiH = −100ifrom the formula of EulerThe second example uses the Pauli matrix σy. The matrix −iθσy has the rows 0, −θ and θ, 0. Topic 5.5 found the exponential of this matrix: it is the rotation by the angle θ.
e−iθσy = cos θ−sin θsin θcos θIn quantum mechanics, the energy of a system is represented by a Hermitian matrix H. A state at the time t is found from the state at the time 0 by the unitary matrix
U(t) = e−iHt/ħwhere ħ is a constant of nature. In the basis of the eigenvectors of H, with the eigenvalues E₁, E₂, …, this matrix is diagonal with the entries e−iE₁t/ħ, e−iE₂t/ħ, …. Each component of the state turns around the unit circle at its own rate, and no absolute value changes. Topic 9.8 develops this.
Try it: phase factors that turn at different rates
The matrix U(t) is diagonal with the entries e−iE₁t and e−iE₂t, which are its eigenvalues. Here the constant ħ is set to 1. The sliders set the two energies and the time. The blue ring and the red ring show the two entries on the unit circle. The readout follows the state that starts as (1, 1)/√2.
| Fact | Statement |
|---|---|
| Unitary matrix | A square matrix with orthonormal columns, U†U = I |
| Inverse | U⁻¹ = U† |
| What it keeps | Inner products and lengths |
| Determinant | Absolute value 1 |
| Eigenvalues | Absolute value 1, of the form eiθ |
| From a Hermitian matrix | eiH is unitary when H is Hermitian |
| Real case | A real unitary matrix is an orthogonal matrix |
Work each problem on paper first. Then open the answer to check your work.
The columns are (1, i)/√2 and (i, 1)/√2.
squared length of each column = (1 + 1)/2 = 1inner product of the columns = ((1)(i) + (−i)(1))/2 = 0
So U is unitary. The inverse is the conjugate transpose, (1/√2) 1−i−i1.
No. Its columns are orthogonal, but each has the length √2.
The characteristic polynomial is λ² + 1, so the eigenvalues are i and −i.
Both have the absolute value 1.
A unitary matrix keeps lengths.
|x|² = 9 + 16 = 25|Ux| = |x| = 5
(U†)† = Uthe conjugate transpose of the inverse U†(U†)†U† = UU† = I
So U† is unitary.
eiH is diagonal with the entries e⁰ = 1 and eiπ = −1, so it is σz.
eiH/2 is diagonal with the entries 1 and eiπ/2 = i.
A matrix U is unitary when U†U is the identity matrix. From Topic 8.2, U.conj().T is the conjugate transpose. The code below tests the third matrix in the table of Part 1.
Python
The result is the identity matrix, so the matrix is unitary.
The matrix in the next box has orthogonal columns, but it is not unitary. Divide it by the number that makes it unitary.
Python
The code below compares the length of a complex vector before and after a unitary map.
Python
The vector changes, and both lengths are 5.
The code below finds the eigenvalues of the rotation by 60 degrees. The instruction abs gives the absolute value of each eigenvalue, and np.angle gives its angle.
Python
The eigenvalues are 0.5 + 0.866i and 0.5 − 0.866i. Both have the absolute value 1, and their angles are 60 degrees and −60 degrees. They are eiθ and e−iθ, as in Part 3.
Now find the eigenvalues of the rotation by 90 degrees.
Python
From Part 5, the matrix eiH is unitary when H is Hermitian. The code below builds it from the eigenvalues and the eigenvectors of H. The instruction np.linalg.eigh gives the real eigenvalues w and the unitary matrix V of eigenvectors. The expression np.exp(1j * w) calculates the phase factor of each eigenvalue.
Python
The second result is the identity matrix, so U is unitary. The last line shows that both of its eigenvalues have the absolute value 1.
The code below follows a state under the matrix U(t) = e−iHt, with the constant ħ set to 1. Here H is the Pauli matrix σx, and the state starts as (1, 0). The last line prints the squared absolute values of the two components, which are the probabilities of the two results.
Python
At the time 0.5, the probabilities are 0.7702 and 0.2298. They add up to 1. Now change the time to π/2, which is typed as np.pi / 2.
Python
At this time the state is (0, −i). All of the probability has moved from the first result to the second result, and the total is still 1.
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. U is a unitary matrix. Which matrix is its inverse?
A unitary matrix has orthonormal columns in the complex inner product, which is the equation U†U = I. This equation says that U† is the inverse of U.
2. U is a unitary matrix, and x = (1 + i, 1 − i). Find the length of Ux.
A unitary matrix keeps the length of each vector.|x|² = 2 + 2 = 4|Ux| = |x| = 2
3. What is true about each eigenvalue of a unitary matrix?
If Uv = λv, the two sides have the same length, because U keeps lengths. So |λ| = 1. The eigenvalue can be any number eiθ on the unit circle.
4. Which of these matrices is unitary?
The columns of the third matrix are orthogonal, and each has the length 1. The first matrix has the same directions, but its columns have the length √2.
5. The rotation of the plane by 60° has the eigenvalue eiθ with θ = 60°. Find the real part and the imaginary part of this eigenvalue. Round to two decimal places.
eiθ = cos 60° + i sin 60°the formula of Eulereiθ = 0.5 + 0.87iIts absolute value is 1, as for each eigenvalue of a unitary matrix.
Next: Topic 8.5, The Spectral Theorem for Hermitian Matrices