add matrix determinant and transformation to tringular form