LA+Chapter+8+EX+2+solved+by+Leenaeul

2042 days ago by math2013

x,y = var('x, y') h(x,y) = [x-2*y, 5*x-y, 2*x+3*y] T = linear_transformation(QQ^2, QQ^3, h) x1 = vector([1,0]) x2 = vector([1,0]) y1 = vector([0,0,1]) y2 = vector([0,1,0]) y3 = vector([1,0,0]) B = column_matrix([y1, y2, y3, T(x1), T(x2)]) print B print C = B.echelon_form() print C print A = C.submatrix(0,3,3,2) print A 
       
[0 0 1 1 1]
[0 1 0 5 5]
[1 0 0 2 2]

[1 0 0 2 2]
[0 1 0 5 5]
[0 0 1 1 1]

[2 2]
[5 5]
[1 1]
[0 0 1 1 1]
[0 1 0 5 5]
[1 0 0 2 2]

[1 0 0 2 2]
[0 1 0 5 5]
[0 0 1 1 1]

[2 2]
[5 5]
[1 1]
 
       
Traceback (click to the left of this block for traceback)
...
NameError: name 'C' is not defined
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_6.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("QSA9IEMuc3VibWF0cml4KDAsMiwyLDMpCnByaW50IEE="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmp2uHgae/___code___.py", line 3, in <module>
    A = C.submatrix(_sage_const_0 ,_sage_const_2 ,_sage_const_2 ,_sage_const_3 )
NameError: name 'C' is not defined