Scientia sine finibus

Linear Algebra / Unit 9, The Mathematics of Quantum Mechanics / Topic 9.2

Units and Topics

Unit 9. The Mathematics of Quantum Mechanics

9.2 Projection Operators and the Completeness Relation

The projection matrix uu† of Topic 8.5 is written |u⟩⟨u| in Dirac notation. This topic studies these projection operators and the completeness relation, which says that the projections onto the kets of an orthonormal basis add up to the identity. Inserting the identity between two factors is one of the most common steps in the calculations of quantum mechanics.

You need Topics 6.1, 8.5, and 9.1 for this topic.

1. The Projection onto a Ket

Let |u⟩ be a ket of length 1. The outer product of |u⟩ with its own bra is the projection operator onto the line of |u⟩.

P = |u⟩⟨u|the projection onto |u⟩P|v⟩ = |u⟩⟨u|v⟩apply P to a ket |v⟩P|v⟩ = ⟨u|v⟩ |u⟩the bracket is a number, written in front

The result is the component ⟨u|v⟩ times the ket |u⟩. This is the projection of Topic 6.1. Dirac notation makes the properties of a projection short calculations.

  • P² = |u⟩⟨u|u⟩⟨u| = |u⟩⟨u| = P, because ⟨u|u⟩ = 1.
  • P† = P, because the conjugate transpose of |u⟩⟨v| is |v⟩⟨u|.
  • P|u⟩ = |u⟩, and P|w⟩ = 0 for each ket |w⟩ that is orthogonal to |u⟩. The eigenvalues of P are 1 and 0.

For example, the projection onto |+⟩ = (1, 1)/√2 is

|+⟩⟨+| = 1/2 11 11a column times a row|+⟩⟨+| = 1/2 1111

For a ket that does not have the length 1, the projection is |u⟩⟨u| divided by ⟨u|u⟩.

2. The Completeness Relation

Let |1⟩, |2⟩, …, |n⟩ be an orthonormal basis. The projections onto the basis kets add up to the identity.

|1⟩⟨1| + |2⟩⟨2| + … + |n⟩⟨n| = I

This equation is called the completeness relation. A long sum is written with the symbol Σ. In this unit, Σi stands for the sum over all values of the index i, so the completeness relation is

Σi |i⟩⟨i| = I

The reason is the formula for components of Topic 9.1. Apply the sum to any ket |v⟩. Each term |i⟩⟨i|v⟩ is the component ⟨i|v⟩ times the basis ket |i⟩, and these terms add up to |v⟩. A matrix that sends each ket to itself is the identity.

The relation is also a test. A set of orthonormal kets is a basis exactly when its projections add up to the identity. If a ket is missing from the set, the sum is the projection onto a smaller subspace.

A check

|+⟩⟨+| + |−⟩⟨−| = 1/2 1111 + 1/2 1−1−11the two projections|+⟩⟨+| + |−⟩⟨−| = 1001add the matching entries

Try it: two projections that add up to the vector

The drawing shows the real plane. The slider turns the orthonormal basis |a₁⟩, |a₂⟩. Drag the end of the green vector |v⟩. The blue arrow is the projection onto |a₁⟩, and the red arrow is the projection onto |a₂⟩. The dashed red arrow shows the red projection again, starting at the tip of the blue projection.

3. Inserting the Identity

The identity can be placed between any two factors without changing a product. Replacing it by the sum of the projections writes the product in a basis. Each formula below comes from one inserted identity.

StartAfter the identity is insertedMeaning
|v⟩Σi |i⟩⟨i|v⟩A ket is the sum of its components times the basis kets
⟨u|v⟩Σi ⟨u|i⟩⟨i|v⟩The inner product is the sum of ui*vi
⟨v|v⟩Σi |⟨i|v⟩|²The squared length is the sum of the squared absolute values of the components
⟨i|AB|j⟩Σk ⟨i|A|k⟩⟨k|B|j⟩The rule of rows times columns for a matrix product

In the second row, ⟨u|i⟩ is the conjugate of ⟨i|u⟩, which is the conjugate of the component ui. The last row is the multiplication rule of Topic 3.2, derived in one step.

The matrix of an operator

An identity on each side of an operator gives

