← Exercise library← All exercises for this theme
Theme 2 — Hilbert Spaces and Dirac Notation

Change of orthonormal basis

Keywords: change of basis · unitary matrix · change-of-basis matrix · representation of an operator · Hadamard · invariants

Exercise 1 : Change of orthonormal basis

In C2\C^2, consider the canonical orthonormal basis (∣0⟩,∣1⟩)(\ket0,\ket1) and the basis

∣+⟩=∣0⟩+∣1⟩2,∣−⟩=∣0⟩−∣1⟩2.\ket+=\frac{\ket0+\ket1}{\sqrt2},\qquad\ket-=\frac{\ket0-\ket1}{\sqrt2}.

The change-of-basis matrix is defined as the matrix SS whose columns are the components of the new basis vectors in the old basis, that is, Sij=⟨ei|fj⟩S_{ij}=\braket{e_i}{f_j} if (∣ei⟩)(\ket{e_i}) is the old basis and (∣fj⟩)(\ket{f_j}) the new one.

Question 1
Verify that (∣+⟩,∣−⟩)(\ket+,\ket-) is an orthonormal basis. Write down the change-of-basis matrix SS and show that it is unitary.

Solution
We have ⟨+|+⟩=12(1+1)=1\braket++=\frac12(1+1)=1, ⟨—|=⟩1\braket—=1 and ⟨+|−⟩=12(1−1)=0\braket+-=\frac12(1-1)=0: the basis is orthonormal. The columns of SS are the components of ∣+⟩\ket+ and ∣−⟩\ket-:

S=12(111−1).\begin{aligned} S=\frac{1}{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}. \end{aligned}

This matrix, called the Hadamard matrix, is real and symmetric, so S†=SS^\dagger=S, and direct calculation gives S†S=S2=12(2002)=1S^\dagger S=S^2=\frac12\begin{pmatrix}2&0\\0&2\end{pmatrix}=\mathbf{1}. It is unitary.

Question 2
Show that, in general, the change-of-basis matrix between two orthonormal bases is unitary.

Solution
Let us calculate the elements of S†SS^\dagger S using the closure relation in the old basis:

(S†S)jk=∑i(S†)jiSik=∑i⟨ei|fj⟩∗⟨ei|fk⟩=∑i⟨fj|ei⟩⟨ei|fk⟩=⟨fj|fk⟩=δjk.(S^\dagger S)_{jk}=\sum_i(S^\dagger)_{ji}S_{ik}=\sum_i\braket{e_i}{f_j}^*\braket{e_i}{f_k}=\sum_i\braket{f_j}{e_i}\braket{e_i}{f_k}=\braket{f_j}{f_k}=\delta_{jk}.

Thus S†S=1S^\dagger S=\mathbf{1}. In other words, the columns of SS are orthonormal, which simply expresses the fact that the new basis is orthonormal. In finite dimension, this also implies SS†=1SS^\dagger=\mathbf{1}.

Question 3
A vector ∣ψ⟩\ket\psi has components (α,β)(\alpha,\beta) in the basis (∣0⟩,∣1⟩)(\ket0,\ket1). What are its components in the basis (∣+⟩,∣−⟩)(\ket+,\ket-)? Express the result using SS.

Solution
The new components are the projections ⟨+|ψ⟩\braket+\psi and ⟨−|ψ⟩\braket-\psi:

⟨+|ψ⟩=α+β2,⟨−|ψ⟩=α−β2.\braket+\psi=\frac{\alpha+\beta}{\sqrt2},\qquad\braket-\psi=\frac{\alpha-\beta}{\sqrt2}.

In general, ⟨fj|ψ⟩=∑i⟨fj|ei⟩⟨ei|ψ⟩=∑i(S†)jiψi\braket{f_j}{\psi}=\sum_i\braket{f_j}{e_i}\braket{e_i}{\psi}=\sum_i(S^\dagger)_{ji}\psi_i: the column vector of the new components is obtained by applying S†S^\dagger to the column vector of the old components. Take care with the direction: it is S†=S−1S^\dagger=S^{-1}, not SS, that transforms the components.

Question 4
Show that the matrix of an operator A^\hat A in the new basis is A′=S†ASA'=S^\dagger AS. Calculate the matrices of σz=diag(1,−1)\sigma_z=\mathrm{diag}(1,-1) and B=(2112)B=\begin{pmatrix}2&1\\1&2\end{pmatrix} in the basis (∣+⟩,∣−⟩)(\ket+,\ket-). Comment on the results.

Solution
The matrix elements in the new basis are Ajk′=⟨fj∣A^∣fk⟩A'_{jk}=\bra{f_j}\hat A\ket{f_k}. Inserting two closure relations in the old basis,

Ajk′=∑i,l⟨fj|ei⟩⟨ei∣A^∣el⟩⟨el|fk⟩=∑i,l(S†)jiAilSlk=(S†AS)jk.A'_{jk}=\sum_{i,l}\braket{f_j}{e_i}\bra{e_i}\hat A\ket{e_l}\braket{e_l}{f_k}=\sum_{i,l}(S^\dagger)_{ji}A_{il}S_{lk}=(S^\dagger AS)_{jk}.

For σz\sigma_z, we find

S†σzS=12(111−1)(100−1)(111−1)=12(1−111)(111−1)=(0110)=σx.\begin{aligned} S^\dagger\sigma_zS=\frac12\begin{pmatrix}1&1\\1&-1\end{pmatrix}\begin{pmatrix}1&0\\0&-1\end{pmatrix}\begin{pmatrix}1&1\\1&-1\end{pmatrix}=\frac12\begin{pmatrix}1&-1\\1&1\end{pmatrix}\begin{pmatrix}1&1\\1&-1\end{pmatrix}=\begin{pmatrix}0&1\\1&0\end{pmatrix}=\sigma_x . \end{aligned}

In the new basis, σz\sigma_z has the matrix of σx\sigma_x: its diagonal elements are zero, since ∣±⟩\ket\pm are not eigenstates of σz\sigma_z. For BB, note that B∣+⟩=3∣+⟩B\ket+=3\ket+ and B∣−⟩=∣−⟩B\ket-=\ket-, so that

S†BS=(3001).\begin{aligned} S^\dagger BS=\begin{pmatrix}3&0\\0&1\end{pmatrix}. \end{aligned}

The basis (∣+⟩,∣−⟩)(\ket+,\ket-) is an eigenbasis of BB: diagonalising a matrix consists precisely in finding a basis in which its matrix is diagonal. We verify that the trace (44) and determinant (33) are the same in both bases: they are invariants, which depend only on the operator and not on the basis.