E=([[1,2],[3,8]])
Z=matrix(2,2)
var('y')
L=matrix([[1,0],[x,1]])
U=matrix([[1,y],[0,2]])
Z=L*U
for i in range(2):
    for j in range (2):
        Z[i][j]==E[i][j]
f=function('f',x)
f=L
print f(3)
f1=function('f1',y)
f1=U
print f1(2)
R=f(3)*f1(2)
print R

Strang-1.5-1 (last edited 2010-12-18 10:55:20 by sai kumar)