||'''Book'''|| Advanced Engineering Mathematics || ||'''Author'''|| Erwin Kreyszig || ||'''Edition'''|| 8th Edition || /* code_begins */ {{{ #solutions by using crammers rule A=matrix([[1,1,1],[-1,2,1],[2,1,-3]]) b=vector([4,8,-9]) C=b.transpose() print "matrix A is:" print A P=A.det() #det of coefficient matrix print "print det of A:",p P=A.augment(C) print P P.swap_columns(3,0) #swap 1st row with 4th column P1=P[:,:3] print "matrix P1 is:" print P1 p1=P1.det() #det of swapped matrix print "print det of P1:" print p1 P=A.augment(C) P.swap_columns(3,1) #swap 2st row with 4th column P2=P[:,:3] print "matrix P2 is:",P2 p2=P2.det() #det of swapped matrix print "print det of P2:" print p2 P=A.augment(C) P.swap_columns(3,2) #swap 3st row with 4th column P3=P[:,:3] print "matrix P3 is:" print P3 p3=P3.det() print "print det of P3:",p3 x=p1/p #to find x value y=p2/p #to find x value z=p3/p #to find x value print "values of x,y,z:" print x,y,z }}} /* code_ends */ * '''Solution by''': * Beesanna,student,SNIST