A := matrix(3,4,[a,0,b,2, a,a,4,4, 0,a,2,b]); alias(P=swaprow,Q=mulrow,R=addrow): A2 := Q( P(A,1,2), 1,1/a ); A3 := R(A2,1,2,-a); A4 := R(A3,2,3,1); A5 := Q(A4,1,a); sol := backsub(A5); A6 := subs({b=2},evalm(A5)); sol1 := backsub(A6); A7 := subs({a=0,b=2},evalm(A5)); A8 := R(A7,1,2,1/2); sol2 := backsub(A8); A9 := subs({a=0},evalm(A5)); A10 := Q(A9,3,1/(b-2)); A11 := R( R(A10,3,1,-4), 3,2,4-b ); A12 := P(Q(A11,2,1/(2-b)),1,3);