This method calculates and returns a mathematical counterpart of a given matrix called the "inverse matrix." The inverse matrix, if it exists, essentially undoes the effects of the original matrix when multiplied together, like going backward in a sequence of transformations
Returns the inverse matrix.