var('k')
A=matrix([[k,1],[1,k]])
print A
B=vector([1,1])
print B
x=A.solve_right(B)
print x
print "for K=1 it has infinite  solutions"
print "for k=0 it has one solution"

Strang-1-13-U (last edited 2010-12-18 09:37:59 by prakasam team)