Eigenvalue problems are among the most important problems in linear algebra, and they occur throughout quantum chemistry. In an eigenvalue problem, we are given a square matrix \(A\in\mathbb{C}^{n\times n}\) and seek a number \(\lambda\in\mathbb{C}\) and a nonzero vector \(\mathbf{x}\in\mathbb{C}^n\) such that
\[
A\mathbf{x}=\lambda\mathbf{x}.
\]
The number \(\lambda\) is called an eigenvalue of \(A\), and the nonzero vector \(\mathbf{x}\) is called an eigenvector corresponding to \(\lambda\). In column-vector notation,
The equation \(A\mathbf{x}=\lambda\mathbf{x}\) says that multiplication by \(A\) has a particularly simple effect on an eigenvector: it only multiplies the vector by a number. Thus, the direction represented by \(\mathbf{x}\) is left unchanged, apart from multiplication by the scalar \(\lambda\). Notice that \(\mathbf{x}=\mathbf{0}\) is excluded from the definition, since \(A\mathbf{0}=\lambda\mathbf{0}\) holds for every \(\lambda\) and therefore tells us nothing about the matrix.
The eigenvalue equation can equivalently be written as
\[
(A-\lambda I)\mathbf{x}=\mathbf{0},
\]
where \(I\) is the identity matrix. Since we require \(\mathbf{x}\neq\mathbf{0}\), the matrix \(A-\lambda I\) must have a nontrivial null space and therefore cannot be invertible. For a finite-dimensional square matrix, this is equivalent to
\[
\det(A-\lambda I)=0.
\]
This equation is called the characteristic equation or secular equation of \(A\). Its solutions are the eigenvalues of \(A\). Once an eigenvalue \(\lambda\) has been found, the corresponding eigenvectors are obtained by solving the homogeneous linear system \((A-\lambda I)\mathbf{x}=\mathbf{0}\).
An especially important situation occurs when \(A\) has enough linearly independent eigenvectors to form a basis of \(\mathbb{C}^n\). Suppose these eigenvectors are
The \(n\) separate eigenvalue equations can then be written as the single matrix equation
\[
AX=XD.
\]
Because the eigenvectors form a basis, \(X\) is invertible. Consequently,
\[
A=XDX^{-1}.
\]
A matrix for which such an eigenvector basis exists is called diagonalizable. Diagonalization is useful because the action of a diagonal matrix is particularly simple: it acts independently on each component. In a basis of eigenvectors, the matrix \(A\) therefore has its simplest possible form. This idea is fundamental in quantum mechanics, where many important matrices, in particular Hermitian matrices, possess an orthonormal basis of eigenvectors.
In the exercises below, we study how eigenvalues and eigenvectors are found, when a matrix can be diagonalized, and why Hermitian and, more generally, normal matrices have especially useful eigenvalue decompositions.
Exercises
Exercise 9.1 (Checking candidate eigenvectors) Consider the real symmetric matrix
Recall that a nonzero vector \(\mathbf{x}\) is an eigenvector of \(A\) if
\[
A\mathbf{x}=\lambda\mathbf{x}
\]
for some number \(\lambda\). In other words, after multiplication by \(A\), the vector must point in the same or exactly opposite direction: it may be stretched, compressed, or multiplied by a negative number, but its direction cannot otherwise change.
For each of the following candidate vectors, compute \(A\mathbf{x}\) and decide whether \(\mathbf{x}\) is an eigenvector of \(A\). If it is, find the corresponding eigenvalue \(\lambda\).
Without doing the full matrix-vector multiplication at first, compare this vector with the vector in part a. Do you expect it to be an eigenvector? Check your answer by computing \(A\mathbf{x}\).
The vectors in parts a and d are different vectors, but they point in the same direction. What eigenvalue do they have? What does this tell you about scalar multiples of an eigenvector?
Compare the two eigenvectors found in parts a and b. Compute their ordinary dot product. What do you observe?
Exercise 9.2 (Eigenvalues in chemical kinetics) Consider the reversible reaction
The positive number \(k\) is called the rate constant. It tells us how rapidly the reaction takes place. Here we use the same rate constant for the forward reaction \(\mathrm{A}\to\mathrm{B}\) and the backward reaction \(\mathrm{B}\to\mathrm{A}\), to keep the example simple.
Let \(a(t)\) and \(b(t)\) denote the concentrations of A and B. For a first-order reaction, the reaction rate is proportional to the concentration of the reacting species. Thus, A is converted into B at a rate \(ka\), while B is converted into A at a rate \(kb\). The larger \(k\) is, the faster the reaction proceeds. If concentration is measured in \(\mathrm{mol\,L^{-1}}\) and time in seconds, \(k\) has units of \(\mathrm{s^{-1}}\).
The concentration of A therefore decreases due to the forward reaction at a rate \(ka\) and increases due to the backward reaction at a rate \(kb\). Similarly, the concentration of B increases at a rate \(ka\) and decreases at a rate \(kb\). This gives the rate equations
Calculate \(K\mathbf{x}_1\) and show that \(\mathbf{x}_1\) is an eigenvector of \(K\). What is its eigenvalue? Explain chemically why nothing changes when \(a=b\).
Calculate \(K\mathbf{x}_2\) and show that it is also an eigenvector. What is its eigenvalue?
Suppose that the concentration vector has the form
\[
\mathbf{x}(t)=c(t)\mathbf{x}_2.
\]
Insert this into the rate equation and use your result from part b to show that
\[
\frac{dc}{dt}=-2kc.
\]
Thus \(c(t)=c(0)e^{-2kt}\). What happens to this contribution as time increases? What happens more rapidly if the rate constant \(k\) is increased? Explain why the two eigenvectors \(\mathbf{x}_1\) and \(\mathbf{x}_2\) can be interpreted as an equilibrium mode and a relaxation mode, respectively.
Exercise 9.3 (Eigenvalues and diagonalization of a Hermitian matrix) Consider the matrix
Show that \(A\) is Hermitian, that is, verify that
\[
A^H=A.
\]
The eigenvalues of \(A\) are the values of \(\lambda\) for which
\[
\det(A-\lambda I)=0.
\]
Set up the matrix \(A-\lambda I\), calculate its determinant, and find the two eigenvalues \(\lambda_1\) and \(\lambda_2\). Verify that both eigenvalues are real. (The determinant of \(\begin{bmatrix} a & b \\ c & d \end{bmatrix}\) is \(ad-bc\).)
For each eigenvalue \(\lambda_j\), solve
\[
(A-\lambda_j I)\mathbf{x}_j=\mathbf{0}
\]
to find a corresponding eigenvector \(\mathbf{x}_j\). Normalize the eigenvectors so that
\[
\mathbf{x}_j^H\mathbf{x}_j=1.
\]
Verify explicitly that your two normalized eigenvectors are orthogonal,
\[
\mathbf{x}_1^H\mathbf{x}_2=0.
\]
Thus, the eigenvectors form an orthonormal basis of \(\mathbb{C}^2\).
Form the matrix \(U\) whose columns are the normalized eigenvectors,
\[
U=[\mathbf{x}_1\ \mathbf{x}_2].
\]
Show explicitly that \(U\) is unitary by calculating \(U^HU\).
Find the eigenvalues of \(A\) by solving the characteristic equation \(\det(A-\lambda I)=0\). How many distinct eigenvalues does \(A\) have?
Find all eigenvectors corresponding to the eigenvalue you found. How many linearly independent eigenvectors does \(A\) have?
To diagonalize a \(2\times2\) matrix, we need two linearly independent eigenvectors, which can be used as the columns of an invertible matrix \(U\). Explain why this is impossible for \(A\), and conclude that \(A\) is not diagonalizable.
Exercise 9.5 (A reversible reaction with different rate constants) It is recommended that you first complete Exercise 9.2.
where \(k_f>0\) is the rate constant for the forward reaction \(\mathrm{A}\to\mathrm{B}\) and \(k_b>0\) is the rate constant for the backward reaction \(\mathrm{B}\to\mathrm{A}\). The concentrations satisfy
Find the two eigenvalues of \(K\) and a corresponding eigenvector for each eigenvalue. Show that one eigenvalue is zero and that the other is negative.
The eigenvector with eigenvalue zero describes an equilibrium concentration vector. Use it to show that at equilibrium
\[
\frac{b}{a}=\frac{k_f}{k_b}.
\]
Explain why this result also follows directly by requiring the forward and backward reaction rates to be equal.
The other eigenvector describes relaxation toward equilibrium. Show that its time dependence contains the factor
\[
e^{-(k_f+k_b)t}.
\]
What does this tell you about the rate at which the system approaches equilibrium?
Exercise 9.6 (Eigenvalues of a reaction network) It is recommended that you first complete or at least read through Exercise 9.2 and Exercise 9.5.
Write the five coupled rate equations and show that they can be written as
\[
\frac{d\mathbf{x}}{dt}=K\mathbf{x}.
\]
Construct the \(5\times5\) rate matrix \(K\). Check that the sum of the components of \(d\mathbf{x}/dt\) is zero. What quantity is therefore conserved?
Use Python to compute the eigenvalues and eigenvectors of \(K\). You may use, for example,
import numpy as npeigenvalues, eigenvectors = np.linalg.eig(K)
Identify the eigenvalue that is zero, up to numerical precision. Verify that all the other eigenvalues have negative real parts. What do the zero eigenvalue and the negative eigenvalues mean physically?
Scale the eigenvector belonging to the zero eigenvalue so that its components sum to \(1\). Interpret the resulting components in terms of fractions of A, B, C, D, and E.
numerically for a suitable range of times. You may use scipy.linalg.expm to evaluate the matrix exponential. Plot all five concentrations as functions of time.
Verify from your plot and numerical results that the total concentration remains constant and that the concentration vector approaches the equilibrium composition found in part c.
Sort the nonzero eigenvalues according to the magnitude of their real parts. The eigenvalue closest to zero describes the slowest decaying mode of the reaction network. Determine its characteristic relaxation time
\[
\tau=-\frac{1}{\operatorname{Re}\lambda}.
\]
Compare this value with the time scale over which your numerical solution approaches equilibrium. Explain how the eigenvalues of the rate matrix separate the dynamics of a complicated reaction network into different relaxation time scales.
The eigenvalue analysis predicts not only that the system approaches equilibrium, but also how rapidly it does so. Let \(\mathbf{x}_{\mathrm{eq}}\) denote the equilibrium concentration vector found in part c, and define the distance from equilibrium by
Using your numerical solution from part d, plot \(d(t)\) as a function of time using a logarithmic scale for the vertical axis. You can use plt.semilogy for this.
At sufficiently long times, the slowest decaying eigenmode should dominate. If \(\lambda_{\mathrm{slow}}\) is the nonzero eigenvalue closest to zero, we therefore expect approximately
\[
d(t)\propto e^{\lambda_{\mathrm{slow}}t}.
\]
On the same plot, add a curve proportional to \(e^{\lambda_{\mathrm{slow}}t}\), choosing its prefactor so that it can easily be compared with \(d(t)\). Do the two curves become parallel at long times? Explain why a straight line on this logarithmic plot provides a direct visualization of the slowest relaxation mode of the reaction network.
We now find the eigenvalues and eigenvectors. We sort the eigenvalues from largest to smallest real part so that the eigenvalue closest to zero appears first.
eigenvalues, eigenvectors = np.linalg.eig(K)order = np.argsort(eigenvalues.real)[::-1]eigenvalues = eigenvalues[order]eigenvectors = eigenvectors[:, order]print("Eigenvalues:")for value in eigenvalues:print(value)
The eigenvalue reported by the computer as a number of order \(10^{-17}\) should be interpreted as zero; the small deviation from exactly zero is due to floating-point arithmetic.
The zero eigenvalue represents an unchanging mode. This is the equilibrium mode of the reaction network. If
Because the slowest relaxation time will turn out to be around \(13\ \mathrm{s}\), a time interval of about \(0\)–\(80\ \mathrm{s}\) is sufficient to see the system approach equilibrium.
import matplotlib.pyplot as pltfrom scipy.linalg import expmx0 = np.array([1.0, 0.0, 0.0, 0.0, 0.0])times = np.linspace(0.0, 80.0, 500)x_t = np.array([ expm(K * t) @ x0for t in times])plt.figure()for i, species inenumerate(["A", "B", "C", "D", "E"]): plt.plot(times, x_t[:, i], label=species)plt.xlabel("Time / s")plt.ylabel("Concentration")plt.legend()plt.tight_layout()plt.show()
The plot shows the initial A concentration decreasing while the other species are populated. Eventually all five concentrations become constant and approach the equilibrium fractions found in part c.
We can also check conservation numerically.
total = x_t.sum(axis=1)print("Minimum total concentration:", total.min())print("Maximum total concentration:", total.max())print("Final concentration vector:")print(x_t[-1])print("Equilibrium vector:")print(x_eq)
Minimum total concentration: 0.9999999999999933
Maximum total concentration: 1.0000000000000058
Final concentration vector:
[0.02016436 0.05039847 0.17672309 0.08372369 0.66899039]
Equilibrium vector:
[0.0201005 0.05025126 0.1758794 0.08375209 0.67001675]
We can obtain all the characteristic relaxation times numerically.
nonzero = eigenvalues[np.abs(eigenvalues) >1e-10]# Sort from slowest to fastest decaynonzero = nonzero[np.argsort(np.abs(nonzero.real))]print("Relaxation modes:")for lam in nonzero: tau =-1.0/ lam.realprint(f"lambda = {lam.real: .6f} 1/s, tau = {tau:.3f} s")
Relaxation modes:
lambda = -0.077862 1/s, tau = 12.843 s
lambda = -0.624737 1/s, tau = 1.601 s
lambda = -1.135274 1/s, tau = 0.881 s
lambda = -2.162127 1/s, tau = 0.463 s
Thus the reaction network contains several distinct time scales. Some redistribution takes place very rapidly, while one mode relaxes considerably more slowly.
After a few multiples of the shorter relaxation times, the fast modes have essentially disappeared. The remaining deviation from equilibrium is then dominated by the slow mode,
This illustrates an important use of eigenvalue analysis: a complicated set of coupled rate equations can be decomposed into independent modes with characteristic time scales determined by the eigenvalues.
We now calculate the Euclidean distance from equilibrium,
Thus an exponential decay becomes a straight line on a semilogarithmic plot, with slope \(\lambda_{\mathrm{slow}}\).
We can compare the numerical distance directly with the predicted slow exponential. We choose a reference time after the faster modes have mostly decayed and set the prefactor so that the two curves agree at that time.
lambda_slow = nonzero[0].real# Choose a reference point in the long-time regimet_ref =30.0i_ref = np.argmin(np.abs(times - t_ref))# Choose the prefactor so the exponential agrees with d(t)# at the reference timeprefactor = distance[i_ref] / np.exp(lambda_slow * times[i_ref])slow_decay = prefactor * np.exp(lambda_slow * times)plt.figure()plt.semilogy( times, distance, label=r"$\|\mathbf{x}(t)-\mathbf{x}_{\mathrm{eq}}\|_2$")plt.semilogy( times, slow_decay,"--", label=r"$C e^{\lambda_{\mathrm{slow}}t}$")plt.xlabel("Time / s")plt.ylabel("Distance from equilibrium")plt.legend()plt.tight_layout()plt.show()
At early times the two curves need not agree because several eigenmodes contribute simultaneously:
The modes with more negative eigenvalues decay most rapidly. At sufficiently long times, they become negligible compared with the mode whose eigenvalue is closest to zero. Consequently,
and the two curves become parallel on the logarithmic plot.
The numerical dynamics therefore provide a direct visualization of the eigenvalue analysis: the smallest-magnitude nonzero eigenvalue controls the long-time approach to equilibrium.