Section 11.3 Eigenvectors
A nonzero vector \(v\) such that \(Av = \lambda v\) is an eigenvector vector belonging to the eigenvalue \(\lambda\text{.}\)
Eigenvectors of \(A\text{,}\) as defined above, are also called right eigenvectors of \(A\text{.}\) Since the equation \(Av = \lambda v\) is equivalent to \((A - \lambda I)v = 0\text{,}\) we have that its solution equals the nullspace of \((A - \lambda I)\text{.}\) For a given eigenvalue \(\lambda\text{,}\) the subspace \(N(A - \lambda I)\) is called the eigenspace of \(A\) associated to the eigenvalue \(\lambda\text{.}\) The dimension of this subspace is the geometric multiplicity of the eigenvalue \(\lambda\text{.}\)
The eigenvectors of the matrix \(A\) belonging to \(\lambda\) are all the nonzero vectors of \(N(A - \lambda I)\text{.}\) There is just one vector in the eigenspace \(N(A - \lambda I)\) that is not an eigenvector, namely the zero vector.
Subsection 11.3.1 Manual Calculation of Eigenvectors
For each eigenvalue \(\lambda\) calculated before, we evaluate the expression at that particular value of \(\lambda\) and then we can compute the particular eigenspace \(N(A - \lambda I)\text{.}\)
In our example, we evaluate the expression at \(\lambda = -1\text{:}\)
Next, we compute the null space.
We obtained the basis of the eigenspace associated to the eigenvalue \(\lambda = -1\) as rows of a matrix. We can visualize the number of rows in this matrix, and we can also ask Sage to compute the geometric multiplicity by asking for the dimension of this subspace.
Repeating the process for the second eigenvalue:
We have obtained manually, a basis for each of the eigenspaces and the geometric multiplicity of each eigenvalue.
Subsection 11.3.2 Sage Calculation of Eigenvectors
Sage provides the
eigenvectors_right() method which directly computes the eigenvalues, eigenvectors and algebraic multiplicities.
Sage returned a list of triples. Each triple \((e, [v1, v2, ... vn], m)\) consists of
-
\(e\text{,}\) the eigenvalue
-
\([v1, v2, ... vn]\text{,}\) a basis for the eigenspace associated to the eigenvalue \(e\)
-
\(m\text{,}\) the algebraic multiplicity of the eigenvalue
We can access the corresponding element in this list. For instance, to obtain the algebraic multiplicity of the first eigenvalue, we first name the list:
Then we access the third element (index 2) of the first triple (index 0).
The method
eigenspaces_right() returns a list of pairs. In each pair \((e,V)\) the first component is the eigenvalue and the second the eigenspace. The eigenspace is given as a vector space, with its base. This format will be useful for instance to visualize, or to ask Sage to compute the geometric multiplicity as the dimension of this space.
First we access the desired eigenspace in the list, for instance, the eigenspace associated to the first eigenvalue (index 0).
And then we calculate its dimension.
Analogously, we can compute the geometric multiplicity of the second eigenvalue.
We can check that both methods yield the same data:
Same eigenspaces:
Same algebraic multiplicities:
Same geometric multiplicities:
Another way to get eigenvalues and eigenvectors is the matrix method
eigentmatrix.right(). The output consists of a pair of square matrices: a diagonal matrix with the eigenvalues in the diagonal and a matrix with eigenvectors as columns, in the same order as the corresponding eigenvalues. If there are not enough eigenvectors to fill the columns of the second square matrix, then Sage inserts zero columns in the matrix of eigenvectors.
Obeserve that in this case, the last column of the second matrix was filled with zeros.
