Skip to content

Change of Basis

A change of basis rewrites the same vector or linear operator using a different coordinate system. The vector does not move; its coordinate column changes because the basis used to describe it has changed.

This page fixes the finite-dimensional linear-algebra convention used by the Toolkit. For the physics-facing workflow with state coefficients, observables, and probabilities, see Change of Basis.

Let VV be an nn-dimensional vector space over F\mathbb F, where F\mathbb F is usually R\mathbb R or C\mathbb C. Let

B=(e1,…,en)\mathcal B=(e_1,\ldots,e_n)

be an old ordered basis and let

F=(f1,…,fn)\mathcal F=(f_1,\ldots,f_n)

be a new ordered basis.

Each new basis vector can be expanded in the old basis:

fa=∑iPiaei.f_a = \sum_i P^i{}_a e_i.

The change-of-coordinates matrix PP is defined by putting these old-basis coordinate columns side by side:

P=([f1]B⋯[fn]B).P = \begin{pmatrix} [f_1]_{\mathcal B} & \cdots & [f_n]_{\mathcal B} \end{pmatrix}.

With this convention, the columns of PP answer the question: how do the new basis vectors look in the old basis?

Because F\mathcal F is a basis, PP is invertible. If PP were not invertible, the proposed new basis vectors would be linearly dependent or would fail to span VV.

Write the same vector v∈Vv\in V in the two bases:

v=∑iciei=∑adafa.v = \sum_i c^i e_i = \sum_a d^a f_a.

Substituting fa=∑iPiaeif_a=\sum_i P^i{}_a e_i gives

v=∑ada(∑iPiaei)=∑i(∑aPiada)ei.v = \sum_a d^a \left( \sum_i P^i{}_a e_i \right) = \sum_i \left( \sum_a P^i{}_a d^a \right) e_i.

By uniqueness of coordinates in the basis B\mathcal B,

ci=∑aPiada.c^i = \sum_a P^i{}_a d^a.

In matrix form,

[v]B=P[v]F,[v]F=P−1[v]B.[v]_{\mathcal B} = P[v]_{\mathcal F}, \qquad [v]_{\mathcal F} = P^{-1}[v]_{\mathcal B}.

This is a passive basis change. The abstract vector vv is unchanged. Only the coordinate map has changed.

Let A:V→VA:V\to V be a linear operator. Its matrix in the old basis is ABA_{\mathcal B}, defined by

[Av]B=AB[v]B.[Av]_{\mathcal B} = A_{\mathcal B}[v]_{\mathcal B}.

Its matrix in the new basis is AFA_{\mathcal F}, defined by

[Av]F=AF[v]F.[Av]_{\mathcal F} = A_{\mathcal F}[v]_{\mathcal F}.

Use the coordinate relation twice:

[Av]B=P[Av]F=PAF[v]F.[Av]_{\mathcal B} = P[Av]_{\mathcal F} = P A_{\mathcal F}[v]_{\mathcal F}.

But also

[Av]B=AB[v]B=ABP[v]F.[Av]_{\mathcal B} = A_{\mathcal B}[v]_{\mathcal B} = A_{\mathcal B}P[v]_{\mathcal F}.

Since this holds for every coordinate column [v]F[v]_{\mathcal F},

PAF=ABP,P A_{\mathcal F} = A_{\mathcal B}P,

and therefore

AF=P−1ABP.A_{\mathcal F} = P^{-1}A_{\mathcal B}P.

This is a similarity transformation. It changes the matrix representation of AA, not the abstract operator.

For a map T:V→WT:V\to W with a basis change in both domain and codomain, the corresponding formula is

[T]G←F=Q−1[T]C←BP,[T]_{\mathcal G\leftarrow\mathcal F} = Q^{-1} [T]_{\mathcal C\leftarrow\mathcal B} P,

where PP changes domain coordinates from F\mathcal F to B\mathcal B, and QQ changes codomain coordinates from G\mathcal G to C\mathcal C.

In a finite-dimensional complex inner-product space, quantum mechanics usually uses orthonormal bases. Let

B={∣ei⟩},F={∣fa⟩}\mathcal B=\{\lvert e_i\rangle\}, \qquad \mathcal F=\{\lvert f_a\rangle\}

be two orthonormal bases. Define the overlap matrix

Sai=⟨fa∣ei⟩.S_{ai} = \langle f_a\vert e_i\rangle.

If

