disp('the co-efficient matrix is:') a=[1 -4 7;0 3 -5;-2 5 -9] disp(a) disp('let g,h,k be the constants on RHS') disp('R3=R3+2*R1') a(3,:)=a(3,:)+2*a(1,:) disp(a) disp('the constants on RHS are:g,h,k+2g') disp('R3=R3+R2') a(3,:)=a(3,:)+a(2,:) disp(a) disp('the constants on RHS are:g,h,k+2g+h') disp('for solution to exist') disp('from R3:k+2g+h=0')