Eigenvalues and eigenvectors#
We have seen that a matrix \(\mathbf{M}\) operating on a vector \(\mathbf{v}\) produces a new vector \(\mathbf{v^\prime}\):
In general the matrix \(\mathbf{M}\) can change both the magnitude and direction of the vectors \(\mathbf{v}\to\mathbf{v^\prime}\).
Consider the matrix \(\mathbf{M}=\begin{bmatrix}2 & 1 \\ 1 & 2\end{bmatrix}\). This gives the linear transformation shown below.
We can also visualise this transformation by considering the effect on a set of vectors with length \(1\) and different directions. Now we see that the effect of the matrix transformation is to transform a unit circle into an ellipse.
The major and minor axes of this ellipse (given by the longest and shortest transformed vectors) lie along \(\begin{bmatrix}1 \\ 1\end{bmatrix}\) and \(\begin{bmatrix}-1 \\ 1\end{bmatrix}\), respectively.
If we compare these transformed vectors to the corresponding original vectors we see that the effect of \(\mathbf{M}\) operating on these two vectors is only to scale them. Their directions have not changed. Mathematically, this can be expressed as
i.e. operating on \(\mathbf{v}\) by \(\mathbf{M}\) gives the same vector \(\mathbf{v}\) back, times a scalar, \(s\). This only happens for these two “special” vectors, which we call the eigenvectors of the matrix \(\mathbf{M}\). The scalar values \(s\) are the eigenvalues of the matrix \(\mathbf{M}\).
We can calcuate the eigenvalues and eigenvectors of a matrix using np.linalg.eig()
:
>>> print(np.linalg.eig(M))
(array([3., 1.]), array([[ 0.70710678, -0.70710678],
[ 0.70710678, 0.70710678]]))
This returns two arrays. The first array contains the eigenvalues of \(\mathbf{M}\), and the second array contains the eigenvectors of \(\mathbf{M}\).
>>> print(np.linalg.eig(M)[0])
[3., 1]
>>> print(np.linalg.eig(M)[1])
[[ 0.70710678 -0.70710678]
[ 0.70710678 0.70710678]]
Note that the eigenvectors are returned as a matrix. Each of the columns of this matrix correspond to one of the eigenvectors. We can see that for the matrix \(\mathbf{M}=\begin{bmatrix}2 & 1 \\ 1 & 2\end{bmatrix}\) we get one eigenvector \(\begin{bmatrix}0.70710678 \\ 0.70710678 \end{bmatrix}\) with eigenvalue \(3\), and a second eigenvector \(\begin{bmatrix} -0.70710678 \\ \phantom{-}0.70710678\end{bmatrix}\) with eigenvalue \(1\).
Calculating eigenvalues and eigenvectors has applications in a number of areas of chemistry. For example:
Describing the rotational motions of molecules: finding principal axes of rotation and principal moments of inertia (eigenvectors and eigenvalues of the inertia matrix).
Describing the vibrational motions of molecules: finding normal modes (eigenvectors and eigenvalues of the dynamical matrix).
Solving the time-independent Schrödinger equation \(\mathbf{H}\Psi=E\Psi\), which is an eigenvalue equation: finding molecular orbitals and their corresponding energies (eigenvectors and eigenvalues of the Hamiltonian matrix).
Key ideas
A two-dimensional matrix transforms a unit circle into an ellipse.
A vector that does not change direction under the operation \(\mathbf{M}\) is an eigenvector of \(\mathbf{M}\). The scaling factor of this vector is the corresponding eigenvalue.