input: Write a python function to calculate the determinant of a matrix.
  assert determinantMatrix([[1, 0, 1], [1, 1, 0], [0, 1, 1]]) == 1
  assert determinantMatrix([[1, 2], [3, 4]]) == -2
  assert determinantMatrix([[2, 0, 0], [0, 2, 0], [0, 0, 2]]) == 8
output: def determinantMatrix(matrix):
      def determinant_recursive(m):
          if len(m) == 2:
              return m[0][0] * m[1][1] - m[0][1] * m[1][0]
          
          det = 0
          for c in range(len(m)):
              sub_matrix = [row[:c] + row[c+1:] for row in m[1:]]
              det += ((-1) ** c) * m[0][c] * determinant_recursive(sub_matrix)
          return det
  
      return determinant_recursive(matrix)