begin global det, solve, inv use math.la: id, scalar function pivoting(A,B,n,j,ord) m = ord(A[j,j]) k = j for i in j+1..n-1 if m