input: Write a python function to find the minimum cost path in a matrix.
  assert matrix_min_cost_path([[1,3,1],[1,5,1],[4,2,1]]) == 7
  assert matrix_min_cost_path([[1,2,3],[4,8,2],[1,5,3]]) == 8
  assert matrix_min_cost_path([[1,2],[3,4]]) == 7
output: def matrix_min_cost_path(matrix):
      if not matrix or not matrix[0]:
          return 0
      
      rows = len(matrix)
      cols = len(matrix[0])
      
      # Initialize a DP table with the same dimensions as the matrix
      dp = [[0] * cols for _ in range(rows)]
      
      # Fill the DP table
      dp[0][0] = matrix[0][0]
      
      # Initialize the first row
      for j in range(1, cols):
          dp[0][j] = dp[0][j - 1] + matrix[0][j]
      
      # Initialize the first column
      for i in range(1, rows):
          dp[i][0] = dp[i - 1][0] + matrix[i][0]
      
      # Fill the rest of the DP table
      for i in range(1, rows):
          for j in range(1, cols):
              dp[i][j] = min(dp[i - 1][j], dp[i][j - 1]) + matrix[i][j]
      
      return dp[rows - 1][cols - 1]