det for 1x1 and 2x2 matrix