var('a,b,c,d')
A=matrix([[a,b],[c,d]]);
print "\n Matrix A:\n",A
B=matrix([[1],[0]])
print "\n Matrix B:\n",B
C=matrix(2)
D=matrix(2)
C=C+A
D=D+A
C[0,1]=B[0,0]
C[1,1]=B[1,0]
x=C.det()
D[0,0]=B[0,0]
D[1,0]=B[1,0]
y=D.det()
print "\n Value of X=",x
print "\n Value of Y=",y

Kreyszig-4.4.7(a)-U (last edited 2010-12-18 07:39:33 by B lavanya)