how to take a determinant of a 4x4 matrix code example Example: matrix determinant for 2x2: a b c d ad - bc