a = [1 2 3; 4 5 6; 7 8 3];

% from elementary row operations we see that
e1 = [1 0 0; -4 1 0; 0 0 1];
e2 = [1 0 0; 0 1 0; -7 0 1];
e3 = [1 0 0; 0 -1/3 0; 0 0 1];
e4 = [1 0 0; 0 1 0; 0 0 -1/6];
e5 = [1 0 0; 0 1 0; 0 -1 1];
e6 = [1 0 0; 0 1 -2; 0 0 1];
e7 = [1 -2 0; 0 1 0; 0 0 1];
e8 = [1 0 -3; 0 1 0; 0 0 1];


a
disp('a')
pause;
e1*a
disp('e1*a')
pause;
e2*e1*a
disp('e2*e1*a')
pause;
e3*e2*e1*a
disp('e3*e2*e1*a')
pause;
e4*e3*e2*e1*a
disp('e4*e3*e2*e1*a')
pause;
e5*e4*e3*e2*e1*a
disp('e5*e4*e3*e2*e1*a')
pause;
e6*e5*e4*e3*e2*e1*a
disp('e6*e5*e4*e3*e2*e1*a')
pause;
e7*e6*e5*e4*e3*e2*e1*a
disp('e7*e6*e5*e4*e3*e2*e1*a')
pause;
e8*e7*e6*e5*e4*e3*e2*e1*a
disp('e8*e7*e6*e5*e4*e3*e2*e1*a')
