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.xxxxxxxxxx
A = matrix( [ [-6, -14, 5], [1, 2, -1], [-2, -5, 1] ] )
print(A)
Eigenvalue.
Let's verify that A has only a single eigenvalue.xxxxxxxxxx
A.eigenvalues()
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.xxxxxxxxxx
C = -1 * identity_matrix(3) - A
print(C)
print()
C.rref()
xxxxxxxxxx
p1 = vector((1,0,1))
print(p1)
print(A*p1)
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{.}xxxxxxxxxx
(C^2).rref()
\begin{equation*}
(-3,1,0), \qquad (1,0,1).
\end{equation*}
Take \uvec{p}_2 = (-3,1,0)\text{,} since the second generalized eigenvector above is actually our \uvec{p}_1 eigenvector from before.
xxxxxxxxxx
p2 = vector((-3,1,0))
print(p2)
C*p2
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).xxxxxxxxxx
(C^3).rref()
xxxxxxxxxx
p3 = vector((1,0,0))
P = column_matrix( [ p1, p2, p3 ] )
print(P)
print()
print("rank is", P.rank())
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.xxxxxxxxxx
print(P)
print()
P.inverse() * A * P
\begin{equation*}
\left[\begin{array}{c|c} P \amp AP \end{array}\right] \qquad \rowredarrow \qquad
\left[\begin{array}{c|c} I \amp \inv{P}(AP) \end{array}\right]
\end{equation*}
xxxxxxxxxx
P_AP = P.augment(A*P)
print(P_AP)
print()
I_iPAP = P_AP.rref()
print(I_iPAP)
xxxxxxxxxx
T = I_iPAP[:,3:6]
print(T)
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.xxxxxxxxxx
A = matrix( [
[ 3, 1,-8, 8,-3],
[-2,-5, 0,-2,-5],
[ 2, 7, 3, 2, 4],
[ 3,11, 1, 5, 7],
[ 2, 8, 2, 0, 9]
] )
print(A)
Eigenvalue.
Let's verify that A has only a single eigenvalue.xxxxxxxxxx
A.eigenvalues()
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.xxxxxxxxxx
C = 3 * identity_matrix(5) - A
print(C)
print()
C.rref()
\begin{align*}
\uvec{p}_1 \amp = (-1,0,1,1,0) \amp \uvec{p}_2 \amp = (3,-2,-1,0,2)
\end{align*}
xxxxxxxxxx
p1 = vector((-1,0,1,1,0))
p2 = vector((3,-2,-1,0,2))
print(p1,p2)
print(A*p1,A*p2)
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{.}xxxxxxxxxx
(C^2).rref()
\begin{gather*}
(1,0,0,0,0), \\
(0,1,0,0,0), \\
(0,0,1,1,0), \\
(0,0,-1,0,2).
\end{gather*}
(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.
xxxxxxxxxx
p3 = vector((1,0,0,0,0))
p4 = vector((0,1,0,0,0))
print(p3,p4)
print()
print("rank is:")
column_matrix([p1,p2,p3,p4]).rank()
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).xxxxxxxxxx
(C^3).rref()
xxxxxxxxxx
p5 = vector((0,0,0,0,1))
P = column_matrix( [ p1, p2, p3, p4, p5 ] )
print(P)
print()
print("rank is", P.rank())
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.xxxxxxxxxx
print(P)
print()
P.inverse() * A * P
\begin{equation*}
\left[\begin{array}{c|c} P \amp AP \end{array}\right] \qquad \rowredarrow \qquad
\left[\begin{array}{c|c} I \amp \inv{P}(AP) \end{array}\right]
\end{equation*}
xxxxxxxxxx
P_AP = P.augment(A*P)
print(P_AP)
print()
I_iPAP = P_AP.rref()
print(I_iPAP)
xxxxxxxxxx
T = I_iPAP[:,5:10]
print(T)