Section B.4 Scalar-triangular form
Subsection B.4.1 A \(3 \times 3\) example
Here we will use Sage to carry out the calculations in Example 29.5.1.
First let's load our matrix into Sage.
Eigenvalue.
Let's verify that \(A\) has only a single eigenvalue.
We find a single eigenvalue \(\lambda = -1\text{,}\) repeated in the output according to its algebraic multiplicity \(m_\lambda = 3\text{,}\) as desired.
Eigenvectors.
Now we compute the null space of the matrix \((-1) I - A\) to determine a basis of the eigenspace. As the scalar-triangular form of \(A\) cannot be actually scalar (see Section 25.3), we will need this matrix again later to compute generalized eigenspaces, so we'll save it to the variable C.
Only one parameter is required, so we only get one eigenvector. Assigning \(x_3 = t\) leads to eigenvector \(\uvec{p}_1 = (1,0,1)\text{.}\)
Notice that \(A \uvec{p}_1 = - \uvec{p}_1\text{,}\) as expected.
Extend to a basis for the second generalized eigensubspace.
Continue on to the generalized eigensubspace of degree \(2\text{.}\) To do this, we analyze the null space of \(C^2 = \bbrac{(-1)I - A}^2\text{.}\)
We need two parameters, but this doesn't mean we get two new vectors to combine with \(\uvec{p}_1\) — since the eigenspace is a subspace of the second generalized eigensubspace, we only get one new vector that is independent from \(\uvec{p}_1\text{.}\)
But first solve as usual. Assigning parameters \(x_2 = s\) and \(x_3 = t\text{,}\) we get two basis vectors for the generalized eigensubspace \(E_{-1}^2(A)\text{:}\)
Take \(\uvec{p}_2 = (-3,1,0)\text{,}\) since the second generalized eigenvector above is actually our \(\uvec{p}_1\) eigenvector from before.
Notice that \(\bbrac{(-1)I - A} \uvec{p}_2\) is a multiple of \(\uvec{p}_1\text{,}\) so \(\bbrac{(-1)I - A} \uvec{p}_2\) is an eigenvector, as desired.
Extend to a basis for the third generalized eigensubspace.
We're still short a vector, so we move on to analyzing the null space of \(C^3\) (where \(C = (-1)I - A\)).
Actually, \(C^3 = 0\) (as the only matrix to have \(\RREF = 0\) is the zero matrix itself). So the third generalized eigensubspace is all of \(\R^3\text{,}\) and we may choose our third vector to be any vector from \(\R^3\) that is linearly independent from the first two.
Let's try the first standard basis vector.
It worked! Since the rank is \(3\text{,}\) our three vectors are linearly independent.
The transition matrix and the scalar triangular form matrix.
We now have our basis of the generalized eigenspace \(G_{-1}(A)\text{,}\) built up one step at a time by extending a basis for one generalized eigensubspace to a basis for the next generalized eigensubspace. And we have already created our transition matrix \(P\) above.
It worked! Our matrix is in scalar-triangular form, as it is upper triangular and has the eigenvalue repeated down the diagonal to make the “scalar” part of the form.
We can also use the idea in Subsection 26.4.2 to compute \(\inv{P} A P\) by row reduction: we augment \(P\) with the result of \(A P\text{,}\) and then reducing the \(P\) part on the left to identity simultaneously applies \(\inv{P}\) to the \(A P\) part on the right.
As expected, there's our scalar-triangular form matrix on the right. We can use Python-ic list comprehension to extract it, if we like.
Subsection B.4.2 A \(5 \times 5\) example
Here we will use Sage to carry out the calculations in Example 29.5.2.
First let's load our matrix into Sage.
Eigenvalue.
Let's verify that \(A\) has only a single eigenvalue.
We find a single eigenvalue \(\lambda = 3\text{,}\) repeated in the output according to its algebraic multiplicity \(m_\lambda = 5\text{,}\) as desired.
Eigenvectors.
Now we compute the null space of the matrix \(3 I - A\) to determine a basis of the eigenspace. As the scalar-triangular form of \(A\) cannot be actually scalar (see Section 25.3), we will need this matrix again later to compute generalized eigenspaces, so we'll save it to the variable C.
Two parameters are required: assign \(x_4 = s\) and \(x_5 = t\text{,}\) leading to a pair of linearly independent eigenvectors. To clear fractions, our second eigenvector was obtained by setting \(s = 0\) and \(t = 2\text{.}\)
Notice that \(A \uvec{p}_j = 3 \uvec{p}_j\) for each of these vectors, as expected.
Extend to a basis for the second generalized eigensubspace.
Continue on to the generalized eigensubspace of degree \(2\text{.}\) To do this, we analyze the null space of \(C^2 = \bbrac{3 I - A}^2\text{.}\)
We need four parameters: setting \(x_1, x_2, x_4, x_5\) to parameters leads to a basis for the second generalized eigensubspace \(E_3^2(A)\) consisting of the four vectors
(Again, we have used \(x_5 = 2\) to clear fractions.)
But we want a basis for \(E_3^2(A)\) that extends our already-chosen basis \(\{\uvec{p}_1,\uvec{p}_2\}\) for the eigenspace \(E_3(A)\text{.}\) Let's try the first two above.
Since the rank is \(4\text{,}\) the four vectors we have chosen so far are linearly independent.
Extend to a basis for the third generalized eigensubspace.
We're still short a vector, so we move on to analyzing the null space of \(C^3\) (where \(C = 3I - A\)).
Actually, \(C^3 = 0\) (as the only matrix to have \(\RREF = 0\) is the zero matrix itself). So the third generalized eigensubspace is all of \(\R^5\text{,}\) and we may choose our fifth vector to be any vector from \(\R^5\) that is linearly independent from the first four we have collected.
We already have a couple of standard basis vectors in our collection, so this time let's try the last standard basis vector.
It worked! Since the rank is \(5\text{,}\) our five vectors are linearly independent.
The transition matrix and the scalar triangular form matrix.
We now have our basis of the generalized eigenspace \(G_3(A)\text{,}\) built up one step at a time by extending a basis for one generalized eigensubspace to a basis for the next generalized eigensubspace. And we have already created our transition matrix \(P\) above.
It worked! Our matrix is in scalar-triangular form, as it is upper triangular and has the eigenvalue repeated down the diagonal to make the “scalar” part of the form.
We can also use the idea in Subsection 26.4.2 to compute \(\inv{P} A P\) by row reduction: we augment \(P\) with the result of \(A P\text{,}\) and then reducing the \(P\) part on the left to identity simultaneously applies \(\inv{P}\) to the \(A P\) part on the right.
As expected, there's our scalar-triangular form matrix on the right. We can use Python-ic list comprehension to extract it, if we like.