Inverse with determinant and adjoint functions: (11:24) gp > A = [1,2,0;3,-1,1;0,-2,2] %1 = [1 2 0] [3 -1 1] [0 -2 2] (11:24) gp > B = (1/matdet(A))*matadjoint(A) %3 = [0 1/3 -1/6] [1/2 -1/6 1/12] [1/2 -1/6 7/12] (11:26) gp > A*B %4 = [1 0 0] [0 1 0] [0 0 1] (11:26) gp > B*A %5 = [1 0 0] [0 1 0] [0 0 1] Inverse with row reduction: (11:28) gp > E=[1,0,0;0,1,0;0,0,1] %9 = [1 0 0] [0 1 0] [0 0 1] (11:28) gp > AE=concat(A,E) %10 = [1 2 0 1 0 0] [3 -1 1 0 1 0] [0 -2 2 0 0 1] (11:28) gp > E1=[1,0,0;-3,1,0;0,0,1] %11 = [1 0 0] [-3 1 0] [0 0 1] (11:29) gp > A1=E1*AE %12 = [1 2 0 1 0 0] [0 -7 1 -3 1 0] [0 -2 2 0 0 1] (11:29) gp > E2 = [1,0,0;0,-1/7,0;0,0,1] %13 = [1 0 0] [0 -1/7 0] [0 0 1] (11:30) gp > A2=E2*A1 %14 = [1 2 0 1 0 0] [0 1 -1/7 3/7 -1/7 0] [0 -2 2 0 0 1] (11:30) gp > E3=[1,-2,0;0,1,0;0,0,1] %15 = [1 -2 0] [0 1 0] [0 0 1] (11:31) gp > A3=E3*A2 %16 = [1 0 2/7 1/7 2/7 0] [0 1 -1/7 3/7 -1/7 0] [0 -2 2 0 0 1] (11:31) gp > E4=[1,0,0;0,1,0;0,2,1] %18 = [1 0 0] [0 1 0] [0 2 1] (11:32) gp > A4=E4*A3 %19 = [1 0 2/7 1/7 2/7 0] [0 1 -1/7 3/7 -1/7 0] [0 0 12/7 6/7 -2/7 1] (11:35) gp > E5=[1,0,0;0,1,0;0,0,7/12] %25 = [1 0 0] [0 1 0] [0 0 7/12] (11:35) gp > A5=E5*A4 %26 = [1 0 2/7 1/7 2/7 0] [0 1 -1/7 3/7 -1/7 0] [0 0 1 1/2 -1/6 7/12] (11:37) gp > E6=[1,0,0;0,1,1/7;0,0,1] %31 = [1 0 0] [0 1 1/7] [0 0 1] (11:38) gp > A6=E6*A5 %32 = [1 0 2/7 1/7 2/7 0] [0 1 0 1/2 -1/6 1/12] [0 0 1 1/2 -1/6 7/12] (11:39) gp > E7=[1,0,-2/7;0,1,0;0,0,1] %39 = [1 0 -2/7] [0 1 0] [0 0 1] (11:39) gp > A7=E7*A6 %40 = [1 0 0 0 1/3 -1/6] [0 1 0 1/2 -1/6 1/12] [0 0 1 1/2 -1/6 7/12] compare to: (11:24) gp > B = (1/matdet(A))*matadjoint(A) %3 = [0 1/3 -1/6] [1/2 -1/6 1/12] [1/2 -1/6 7/12]