library(tidyverse)
library(dasc2594)
set.seed(2021)
20 Eigenvectors and Eigenvalues
We have just learned about change of basis in an abstract sense. Now, we will learn about a special change of basis that is “data-driven” called an eigenvector. Eigenvectors and the corresponding eigenvalues are a vital tool in data science for data compression and modeling.
Definition 20.1 An eigenvector of an \(n \times n\) matrix \(\mathbf{A}\) is a nonzero vector \(\mathbf{x}\) such that the matrix equation
\[ \begin{aligned} \mathbf{A} \mathbf{x} = \lambda \mathbf{x} \end{aligned} \]
for some scalar \(\lambda\). If there exists some \(\lambda \neq 0\) (a non-trivial solutions), then \(\lambda\) is called an eigenvalue of \(\mathbf{A}\) corresponding to the eigenvector \(\mathbf{x}\).
It is easy to check if a vector is an eigenvalue:
Let \(\mathbf{A} = \begin{pmatrix} 0 & 6 & 8 \\ 1/2 & 0 & 0 \\ 0 & 1/2 & 0 \end{pmatrix}\), \(\mathbf{u} = \begin{pmatrix} 16 \\ 4 \\ 1 \end{pmatrix}\), and \(\mathbf{v} = \begin{pmatrix} 2 \\ 2 \\ 2 \end{pmatrix}\). Determine if \(\mathbf{u}\) or \(\mathbf{v}\) are eigenvectors of \(\mathbf{A}\). If they are eigenvectors, what are the associated eigenvalues.
Example 20.1 It is easy to check if a vector is an eigenvalue:
Let \(\mathbf{A} = \begin{pmatrix} 2 & 1 \\ 0 & 1 \end{pmatrix}\), \(\mathbf{u} = \begin{pmatrix} - \frac{\sqrt{2}}{2} \\ \frac{\sqrt{2}}{2} \end{pmatrix}\), and \(\mathbf{v} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}\). Determine if \(\mathbf{u}\) or \(\mathbf{v}\) are eigenvectors of \(\mathbf{A}\). If they are eigenvectors, what are the associated eigenvalues. Now, plot \(\mathbf{u}\), \(\mathbf{A} \mathbf{u}\), \(\mathbf{v}\), and \(\mathbf{A} \mathbf{v}\) to show this relationship geometrically.
Example 20.2 Come up with another example and another plot that shows the similar result as the example above.
Thus, we end up with the understanding that nn eigenvector is a (nonzero) vector \(\mathbf{x}\) that gets mapped to a scalar multiple of itself \(\lambda \mathbf{x}\) by the matrix transformation defined by \(T: \mathbf{x} \rightarrow \mathbf{A}\mathbf{x} = \mathbf{x}\). As such, when \(\mathbf{x}\) is an eigenvector of \(\mathbf{A}\) we say that \(\mathbf{x}\) and \(\mathbf{A} \mathbf{x}\) are collinear with the origin (\(\mathbf{0}\)) and each other in the sense that these points lie on the same line that goes through the origin.
Note: The matrix \(\mathbf{A}\) must be an \(n \times n\) square matrix. A similar decomposition (called the singular value decomposition) can be used for rectangular matrices.
Example 20.3 Example: reflection Draw images: https://textbooks.math.gatech.edu/ila/eigenvectors.html
Theorem 20.1 (The Distinct Eigenvalues Theorem) Let \(\mathbf{v}_1, \ldots, \mathbf{v}_n\) be eigenvectors of a matrix \(\mathbf{A}\) and suppose the corresponding eigenvalues are \(\lambda_1, \lambda_2, \ldots, \lambda_n\) are all distinct (different values). Then, the set of vectors \(\{\mathbf{v}_1, \ldots, \mathbf{v}_n\}\) is linearly independent.
20.1 Eigenspaces
Given a square \(n \times n\) matrix \(\mathbf{A}\), we know how to check if a given vector \(\mathbf{x}\) is an eigenvector and then how to find the eigenvalue associated with that eigenvector. Next, we want to check if a given number is an eigenvalue of \(\mathbf{A}\) and to find all the eigenvectors corresponding to that eigenvalue.
Given a square \(n \times n\) matrix \(\mathbf{A}\) and a scalar \(\lambda\), the eigenvectors of \(\mathbf{A}\) associated with the scalar \(\lambda\) (if there are eigenvectors associated with \(\lambda\)) are the nonzero solutoins to the equation \(\mathbf{A} \mathbf{x} = \lambda \mathbf{x}\). This can be written as
\[ \begin{aligned} \mathbf{A} \mathbf{x} & = \lambda \mathbf{x} \\ \mathbf{A} \mathbf{x} -\lambda \mathbf{x} & = \mathbf{0} \\ \mathbf{A} \mathbf{x} -\lambda \mathbf{I} \mathbf{x} & = \mathbf{0} \\ \left( \mathbf{A} -\lambda \mathbf{I} \right) \mathbf{x} & = \mathbf{0}. \\ \end{aligned} \]
Therefore, the eigenvectors of \(\mathbf{A}\) associated with \(\lambda\), if there are any, are the nontrivial solutions of the homogeneous matrix equation \(\left( \mathbf{A} - \lambda \mathbf{I} \right) \mathbf{x} = \mathbf{0}\). In other words, the eigenvectors are the nonzero vectors in the null space null\(\left( \mathbf{A} -\lambda \mathbf{I} \right)\). If there is not a nontrivial solution (solution \(\mathbf{x} \neq \mathbf{0}\)), then \(\lambda\) is not an eigenvalue of \(\mathbf{A}\).
Hey, we know how to find solutions to homogeneous systems of equations! Thus, we know how to find the eigenvectors of \(\mathbf{A}\). All we have to do is solve the system of linear equations \(\left( \mathbf{A} -\lambda \mathbf{I} \right) \mathbf{x} = \mathbf{0}\) for a given \(\lambda\) (actually, for all \(\lambda\)s, which we can’t do). If only there was some way to find eigenvalues \(\lambda\) (hint: there is and it is coming next chapter).
Example 20.4
Let \(\mathbf{A} = \begin{pmatrix} 3 & 6 & -8 \\ 0 & 0 & 6 \\ 0 & 0 & 2 \end{pmatrix}\). Then an eigenvector with eigenvector \(\lambda\) is a nontrival solution to
\[ \begin{aligned} \left( \mathbf{A} - \lambda \mathbf{I} \right) \mathbf{x} & = \mathbf{0} \end{aligned} \]
which can be written as
\[ \begin{aligned} \begin{pmatrix} 3 - \lambda & 6 & -8 \\ 0 & 0 - \lambda & 6 \\ 0 & 0 & 2 - \lambda \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} & = \mathbf{0} \end{aligned} \]
which can be solved for a given \(\lambda\) using an augmented matrix form and row operations to reduce to reduced row echelon form.
Letting \(\lambda = 3\), we have
\[ \begin{aligned} \begin{pmatrix} 3 - 3 & 6 & -8 \\ 0 & 0 - 3 & 6 \\ 0 & 0 & 2 - 3 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} & = \mathbf{0} \end{aligned} \]
which can be written as the matrix equation
\[ \begin{aligned} \begin{pmatrix} 0 & 6 & -8 \\ 0 & -3 & 6 \\ 0 & 0 & -1 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} & = \mathbf{0} \end{aligned} \]
Note that the columns of the matrix above are not linearly independent. Thus, we can solve a non-unique solution (the solution set is a line going through the origin) by finding the reduce row echelon form of an augmented matrix
\[ \begin{aligned} \begin{pmatrix} 0 & 6 & -8 & 0 \\ 0 & -3 & 6 & 0 \\ 0 & 0 & -1 & 0 \end{pmatrix} & \stackrel{rref}{\sim} \begin{pmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix} \end{aligned} \]
which has solution
\[ \begin{aligned} x_1 & = x_1 \\ x_2 & = 0 \\ x_3 & = 0 \end{aligned} \]
Fixing \(x_1 = 1\) gives the eigenvector associated with \(\lambda = 3\) of \(\begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix}\). We can verify that this is an eigenvector with matrix multiplication
\[ \begin{aligned} \begin{pmatrix} 3 & 6 & -8 \\ 0 & 0 & 6 \\ 0 & 0 & 2 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix} & = \begin{pmatrix} 3 \\ 0 \\ 0 \end{pmatrix} = 3 \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix} \end{aligned} \]
Using R
, this can be done as
<- 3
lambda # apply rref to the augmented matrix
rref(cbind(A - lambda * diag(nrow(A)), 0))
[,1] [,2] [,3] [,4]
[1,] 0 1 0 0
[2,] 0 0 1 0
[3,] 0 0 0 0
where the solution set is determined from the RREF form of the augmented matrix of the equation \(\left( \mathbf{A} - \lambda \mathbf{I} \right) \mathbf{x} = \mathbf{0}\)
Example 20.5
Let \(\mathbf{A} = \begin{pmatrix} -21/5 & -34/5 & 18/5 \\ -6/5 & -14/5 & 3/5 \\ -4 & -10 & 5 \end{pmatrix}\). Find the eigenvectors associated with the eigenvalues (a) \(\lambda_1 = -4\), (b) \(\lambda_2 = 3\), and (c) \(\lambda_3 = -1\).
Definition 20.2 Let \(\mathbf{A}\) be an \(n \times n\) matrix and let \(\lambda\) be an eigenvalue of \(\mathbf{A}\). Then, the \(\lambda\)-eigenspace of \(\mathbf{A}\) is the solution set of the matrix equation \(\left( \mathbf{A} - \lambda \mathbf{I} \right) \mathbf{x} = \mathbf{0}\) which is the subspace null(\(\mathbf{A} - \lambda \mathbf{I}\)).
Therefore, the \(\lambda\)-eigenspace is a subspace (the null space of any matrix is a subspace) that contains the zero vector \(\mathbf{0}\) and all the eigenvectors of \(\mathbf{A}\) with corresponding eigenvalue \(\lambda\).
Example 20.6
For \(\lambda\) = (a) -2, (b) 1, and (c) 3, decide if \(\lambda\) is a eigenvalue of the matrix \(\mathbf{A} = \begin{pmatrix} 3 & 0 \\ -3 & 2 \end{pmatrix}\) and if so, compute a basis for the \(\lambda\)-eigenspace.
Example 20.7
Let \(\mathbf{A} = \begin{pmatrix} 17/5 & 8/5 & -6/5 \\ 0 & 3 & 0 \\ 4/5 & 16/5 & 3/5 \end{pmatrix}\). Find the eigenvectors associated with the eigenvalues (a) \(\lambda = 3\) and (b) \(\lambda = 1\). For each eigen value, also find the basis for the associated eigen-space.
20.1.1 Computing Eigenspaces
Let \(\mathbf{A}\) be a \(n \times n\) matrix and let \(\lambda\) be a scalar.
\(\lambda\) is an eigenvalue of \(\mathbf{A}\) if and only if \((\mathbf{A} - \lambda \mathbf{I})\mathbf{x} = \mathbf{0}\) has a non-trivial solution. The matrix equation \((\mathbf{A} - \lambda \mathbf{I})\mathbf{x} = \mathbf{0}\) has a non-trivial solution if and only if null\((\mathbf{A} - \lambda \mathbf{I}) \neq \{\mathbf{0} \}\)
Finding a basis for the \(\lambda\)-eigenspace of \(\mathbf{A}\) is equivalent to finding a basis for null\((\mathbf{A} - \lambda \mathbf{I})\) which can be done by finding parametric forms of the solutions of the homogeneous system of equations \((\mathbf{A} - \lambda \mathbf{I})\mathbf{x} = \mathbf{0}\).
The dimension of the \(\lambda\)-eigenspace of \(\mathbf{A}\) is equal to the number of free variables in the system of equations \((\mathbf{A} - \lambda \mathbf{I})\mathbf{x} = \mathbf{0}\) which is the number of non-pivot columns of \(\mathbf{A} - \lambda \mathbf{I}\).
The eigenvectors with eigenvalue \(\lambda\) are the nonzero vectors in null\((\mathbf{A} - \lambda \mathbf{I})\) which are equivalent to the nontrivial solutions of \((\mathbf{A} - \lambda \mathbf{I})\mathbf{x} = \mathbf{0}\).
Note that this leads of a fact about the \(0\)-eigenspace.
Definition 20.3 Let \(\mathbf{A}\) be an \(n \times n\) matrix. Then
The number 0 is an eigenvalue of \(\mathbf{A}\) if and only if \(\mathbf{A}\) is not invertible.
If 0 is an eigenvalue of \(\mathbf{A}\), then the 0-eigenspace of \(\mathbf{A}\) is null\((\mathbf{A})\).
Theorem 20.2 (Invertible Matrix Theorm + eigenspaces) This is an extension of the prior statement of the invertible matrix Theorem 9.5 Let \(\mathbf{A}\) be an \(n \times n\) matrix and \(T: \mathcal{R}^n \rightarrow \mathcal{R}^n\) be the linear transformation given by \(T(\mathbf{x}) = \mathbf{A}\mathbf{x}\). Then the following statements are equivalent (i.e., they are all either simultaneously true or false).
\(\mathbf{A}\) is invertible.
\(\mathbf{A}\) has n pivot columns.
null\((\mathbf{A}) = \{\mathbf{0}\}\).
The columns of \(\mathbf{A}\) are linearly independent.
The columns of \(\mathbf{A}\) span \(\mathcal{R}^n\).
The matrix equation \(\mathbf{A} \mathbf{x} = \mathbf{b}\) has a uniqu solution for each \(\mathbf{b} \in \mathcal{R}^n\).
The transormation \(T\) is invertible.
The transormation \(T\) is one-to-one.
The transormation \(T\) is onto.
det\((\mathbf{A}) \neq 0\)
0 is not an eigenvalue of \(\mathbf{A}\)