A = I A Imultiply by the identity on both sidesA = Σi Σj |i⟩⟨i|A|j⟩⟨j|write each identity with the completeness relationA = Σi Σj ⟨i|A|j⟩ |i⟩⟨j|the number ⟨i|A|j⟩ is written in front

The operator is a sum of the outer products |i⟩⟨j|, and the number in front of each one is the matrix element ⟨i|A|j⟩. The outer product |i⟩⟨j| is the matrix with a 1 in row i and column j and zeros in all other places.

4. Changing the Basis

Let |a₁⟩, …, |aₙ⟩ be a second orthonormal basis. An inserted identity gives the components in the new basis from the components in the old basis.

⟨ai|v⟩ = Σj ⟨ai|j⟩ ⟨j|v⟩

The numbers ⟨ai|j⟩ are the entries of a matrix. It is the change of basis matrix of Topic 4.6, and because both bases are orthonormal it is a unitary matrix, as in Topic 8.4. Dirac notation does not need a separate symbol for this matrix. Its entries are the brackets between the kets of the two bases.

Topic 9.1 found the components of |v⟩ = (3, 1) in the basis |+⟩, |−⟩: they are 2√2 and √2. The squared length is the same in both bases.

3² + 1² = 10the standard basis(2√2)² + (√2)² = 8 + 2 = 10the basis |+⟩, |−⟩

5. The Spectral Decomposition

Let A be a Hermitian operator with the eigenvalues λ₁, …, λₙ and an orthonormal basis of eigenkets |a₁⟩, …, |aₙ⟩. Insert the identity, written with the eigenkets, to the right of A. Each term then contains A|ai⟩, which is λi|ai⟩.

A = A Imultiply by the identityA = Σi A|ai⟩⟨ai|the completeness relation of the eigenketsA = Σi λi |ai⟩⟨ai|because A|ai⟩ = λi|ai⟩

This is the spectral decomposition of Topic 8.5. A measurable quantity is the sum of its possible values, each multiplied by the projection onto its eigenket. A function of the operator keeps the projections and applies the function to the eigenvalues.

f(A) = Σi f(λi) |ai⟩⟨ai|

For example, σx has the eigenvalue 1 for |+⟩ and the eigenvalue −1 for |−⟩, so σx = |+⟩⟨+| − |−⟩⟨−|.

6. Projections onto Subspaces

Let |u₁⟩, …, |uk⟩ be orthonormal kets that span a subspace. The sum of their projections is the projection onto the subspace.

P = |u₁⟩⟨u₁| + … + |uk⟩⟨uk|
  • P² = P and P† = P, as for one ket.
  • I − P is the projection onto the kets that are orthogonal to the subspace, and P(I − P) = 0.
  • The trace of P is k, the dimension of the subspace, because the trace of each |u⟩⟨u| is ⟨u|u⟩ = 1.
  • For a ket |v⟩ of length 1, the number ⟨v|P|v⟩ is between 0 and 1. For one ket |u⟩ it is |⟨u|v⟩|².

When an eigenvalue of A is repeated, the term of the spectral decomposition for that eigenvalue is the projection onto its whole eigenspace. The number ⟨v|P|v⟩ is the probability that a measurement gives that eigenvalue. Topic 9.3 states this rule.

Common Mistakes

  • Building a projection |u⟩⟨u| from a ket that does not have the length 1.
  • Using the completeness relation with kets that are not orthonormal, or with a set that is not a whole basis.
  • Writing the projection of |v⟩ as ⟨v|u⟩|u⟩. The component is ⟨u|v⟩, with the basis ket in the bra.
  • Expecting a projection to have an inverse. A projection onto a smaller subspace has the eigenvalue 0.
  • Adding projections onto kets that are not orthogonal and expecting a projection.

Summary

FactStatement
Projection onto a unit ketP = |u⟩⟨u|, with P² = P and P† = P
Completeness relationΣi |i⟩⟨i| = I for an orthonormal basis
Components|v⟩ = Σi |i⟩⟨i|v⟩
Change of basis⟨ai|v⟩ = Σj ⟨ai|j⟩⟨j|v⟩
Spectral decompositionA = Σi λi |ai⟩⟨ai|
Projection onto a subspaceThe sum of the projections onto an orthonormal basis of the subspace, with the trace equal to the dimension

Practice

Work each problem on paper first. Then open the answer to check your work.

