Calculate the index of the minimum element in a Matrix.
This function identifies the index of the minimum element in a matrix.