∣ψ⟩=∑ici∣ei⟩=∑ada∣fa⟩,\lvert\psi\rangle = \sum_i c_i\lvert e_i\rangle = \sum_a d_a\lvert f_a\rangle,

then the new coefficients are

da=⟨fa∣ψ⟩=∑iSaici.d_a = \langle f_a\vert\psi\rangle = \sum_i S_{ai}c_i.

Thus

d=Sc.d = S c.

The overlap matrix is unitary:

∑iSaiSbi∗=∑i⟨fa∣ei⟩⟨ei∣fb⟩=⟨fa∣fb⟩=δab.\sum_i S_{ai}S_{bi}^* = \sum_i \langle f_a\vert e_i\rangle \langle e_i\vert f_b\rangle = \langle f_a\vert f_b\rangle = \delta_{ab}.

This says SS†=ISS^\dagger=I, and finite dimensionality then gives S†S=IS^\dagger S=I as well.

The earlier matrix PP has columns [∣fa⟩]B[\lvert f_a\rangle]_{\mathcal B}. Its entries are

Pia=⟨ei∣fa⟩=Sai∗,P_{ia} = \langle e_i\vert f_a\rangle = S_{ai}^*,

so

P=S†,P−1=S.P=S^\dagger, \qquad P^{-1}=S.

The operator matrix formula becomes

AF=SABS†.A_{\mathcal F} = S A_{\mathcal B}S^\dagger.

This is the form most often seen in finite-dimensional quantum mechanics: state coefficients transform by d=Scd=Sc, while operator matrices transform by AF=SABS†A_{\mathcal F}=S A_{\mathcal B}S^\dagger.

A passive basis change rewrites the same vector in a new coordinate system:

∣ψ⟩unchanged,c↦d=Sc.\lvert\psi\rangle \quad\text{unchanged}, \qquad c\mapsto d=Sc.

An active transformation applies a linear operator to produce a new vector:

∣ψ⟩↦U∣ψ⟩.\lvert\psi\rangle \mapsto U\lvert\psi\rangle.

Both discussions may use unitary matrices, so the notation alone is not enough. A page should say whether UU is being used as a physical transformation of states, a symmetry action, a time-evolution operator, or a passive basis-change matrix. Mixing these interpretations is one of the fastest ways to lose a sign, inverse, or conjugate.

Similarity transformations preserve the basis-independent information of an operator. In finite dimension,

AF=P−1ABPA_{\mathcal F} = P^{-1}A_{\mathcal B}P

has the same eigenvalues, trace, determinant, rank, and characteristic polynomial as ABA_{\mathcal B}.

Expectation values are also preserved when states and operators are transformed consistently. In the orthonormal convention above,

d=Sc,AF=SABS†.d=Sc, \qquad A_{\mathcal F}=SA_{\mathcal B}S^\dagger.

Then

d†AFd=c†S†(SABS†)Sc=c†ABc.d^\dagger A_{\mathcal F}d = c^\dagger S^\dagger \left( SA_{\mathcal B}S^\dagger \right) Sc = c^\dagger A_{\mathcal B}c.

What is invariant is the physical scalar or abstract object, not the individual matrix entries.

Let B\mathcal B be the standard basis of R2\mathbb R^2 and let

f1=12(11),f2=12(1−1).f_1 = \frac{1}{\sqrt2} \begin{pmatrix} 1\\ 1 \end{pmatrix}, \qquad f_2 = \frac{1}{\sqrt2} \begin{pmatrix} 1\\ -1 \end{pmatrix}.

The change-of-coordinates matrix is

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

Here P−1=PT=PP^{-1}=P^T=P. For

v=(10)B,v = \begin{pmatrix} 1\\ 0 \end{pmatrix}_{\mathcal B},

the new coordinate column is

[v]F=P−1[v]B=12(11).[v]_{\mathcal F} = P^{-1}[v]_{\mathcal B} = \frac{1}{\sqrt2} \begin{pmatrix} 1\\ 1 \end{pmatrix}.

Now let the old matrix of an operator be

AB=(100−1).A_{\mathcal B} = \begin{pmatrix} 1 & 0\\ 0 & -1 \end{pmatrix}.

The new matrix is

AF=P−1ABP=(0110).A_{\mathcal F} = P^{-1}A_{\mathcal B}P = \begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix}.

The matrix changed from diagonal to off-diagonal, but the operator did not change. The expectation value is the same in both descriptions:

[v]BTAB[v]B=1,[v]FTAF[v]F=1.[v]_{\mathcal B}^T A_{\mathcal B} [v]_{\mathcal B} = 1, \qquad [v]_{\mathcal F}^T A_{\mathcal F} [v]_{\mathcal F} = 1.

This is the real two-dimensional version of the familiar conversion between the zz and xx spin bases.

A basis choice is a representation choice. A state may be written in an energy basis, a spin-zz basis, a spin-xx basis, a position representation, or a momentum representation. The coordinate list changes, but the state does not.

Likewise, an observable may be diagonal in one basis and dense in another. Diagonalizing a Hamiltonian is not changing the Hamiltonian into a different physical operator. It is finding a basis in which its action is easiest to read.

For finite spin and qubit systems, the basis-change matrices are ordinary unitary matrices. For position and momentum, the same idea becomes a Fourier transform, and the matrix sums become integrals.

  • Using PP where P−1P^{-1} is required.
  • Transforming the state-coordinate column but leaving the operator matrix in the old basis.
  • Assuming every basis change is unitary; nonorthonormal bases require a general invertible matrix.
  • Forgetting that basis order matters.
  • Comparing individual matrix entries from different bases as if they were basis-independent quantities.
  • Treating a passive basis change as a physical time evolution or symmetry operation.
  • Using an overlap matrix without tracking which basis labels its rows and columns.
  • S. Axler, Linear Algebra Done Right, 3rd ed., Springer, 2015.
  • G. Strang, Linear Algebra and Its Applications, 4th ed., Brooks/Cole, 2006.
  • P. R. Halmos, Finite-Dimensional Vector Spaces, 2nd ed., Springer, 1974.
  • R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994.
  • M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, Cambridge University Press, 2010.
  1. In R2\mathbb R^2, let B\mathcal B be the standard basis and let F=(f1,f2)\mathcal F=(f_1,f_2) with f1=(1,0)Tf_1=(1,0)^T and f2=(1,1)Tf_2=(1,1)^T. Find PP and the F\mathcal F-coordinates of v=(3,2)Tv=(3,2)^T.
Solution

The columns of PP are the standard coordinates of f1f_1 and f2f_2:

P=(1101).P = \begin{pmatrix} 1 & 1\\ 0 & 1 \end{pmatrix}.

Since

P−1=(1−101),P^{-1} = \begin{pmatrix} 1 & -1\\ 0 & 1 \end{pmatrix},

the new coordinate column is

[v]F=P−1[v]B=(12).[v]_{\mathcal F} = P^{-1}[v]_{\mathcal B} = \begin{pmatrix} 1\\ 2 \end{pmatrix}.

Indeed,

1f1+2f2=(32).1f_1+2f_2 = \begin{pmatrix} 3\\ 2 \end{pmatrix}.
  1. With the same bases as in the first exercise, let
AB=(2003).A_{\mathcal B} = \begin{pmatrix} 2 & 0\\ 0 & 3 \end{pmatrix}.

Find AFA_{\mathcal F}.

Solution

Use AF=P−1ABPA_{\mathcal F}=P^{-1}A_{\mathcal B}P:

AF=(1−101)(2003)(1101)=(2−103).A_{\mathcal F} = \begin{pmatrix} 1 & -1\\ 0 & 1 \end{pmatrix} \begin{pmatrix} 2 & 0\\ 0 & 3 \end{pmatrix} \begin{pmatrix} 1 & 1\\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 2 & -1\\ 0 & 3 \end{pmatrix}.

The off-diagonal entry appears because the new basis is not made of eigenvectors of the operator.

  1. Let B={∣ei⟩}\mathcal B=\{\lvert e_i\rangle\} and F={∣fa⟩}\mathcal F=\{\lvert f_a\rangle\} be orthonormal bases, and let Sai=⟨fa∣ei⟩S_{ai}=\langle f_a\vert e_i\rangle. Prove that SS is unitary.
Solution

Use completeness of the old basis:

(SS†)ab=∑iSaiSbi∗=∑i⟨fa∣ei⟩⟨ei∣fb⟩=⟨fa∣fb⟩=δab.(SS^\dagger)_{ab} = \sum_i S_{ai}S_{bi}^* = \sum_i \langle f_a\vert e_i\rangle \langle e_i\vert f_b\rangle = \langle f_a\vert f_b\rangle = \delta_{ab}.

Thus SS†=ISS^\dagger=I. Since SS is a square matrix, this also implies S†S=IS^\dagger S=I.