1. Write the projection P = |u⟩⟨u| for |u⟩ = (1, i)/√2 as a matrix.

The bra ⟨u| is the row (1, −i)/√2.

P = (1/2) 1−ii1.

2. Apply the projection of Problem 1 to |v⟩ = (2, 0).

⟨u|v⟩ = (1)(2)/√2 = √2the componentP|v⟩ = √2 |u⟩ = (1, i)

3. Check the completeness relation for |u⟩ = (1, i)/√2 and |w⟩ = (1, −i)/√2.

|w⟩⟨w| = (1/2) 1i−i1.

Adding the matrix of Problem 1 gives (1/2) 2002 = I.

4. Find the components of |0⟩ = (1, 0) in the basis |+⟩, |−⟩, and check that their squared absolute values add up to 1.

⟨+|0⟩ = 1/√2 and ⟨−|0⟩ = 1/√2.

The squares are 1/2 and 1/2, and they add up to 1.

5. An operator A has the eigenket |+⟩ with the eigenvalue 5 and the eigenket |−⟩ with the eigenvalue −1. Find the matrix of A.

A = 5|+⟩⟨+| − |−⟩⟨−|each eigenvalue times its projectionA = 5/2 1111 − 1/2 1−1−11A = 2332

6. P is the projection onto a subspace of dimension 2 in C³. Find the trace of P, the trace of I − P, and the eigenvalues of P.

The trace of P is the dimension of the subspace, which is 2. The trace of I − P is 3 − 2 = 1.

The eigenvalues of P are 1, 1, and 0.

Python Practice

Step 1. A projection

For a ket u of length 1, the expression np.outer(u, u.conj()) builds the projection |u⟩⟨u|. The code below builds the projection of Practice Problem 1 and tests whether P² is equal to P.

Python

The matrix has the rows 0.5, −0.5i and 0.5i, 0.5, and the test gives True.

Step 2. Apply a projection

The projection of a ket |v⟩ is the component ⟨u|v⟩ times |u⟩. The code below calculates it in two ways, with the matrix P and with the component.

Python

Both lines give the ket (−i, 1). Now change |v⟩ to the ket (2, 0) of Practice Problem 2. The result should be (1, i).

Python

Step 3. The completeness relation

The instruction np.linalg.eigh gives an orthonormal basis of eigenkets of a Hermitian matrix in the columns of U. The loop below adds the projections onto the three eigenkets. The line with np.zeros makes a 3 by 3 matrix of zeros that can hold complex numbers. The first line of the loop takes column k, and the second line adds its projection to T.

Python

The result is the identity matrix. Now build the spectral decomposition of Part 5: multiply each projection by its eigenvalue w[k] before it is added. The sum should be the matrix H.

Python

Step 4. Components in another basis

The product U.conj().T @ v calculates all of the components ⟨a|v⟩ in the basis of the eigenkets at once. The code below finds the components, and then it builds the ket again from them.

Python

The last line gives the ket (1, 2, 2i) again. From Part 3, the squared length of a ket is the sum of the squared absolute values of its components in any orthonormal basis. Change the line for total so that it calculates this sum from the components c. The result should be 9, which is ⟨v|v⟩.

Python

Step 5. A projection onto a subspace

The code below adds the projections onto the first two eigenkets. The result P projects onto a subspace of dimension 2. The code prints the trace of P and tests whether P² is equal to P.

Python

The trace is 2, the dimension of the subspace. Now change the line for Q so that Q is the projection I − P onto the kets that are orthogonal to the subspace. The identity matrix of size 3 is typed as np.eye(3). The trace of Q should be 1, and the product PQ should be the zero matrix.

Python

Quiz

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 ket of length 1, and P = |u⟩⟨u|. Which ket is P|v⟩?

2. Let |u⟩ = (3/5, 4/5) and P = |u⟩⟨u|. Find the four entries of P.

3. Which equation is the completeness relation for an orthonormal basis |1⟩, …, |n⟩?

4. An operator A has the eigenket |+⟩ = (1, 1)/√2 with the eigenvalue 4 and the eigenket |−⟩ = (1, −1)/√2 with the eigenvalue 2. Find the two entries in the first row of A.

5. P is the projection onto a subspace of dimension 3 in C⁵. Find the trace of I − P.

Next: Topic 9.3, Observables, Measurement, and Expectation Values