Definition EELT. Eigenvalue and Eigenvector of a Linear Transformation.
Suppose that is a linear transformation. Then a nonzero vector is an eigenvector of for the eigenvalue if
xxxxxxxxxx
x1, x2, x3, x4 = var('x1, x2, x3, x4')
outputs = [ 4*x1 + 2*x2 - x3 + 8*x4,
3*x1 - 5*x2 - 9*x3 ,
6*x2 + 7*x3 + 6*x4,
-3*x1 + 2*x2 + 5*x3 - 3*x4]
T_symbolic(x1, x2, x3, x4) = outputs
T = linear_transformation(QQ^4, QQ^4, T_symbolic)
T.eigenvalues()
xxxxxxxxxx
cp = T.characteristic_polynomial()
cp
xxxxxxxxxx
cp.factor()
xxxxxxxxxx
b0 = vector(QQ, [-5, 8, 0, 4])
b1 = vector(QQ, [-3, 9, -2, 4])
b2 = vector(QQ, [-1, 4, -1, 2])
b3 = vector(QQ, [-1, 2, 0, 1])
B = [b0, b1, b2, b3]
U = (QQ^4).subspace_with_basis(B)
c0 = vector(QQ, [ 0, 2, -7, 5])
c1 = vector(QQ, [-1, 2, -1, 4])
c2 = vector(QQ, [ 1, -3, 5, -7])
c3 = vector(QQ, [ 1, 1, -8, 3])
C = [c0, c1, c2, c3]
V = (QQ^4).subspace_with_basis(C)
x1, x2, x3, x4 = var('x1, x2, x3, x4')
id_symbolic(x1, x2, x3, x4) = [x1, x2, x3, x4]
S = linear_transformation(U, V, id_symbolic)
CB = S.matrix(side='right')
CB
xxxxxxxxxx
S.is_invertible()
CB
is indeed the change-of-basis matrix from B
to C
, converting vector representations relative to B
into vector representations relative to C
. We choose an arbitrary vector, x
, to experiment with (you could experiment with other possibilities). We use the Sage conveniences to create vector representations relative to the two bases, and then verify Theorem CB. Recognize that x
, u
and v
are all the same vector.xxxxxxxxxx
x = vector(QQ, [-45, 62, 171, 85])
u = U.coordinate_vector(x)
u
xxxxxxxxxx
v = V.coordinate_vector(x)
v
xxxxxxxxxx
v == CB*u
xxxxxxxxxx
cols = [V.coordinate_vector(u) for u in U.basis()]
M = column_matrix(cols)
M
MT
as the prefix of names for matrix representations, CB
as the prefix for change-of-basis matrices, and numerals to distinguish the two domain-codomain pairs.xxxxxxxxxx
x1, x2, x3, x4 = var('x1, x2, x3, x4')
outputs = [3*x1 + 7*x2 + x3 - 4*x4,
2*x1 + 5*x2 + x3 - 3*x4,
-x1 - 2*x2 + x4]
T_symbolic(x1, x2, x3, x4) = outputs
U = QQ^4
V = QQ^3
b0 = vector(QQ, [ 1, 1, -1, 0])
b1 = vector(QQ, [-1, 0, -2, 7])
b2 = vector(QQ, [ 0, 1, -2, 4])
b3 = vector(QQ, [-2, 0, -1, 6])
B = [b0, b1, b2, b3]
c0 = vector(QQ, [ 1, 6, -6])
c1 = vector(QQ, [ 0, 1, -1])
c2 = vector(QQ, [-2, -3, 4])
C = [c0, c1, c2]
d0 = vector(QQ, [ 1, -3, 2, -1])
d1 = vector(QQ, [ 0, 1, 0, 1])
d2 = vector(QQ, [-1, 2, -1, -1])
d3 = vector(QQ, [ 2, -8, 4, -3])
D = [d0, d1, d2, d3]
e0 = vector(QQ, [ 0, 1, -3])
e1 = vector(QQ, [-1, 2, -1])
e2 = vector(QQ, [ 2, -4, 3])
E = [e0, e1, e2]
U1 = U.subspace_with_basis(B)
V1 = V.subspace_with_basis(C)
T1 = linear_transformation(U1, V1, T_symbolic)
MTBC =T1.matrix(side='right')
MTBC
xxxxxxxxxx
U2 = U.subspace_with_basis(D)
V2 = V.subspace_with_basis(E)
T2 = linear_transformation(U2, V2, T_symbolic)
MTDE = T2.matrix(side='right')
MTDE
T_symbolic
), but the question now is “how are these representations related?” We need two change-of-basis matrices. Notice that with different dimensions for the domain and codomain, we get square matrices of different sizes.xxxxxxxxxx
identity4(x1, x2, x3, x4) = [x1, x2, x3, x4]
CU = linear_transformation(U2, U1, identity4)
CBDB = CU.matrix(side='right')
CBDB
xxxxxxxxxx
identity3(x1, x2, x3) = [x1, x2, x3]
CV = linear_transformation(V1, V2, identity3)
CBCE = CV.matrix(side='right')
CBCE
xxxxxxxxxx
MTDE == CBCE * MTBC * CBDB
x
arbitrarily, and we compute its value when evaluted by T_symbolic
, and then verify the vector and matrix representations relative to D
and E
.xxxxxxxxxx
T_symbolic(34, -61, 55, 18)
xxxxxxxxxx
x = vector(QQ, [34, -61, 55, 18])
u_D = U2.coordinate_vector(x)
u_D
xxxxxxxxxx
v_E = V2.coordinate_vector(vector(QQ, [-342, -236, 106]))
v_E
xxxxxxxxxx
v_E == MTDE*u_D
MTDE
in the case of one input vector (x
), but now we will use the alternate version of this matrix representation, CBCE * MTBC * CBDB
, in steps.D
to a representation relative to B
.xxxxxxxxxx
u_B = CBDB*u_D
u_B
B
and produces “output” coordinatized relative to C
.xxxxxxxxxx
v_C = MTBC*u_B
v_C
C
to a representation relative to E
.xxxxxxxxxx
v_E = CBCE*v_C
v_E
v_E
equals the previous one, since we have checked the equality of the matrices earlier. But it may be instructive to see the input converted by change-of-basis matrices before and after being hit by the linear transformation (as a matrix representation).xxxxxxxxxx
[var('x{0}'.format(i)) for i in range(1, 12)]
xxxxxxxxxx
x = vector(SR, [x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11])
A = matrix(QQ, 11, [
[ 146, -225, -10, 212, 419, -123, -73, 3, 219, -100, -57],
[ -24, 32, 1, -33, -66, 13, 16, 1, -33, 18, 3],
[ 79, -131, -15, 124, 235, -74, -33, -3, 128, -57, -29],
[ -1, 13, -16, -1, -27, 3, -5, -4, -9, 6, 2],
[-104, 170, 20, -162, -307, 95, 45, 3, -167, 75, 37],
[ -16, 59, -19, -34, -103, 27, -10, -1, -51, 27, 8],
[ 36, -41, -7, 46, 80, -25, -26, 2, 42, -18, -16],
[ -5, 0, 1, -4, -3, 2, 6, -1, 0, -2, 3],
[ 105, -176, -28, 168, 310, -103, -41, -4, 172, -73, -40],
[ 1, 7, 0, -3, -9, 5, -6, -2, -7, 3, 2],
[ 74, -141, 4, 118, 255, -72, -23, -1, 133, -63, -26]
])
out = (A*x).list()
T_symbolic(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) = out
V1 = QQ^11
C = V1.basis()
T1 = linear_transformation(V1, V1, T_symbolic)
MC = T1.matrix(side='right')
MC
V1 == QQ^11
. Let us use a different basis to obtain a more interesting representation. We will input the basis compactly as the columns of a nonsingular matrix.xxxxxxxxxx
D = matrix(QQ, 11,
[[ 1, 2, -1, -2, 4, 2, 2, -2, 4, 4, 8],
[ 0, 1, 0, 2, -2, 1, 1, -1, -7, 5, 3],
[ 1, 0, 0, -2, 3, 0, -1, -1, 6, -1, -1],
[ 0, -1, 1, -1, 3, -2, -3, 0, 5, -8, 2],
[-1, 0, 0, 3, -4, 0, 1, 1, -8, 1, 2],
[-1, -1, 1, 0, 3, -3, -4, -1, 0, -7, 3],
[ 0, 1, 0, 0, 2, 0, 0, -1, 0, -1, 8],
[ 0, 0, 0, -1, 0, 0, 0, 1, 5, -4, 1],
[ 1, 0, 0, -2, 3, 0, -2, -3, 3, 3, -4],
[ 0, -1, 0, 0, 1, -1, -2, -1, 2, -4, 0],
[ 1, 0, -1, -2, 0, 2, 2, 0, 5, 3, -1]])
E = D.columns()
V2 = (QQ^11).subspace_with_basis(E)
T2 = linear_transformation(V2, V2, T_symbolic)
MB = T2.matrix(side='right')
MB
B
into vector representations relative to C
.xxxxxxxxxx
out = [x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11]
id11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) = out
L = linear_transformation(V2, V1, id11)
CB = L.matrix(side='right')
CB
xxxxxxxxxx
CB^-1*MC*CB
MB
. So the conversion from a “messy” matrix representation relative to a standard basis to a “clean” representation relative to some other basis is just a similarity transformation by a change-of-basis matrix. Oh, I almost forgot. Where did that basis come from? Hint: find a description of “Jordan Canonical Form”, perhaps in our Second Course in Linear Algebra.xxxxxxxxxx
x1, x2, x3, x4, x5, x6 = var('x1, x2, x3, x4,x5,x6')
outputs = [ 9*x1 - 15*x2 - 7*x3 + 15*x4 - 36*x5 - 53*x6,
24*x1 - 20*x2 - 9*x3 + 18*x4 - 24*x5 - 78*x6,
8*x1 - 6*x2 - 3*x3 + 6*x4 - 6*x5 - 26*x6,
-12*x1 - 9*x2 - 3*x3 + 13*x4 - 54*x5 - 24*x6,
-8*x1 + 6*x2 + 3*x3 - 6*x4 + 6*x5 + 26*x6,
-4*x1 - 3*x2 - x3 + 3*x4 - 18*x5 - 4*x6]
T_symbolic(x1, x2, x3, x4, x5, x6) = outputs
T1 = linear_transformation(QQ^6, QQ^6, T_symbolic)
M1 = T1.matrix(side='right')
M1
M1
. Since M1
is diagonalizable, we can find a basis of eigenvectors for use as the basis for a new representation.xxxxxxxxxx
ev = M1.eigenvectors_right()
ev
xxxxxxxxxx
evalues, evectors = M1.eigenmatrix_right()
B = evectors.columns()
V = (QQ^6).subspace_with_basis(B)
T2 = linear_transformation(V, V, T_symbolic)
M2 = T2.matrix('right')
M2