implement determinant function to compute det. from LU matrix