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

Matrix exponential

Keywords: matrix exponential · nilpotent matrix · Pauli matrices · commutation · determinant · trace · unitary operator

Exercise 1 : Matrix exponential

For a square matrix AA, the exponential is defined by the always-convergent series eA=∑k≥0Akk!e^A=\sum_{k\geq0}\frac{A^k}{k!}. Let N=(0100)N=\begin{pmatrix}0&1\\0&0\end{pmatrix} and σx=(0110)\sigma_x=\begin{pmatrix}0&1\\1&0\end{pmatrix}.

Question 1
Show that if A=SDS−1A=SDS^{-1} with D=diag(λ1,...,λn)D=\mathrm{diag}(\lambda_1,...,\lambda_n), then eA=S diag(eλ1,...,eλn) S−1e^A=S\,\mathrm{diag}(e^{\lambda_1},...,e^{\lambda_n})\,S^{-1}. Deduce that det⁡eA=etr⁡A\det e^A=e^{\tr A} for a diagonalisable matrix.

Solution
We have Ak=SDS−1SDS−1⋯SDS−1=SDkS−1A^k=SDS^{-1}SDS^{-1}\cdots SDS^{-1}=SD^kS^{-1}, since the intermediate factors S−1SS^{-1}S cancel. By linearity, eA=S(∑kDk/k!)S−1=SeDS−1e^A=S\bigl(\sum_kD^k/k!\bigr)S^{-1}=Se^DS^{-1}, and the exponential of a diagonal matrix is the diagonal matrix of the exponentials. Thus det⁡eA=det⁡eD=∏keλk=e∑kλk=etr⁡A\det e^A=\det e^D=\prod_ke^{\lambda_k}=e^{\sum_k\lambda_k}=e^{\tr A}, since the trace is the sum of the eigenvalues. This result remains true for any matrix, by density of the diagonalisable matrices.

Question 2
Calculate etNe^{tN} for real tt.

Solution
We have N2=0N^2=0, so all powers NkN^k with k≥2k\geq2 vanish, and the series terminates:

etN=1+tN=(1t01).\begin{aligned} e^{tN}=\mathbf{1}+tN=\begin{pmatrix}1&t\\0&1\end{pmatrix}. \end{aligned}

The matrix NN is not diagonalisable, and the method of the previous question does not apply; but the direct calculation is immediate here. We check that det⁡etN=1=etr⁡(tN)\det e^{tN}=1=e^{\tr(tN)}.

Question 3
Let AA be a matrix such that A2=1A^2=\mathbf{1}. Show that eiθA=cos⁡θ 1+isin⁡θ Ae^{i\theta A}=\cos\theta\,\mathbf{1}+i\sin\theta\,A and eθA=cosh⁡θ 1+sinh⁡θ Ae^{\theta A}=\cosh\theta\,\mathbf{1}+\sinh\theta\,A. Apply this to A=σxA=\sigma_x.

Solution
Since A2=1A^2=\mathbf{1}, we have A2k=1A^{2k}=\mathbf{1} and A2k+1=AA^{2k+1}=A. Separating the even and odd terms in the series,

eiθA=∑k(iθ)2k(2k)!1+∑k(iθ)2k+1(2k+1)!A=cos⁡θ 1+isin⁡θ A,e^{i\theta A}=\sum_k\frac{(i\theta)^{2k}}{(2k)!}\mathbf{1}+\sum_k\frac{(i\theta)^{2k+1}}{(2k+1)!}A=\cos\theta\,\mathbf{1}+i\sin\theta\,A,

since i2k=(−1)ki^{2k}=(-1)^k and i2k+1=i(−1)ki^{2k+1}=i(-1)^k. Without the factor ii, we similarly obtain the series for cosh⁡\cosh and sinh⁡\sinh. For A=σxA=\sigma_x,

eiθσx=(cos⁡θisin⁡θisin⁡θcos⁡θ),eσx=(cosh⁡1sinh⁡1sinh⁡1cosh⁡1).\begin{aligned} e^{i\theta\sigma_x}=\begin{pmatrix}\cos\theta&i\sin\theta\\ i\sin\theta&\cos\theta\end{pmatrix},\qquad e^{\sigma_x}=\begin{pmatrix}\cosh1&\sinh1\\ \sinh1&\cosh1\end{pmatrix}. \end{aligned}

The first matrix is unitary; the second is not.

Question 4
Calculate eNeNTe^Ne^{N^{\mathsf T}} and compare it with eN+NTe^{N+N^{\mathsf T}}. What can be concluded? Under what condition do we have eAeB=eA+Be^Ae^B=e^{A+B}?

Solution
From the second question, eN=(1101)e^N=\begin{pmatrix}1&1\\0&1\end{pmatrix}, and similarly eNT=(1011)e^{N^{\mathsf T}}=\begin{pmatrix}1&0\\1&1\end{pmatrix}. Their product is

eNeNT=(1101)(1011)=(2111).\begin{aligned} e^Ne^{N^{\mathsf T}}=\begin{pmatrix}1&1\\0&1\end{pmatrix}\begin{pmatrix}1&0\\1&1\end{pmatrix}=\begin{pmatrix}2&1\\1&1\end{pmatrix}. \end{aligned}

Now N+NT=σxN+N^{\mathsf T}=\sigma_x, and from the previous question eσxe^{\sigma_x} has entries cosh⁡1≃1,543\cosh1\simeq1{,}543 and sinh⁡1≃1,175\sinh1\simeq1{,}175. The two matrices are different: in general, eAeB≠eA+Be^Ae^B\neq e^{A+B}. The reason is that NN and NTN^{\mathsf T} do not commute. If AB=BAAB=BA, we may expand (A+B)k(A+B)^k using the binomial formula as for numbers, and then show that eA+B=eAeBe^{A+B}=e^Ae^B. This observation is essential in quantum mechanics: the exponential of a sum of noncommuting operators, such as e−i(P^2/2m+V(X^))t/ℏe^{-i(\hat P^2/2m+V(\hat X))t/\hbar}, does not factor into a product of exponentials.

Question 5
Let H^\hat H be a Hermitian matrix. Show that U(t)=e−iH^tU(t)=e^{-i\hat Ht} is unitary for every real tt, and that U(t)U(s)=U(t+s)U(t)U(s)=U(t+s).

Solution
Diagonalise H^\hat H in an orthonormal basis: H^=VDV†\hat H=VDV^\dagger, with VV unitary and DD real diagonal. Then U(t)=Ve−iDtV†U(t)=Ve^{-iDt}V^\dagger, and U(t)†=VeiDtV†U(t)^\dagger=Ve^{iDt}V^\dagger, since the complex conjugates of the diagonal entries e−iλkte^{-i\lambda_kt} are eiλkte^{i\lambda_kt}. Thus U(t)†U(t)=VeiDte−iDtV†=1U(t)^\dagger U(t)=Ve^{iDt}e^{-iDt}V^\dagger=\mathbf{1}. Moreover, −iH^t-i\hat Ht and −iH^s-i\hat Hs commute, since they are multiples of the same matrix; from the previous question, U(t)U(s)=e−iH^(t+s)=U(t+s)U(t)U(s)=e^{-i\hat H(t+s)}=U(t+s). This is the group law for the time-evolution operator.