LA+Chapter8+Ex+4-서승완

2041 days ago by math2013

x, y = var('x, y') ht(x, y) = [2*x+y, x-y];hs(x, y) = [-x+5*y, 2*x+3*y] T = linear_transformation(QQ^2, QQ^2, ht) S = linear_transformation(QQ^2, QQ^2, hs) x1=vector([1, 0]);x2=vector([0, 1]);x3=vector([1, 1]) B=column_matrix([x2, x1, T(x1), T(x2)]) C=B.echelon_form() MT=C.submatrix(0, 2, 2, 2) print "Matrix of T=" print MT D=column_matrix([x1, x3, S(x2), S(x1)]) E=D.echelon_form() MS=E.submatrix(0, 2, 2, 2) print "Matrix of S=" print MS print "MS*MT=" print MS*MT F=column_matrix([x1, x3, S(T(x1)), S(T(x2))]) G=F.echelon_form() MST=G.submatrix(0, 2, 2, 2) print "Matrix of S*T=" print MST 
       
Matrix of T=
[ 1 -1]
[ 2  1]
Matrix of S=
[ 2 -3]
[ 3  2]
MS*MT=
[-4 -5]
[ 7 -1]
Matrix of S*T=
[-4 -5]
[ 7 -1]
Matrix of T=
[ 1 -1]
[ 2  1]
Matrix of S=
[ 2 -3]
[ 3  2]
MS*MT=
[-4 -5]
[ 7 -1]
Matrix of S*T=
[-4 -5]
[ 7 -1]